Skip to content

Stabilize Rust diagnostics retrieval across CI platforms#1559

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-tests-on-windows-latest
Draft

Stabilize Rust diagnostics retrieval across CI platforms#1559
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-tests-on-windows-latest

Conversation

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

TestRustDiagnostics::test_file_diagnostics was intermittently failing because Rust diagnostics can arrive after the default wait window, producing an empty result (AssertionError: []). While it was first observed on windows-latest, the timing issue can occur on other platforms too. This change makes Rust diagnostics waiting more tolerant across platforms.

This is related to recent Rust LS diagnostics flow changes: diagnostics retrieval now relies on pull diagnostics first and then falls back to waiting for publishDiagnostics when pull results are empty, so delayed published diagnostics can miss the shorter default window.

  • Diagnostics timeout behavior (Rust Analyzer)

    • Override Rust Analyzer’s published-diagnostics wait timeout to use a longer floor on all platforms (>= 8s).
  • Regression coverage

    • Add focused timeout-policy coverage verifying the extended wait is used on both Windows and non-Windows paths.
@override
def _get_published_diagnostics_wait_timeout(self, pull_diagnostics_failed: bool) -> float:
    timeout = super()._get_published_diagnostics_wait_timeout(pull_diagnostics_failed)
    return max(timeout, 8.0)

Copilot AI changed the title [WIP] Fix failing GitHub Actions job Tests on windows-latest Stabilize Rust diagnostics retrieval on Windows CI Jun 9, 2026
Copilot AI requested a review from MischaPanch June 9, 2026 08:36
@MischaPanch

Copy link
Copy Markdown
Member

@copilot the error appears in all platforms, not just windows. You should also explain how the error is related to recent changes to our rust LS support

Copilot AI commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

@copilot the error appears in all platforms, not just windows. You should also explain how the error is related to recent changes to our rust LS support

Addressed in eaa93079.

I changed Rust Analyzer to use the extended published-diagnostics wait timeout on all platforms (not only Windows), and updated the timeout test to cover both Windows and Linux.

Why this is tied to recent Rust LS changes: after the recent diagnostics-flow updates in SolidLanguageServer (pull diagnostics first, then fallback to waiting for publishDiagnostics when pull returns no items), Rust can return an empty pull response and publish diagnostics slightly later. The previous default wait window was sometimes too short, which caused the intermittent empty diagnostics ([]) assertion failure.

Copilot AI changed the title Stabilize Rust diagnostics retrieval on Windows CI Stabilize Rust diagnostics retrieval across CI platforms Jun 9, 2026
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.

2 participants