Skip to content

Full-stack dead-code tests: default config, refresh on switch, cross-project C# and F# references - #616

Merged
MelbourneDeveloper merged 4 commits into
mainfrom
chore/finish-plans-7
Nov 20, 2026
Merged

MelbourneDeveloper merged 4 commits into
mainfrom
chore/finish-plans-7

Conversation

@MelbourneDeveloper

Copy link
Copy Markdown
Collaborator

TLDR

More full-stack dead-code tests through the real host and both sidecars, covering the default configuration, the diagnostic refresh, and references from another project in C# and F#. Ticks the 10 static-analyzer plan rows they and the earlier suites prove.

Details

  • tests/e2e_modules/configuration_live.rs:
    • csharp_unused_public_types_are_dead_only_in_a_monorepo now starts with NO sharplsp.toml, so the default config is what reports only the internal type. After each monorepo switch it waits for the workspace/diagnostic/refresh the server sends; that refresh is debounced, so it can arrive after the next pull already shows new results.
    • a_public_csharp_type_another_project_uses_is_not_dead_in_a_monorepo (new): a two-project .slnx in which App uses Lib.Used. Only Orphan is reported.
    • a_public_fsharp_value_another_project_uses_is_not_dead_in_a_monorepo (new): the F# version. Only orphan is reported.
    • One write_project(root, name, ext, [properties, items], source) builds every C# and F# project in the file, replacing four copies of the same project-writing code.
  • DIAGNOSTICS-STATIC-ANALYZERS-PLAN.md:
    • Ticked: the refresh row, the default-config row, the cross-project C# and F# rows, and the six summary rows whose phase rows are proven.
    • The cross-language rows (C# ↔ F# references) stay open. FCS does not see C# callers, so that needs the shared metadata identity the plan describes.

How Do The Automated Tests Prove It Works?

  • cargo test --test lsp_e2e configuration_live: 4 passing against the real host and sidecars (2 new, 2 extended).
  • The assertions are exact (assert_eq! on the name and severity set), so a referenced type or value showing up as dead fails the test.
  • The refresh assertion waits up to NOTICED for a refresh beyond those counted before the switch.
  • cargo clippy --all-targets and cargo fmt are clean.

…the diagnostic refresh each monorepo switch sends; ticks the default-config and refresh rows
…ject uses is live and only the unused one is dead
…es is live in a monorepo; the dead-code e2e builds every project through one write_project
@MelbourneDeveloper
MelbourneDeveloper enabled auto-merge (squash) November 20, 2026 01:28
@MelbourneDeveloper
MelbourneDeveloper merged commit 757091a into main Nov 20, 2026
117 of 119 checks passed
@MelbourneDeveloper
MelbourneDeveloper deleted the chore/finish-plans-7 branch November 20, 2026 02:08
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