Skip to content

Debug Stop suite waits for earlier runs' terminals to close before counting its own - #612

Merged
MelbourneDeveloper merged 1 commit into
mainfrom
fix/stop-suite-terminal-baseline
Nov 19, 2026
Merged

MelbourneDeveloper merged 1 commit into
mainfrom
fix/stop-suite-terminal-baseline

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Collaborator

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

How Do The Automated Tests Prove It Works?

  • Locally, debug-test-mtp-e2e followed by debug-test-stop-e2e (CI's order): 6 passing.
  • On this PR's Linux debug-tests job, the four Stop variants must pass. If an earlier suite really leaks a terminal, they fail with every earlier debug run closed its terminal once it settled rather than the misleading ghost count.

…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
MelbourneDeveloper enabled auto-merge (squash) November 19, 2026 19:10
@MelbourneDeveloper
MelbourneDeveloper merged commit 3e48d31 into main Nov 19, 2026
116 of 119 checks passed
@MelbourneDeveloper
MelbourneDeveloper deleted the fix/stop-suite-terminal-baseline branch November 19, 2026 20:05
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant