fix: integration tests NoServerForLanguage + clippy.toml msrv sync#111
Merged
fix: integration tests NoServerForLanguage + clippy.toml msrv sync#111
Conversation
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
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.
Summary
NoServerForLanguage("plaintext")(integration tests: 12 of 19 rust-analyzer tests fail with NoServerForLanguage("plaintext") #106)clippy.tomlmsrv from1.85to1.88to matchCargo.tomlrust-version (clippy.toml msrv (1.85) out of sync with Cargo.toml rust-version (1.88) #107)bridge,config, andlspmodules now valid under Rust 1.88Changes
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 testTranslator. PreviouslyTranslator::new()produced an empty extension map, causingdetect_language()to return"plaintext"for.rsfiles — the client registered under"rust"was never found.bridge/translator.rs,config/server.rs,lsp/client.rs,lsp/lifecycle.rs,lsp/types.rs: flatten nestedif letblocks into let-chains (if let A && let B { ... }), valid since Rust 1.88.Test plan
cargo +nightly fmt --all -- --checkpassescargo clippy --all-targets --all-features --workspace -- -D warningspasses with no MSRV mismatch warningcargo nextest run --workspace --all-features --lib --bins— 344/344 passRUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-featurespassescargo nextest run --workspace --all-features -- --ignored integration::rust_analyzer_tests— all 19 should passCloses #106
Closes #107