Skip to content

fix: integration tests NoServerForLanguage + clippy.toml msrv sync#111

Merged
bug-ops merged 2 commits intomainfrom
106-107-integration-tests-msrv
Apr 29, 2026
Merged

fix: integration tests NoServerForLanguage + clippy.toml msrv sync#111
bug-ops merged 2 commits intomainfrom
106-107-integration-tests-msrv

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 29, 2026

Summary

Changes

clippy.toml: msrv = "1.85"msrv = "1.88"

tests/integration/rust_analyzer_tests.rs: setup_rust_analyzer() now chains .with_extensions({"rs" => "rust"}) on the test Translator. Previously Translator::new() produced an empty extension map, causing detect_language() to return "plaintext" for .rs files — the client registered under "rust" was never found.

bridge/translator.rs, config/server.rs, lsp/client.rs, lsp/lifecycle.rs, lsp/types.rs: flatten nested if let blocks into let-chains (if let A && let B { ... }), valid since Rust 1.88.

Test plan

  • cargo +nightly fmt --all -- --check passes
  • cargo clippy --all-targets --all-features --workspace -- -D warnings passes with no MSRV mismatch warning
  • cargo nextest run --workspace --all-features --lib --bins — 344/344 pass
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features passes
  • Integration tests with rust-analyzer in PATH: cargo nextest run --workspace --all-features -- --ignored integration::rust_analyzer_tests — all 19 should pass

Closes #106
Closes #107

bug-ops added 2 commits April 29, 2026 14:40
Update msrv from "1.85" to "1.88" to match workspace rust-version bumped
in commit 5d938b9. Eliminates the MSRV mismatch warning on every clippy
run and ensures linting targets the correct API surface.

Closes #107
setup_rust_analyzer() called Translator::new() which initializes with an
empty extension_map. detect_language() fell back to "plaintext" for .rs
files, so the client registered under "rust" could not be found, causing
NoServerForLanguage("plaintext") in 12 of 19 tests.

Fix: chain with_extensions({"rs" => "rust"}) on the test Translator to
match the registration key used in setup_rust_analyzer().

Also applies let-chain flattening (if let A && let B) across translator,
config, lsp modules to remove nested if-let blocks now valid under
Rust 1.88 (MSRV bump from #107).

Closes #106
@github-actions github-actions Bot added rust Rust code changes testing Test-related changes configuration Configuration changes mcpls-core mcpls-core crate changes labels Apr 29, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 29, 2026 12:40
@bug-ops bug-ops merged commit 4e3621f into main Apr 29, 2026
16 checks passed
@bug-ops bug-ops deleted the 106-107-integration-tests-msrv branch April 29, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration Configuration changes mcpls-core mcpls-core crate changes rust Rust code changes testing Test-related changes

Projects

None yet

1 participant