Repository navigation
Debug Stop suite waits for earlier runs' terminals to close before counting its own - #612
Merged
Merged
Conversation
…rlier suite's still-settling run to close its terminal, and fails naming the leak if one never closes, instead of counting it as a ghost of its own
MelbourneDeveloper
enabled auto-merge (squash)
November 19, 2026 19:10
MelbourneDeveloper
added a commit
that referenced
this pull request
Nov 19, 2026
…ile watcher (Windows F# add-file hover) (#613) ## TLDR Adding an F# file from the Solution Explorer now reloads the F# project right away. Before, the reload waited for the file watcher to notice the host's own `.fsproj` write; on Windows it sometimes didn't, and the new file stayed unowned, with no hover or diagnostics. ## Details - **Symptom:** the Windows `workspace` leg failed on #607, #609 and #612 in *Solution Explorer — Add F# Source File: project node: adds .fs before the last Compile item and FCS owns it*. A hover on the new file stayed `[]` for the test's 90-second polling limit. Each failure passed on re-run. - **Mechanism, from the uploaded host and sidecar logs of a passing run:** - `sharplsp/project/addCompileItem` edits the `.fsproj` through the C# sidecar's MSBuild editing. - Nothing then told the F# sidecar. Its reload ("F# loaded …fsproj, which owns …NewLogic.fs") came about 1.8 s later, only because the native watcher noticed the write. - The Windows logs show watcher `EPERM` and "watcher shutdown" errors. When the event is lost, the project is never reloaded. - **Fix:** - `pull_diagnostics/monitor.rs` gains `written(paths)`. It posts the same `workspace/didChangeWatchedFiles` notification the native watcher sends (type Changed, `sharplspRescan: false`) onto the foreground dispatch queue. - `project_edit.rs` calls it after any compile-item edit that modified the project. - A watcher event that also arrives is merged into the same reload by the existing reload worker. - `pull_diagnostics/state.rs` exposes the dispatch queue (`inbound()`). Both files stay under 500 lines. ## How Do The Automated Tests Prove It Works? - `written_tests::a_project_file_the_host_writes_is_announced_as_a_watched_change` (new) checks three cases: 1. Before the dispatch queue exists, the call is a no-op. 2. Once the queue exists, one `didChangeWatchedFiles` arrives, carrying exactly `[{ uri: <project>, type: 2 }]` with `sharplspRescan: false`. 3. Writing no paths sends no notification. - All 371 host unit tests pass (`--test-threads=1`), and clippy is clean. - On this PR, the Windows `workspace` leg runs the Add F# Source File suite end to end.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
The debug Stop suite no longer counts an earlier suite's still-open test-debug terminal as a ghost of its own. It waits for that terminal to close, and if one never does, fails with a message that names the leak.
Details
debug-testsfailed on Regex highlighting: a [ inside a character class is literal unless it opens a subtraction #611 (head0d31a1f, which includes Cancelled test-debug gestures leave no ghost terminal (Linux debug-tests flake) #610). All four Stop variants failed together with2 !== 1.debug-test-kit.tsgainsassertNoTerminalLeft(name, why). It waits up toDEBUG_SESSION_MSfor no terminal of that name to remain.debug-test-stop-e2e.test.tscalls it first, so its later "exactly one terminal" check counts only what the test itself opened. The test timeout grows by oneDEBUG_TEST_MSto fit the wait.How Do The Automated Tests Prove It Works?
debug-test-mtp-e2efollowed bydebug-test-stop-e2e(CI's order): 6 passing.debug-testsjob, the four Stop variants must pass. If an earlier suite really leaks a terminal, they fail withevery earlier debug run closed its terminal once it settledrather than the misleading ghost count.