Repository navigation
Test Explorer follows the chosen solution (configured, remembered, picked) + cross-language dead code is not reported (#617) - #603
Merged
Conversation
… it instead of re-prompting; Select Solution still always asks
…fileBasedAssembly
…sion reads it from sharplsp/configuration, so the Solution Explorer and Test Explorer show the solution the server already opened; it beats a remembered pick, and a stale entry falls back to the remembered solution or the picker
MelbourneDeveloper
enabled auto-merge (squash)
November 19, 2026 09:42
MelbourneDeveloper
disabled auto-merge
November 19, 2026 09:44
MelbourneDeveloper
force-pushed
the
fix/remember-solution
branch
from
November 19, 2026 10:18
ba9267f to
f12e906
Compare
…ge calls: a project an F# or C# project of the other language references reports no unused public code, since neither compiler sees the other's callers (#617)
…er a real F# and a real C# solution drives the live loader into the live Testing tree through a pick, a reload, a configured solution_path, a stale one, a deliberate switch and a dismissed pick, asserting the exact tests each time; the scratch configuration client moves into the shared kit; the cross-language dead-code test cites [ANALYZERS-TRUTH]
MelbourneDeveloper
enabled auto-merge (squash)
November 20, 2026 02:59
…btraction; only an odd run of backslashes escapes the -
…nces are re-read when its file changes, so adding or removing a reference from the other language moves public dead code without a reopen; the cross-language tests move to their own module (#617)
… c: to VS Code, C: to the OS); CrossLanguageReferences gets real-file tests in Common: solution, folder, file and missing targets, an unreadable solution, and a reference added then removed by a later edit
…their fixture: the nested Expecto case finished with its session while dotnet test was still wrapping up, the fixture vanished under it, and its terminal leaked into the Stop suite on Linux; that test now also asserts its run settled
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.
Why
In a workspace holding many solutions (this repo has ~50 with its fixtures), the extension asked which one to load on every window reload — even when
sharplsp.tomlalready named one incsharp.solution_pathand the server had opened it. Picking a fixture solution pointed the Solution Explorer and the Test Explorer at it:Test discovery: 0 item(s) from 1 target(s).What changes
csharp.solution_pathfromsharplsp/configurationand loads that solution with no prompt, so the editor shows what the server opened. A stale entry (no such file) is no choice. [SHARPLSP-ARCHITECTURE-PROJECTS-SOLUTION-PATH]Tests
solution-configured.test.ts— against a real server: unconfigured asks; a relative entry loads without asking; an absolute entry beats the remembered solution; a stale entry falls back to the remembered solution, then to the picker.solution-memory.test.ts— a reload reopens the picked solution.No new LSP infrastructure: the request is the existing
sharplsp/configuration.test-explorer-solution-choice.test.ts— the end-to-end proof. One user journey over a real F# xUnit solution and a real C# xUnit solution drives the live loader into the live Solution Explorer and Testing tree: a pick, a window reload, a configuredsolution_path, a stale one, a deliberate switch, and a dismissed pick. After each step the tree holds exactly that solution's tests (no stale ones from the other solution, one assembly root labelled for its project), the prompt count is exact, and the remembered solution is checked.Also merged here: cross-language dead code (#617)
When a monorepo has both F# and C#, the dead-code analyzer no longer reports a public symbol that only the other language calls. Neither FCS nor Roslyn can see callers in the other language, so a project referenced from the other language reports no unused public code ([ANALYZERS-TRUTH]: say nothing rather than raise a false error). Private and internal code is still checked as before.
CrossLanguageReferences(Sidecar.Common) finds the projects that a project in the other language references.The C# analyzer gets this through
DeadCodeMode.SharedAcrossLanguages; the F# analyzer throughAnalyzerConfig.SharedAcrossLanguagesandReferencedFromCSharp.Two new full-stack tests, in
configuration_live.rs, failed before the fix. One reported[("orphan", 1), ("used", 1)], the other[("Orphan", 1), ("Used", 1)]; both now report[].Follows project edits. A compiler never reloads when a project in the other language changes. So each project's references are re-read whenever its file changes, and adding or removing a reference from the other language moves the dead-code results with no reopen. Before this,
dead_code_cross_language.rsfailed when the reference was removed (expected [("orphan", 1), ("used", 1)] dead; the last pull reported []); it passes now, 4/4.Also: regex highlighting fix
[\\-[x]]is a character-class subtraction, but the highlighter checked only the single character before the-, so it treated the-as escaped. It now counts the backslashes in a row before the-, and only an odd number escapes it. A newRegexHighlightingTestsrow failed for exactly this reason and passes now.#617 stays open until the released binaries are verified.