Skip to content

Conversation

@TaKO8Ki
Copy link
Contributor

@TaKO8Ki TaKO8Ki commented Oct 28, 2025

Summary

Fixes #20784

Move the capability check into publish_diagnostics_for_document and clear_diagnostics_for_document.

Test Plan

I have tested it with VSCode.

output

@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser MichaReiser added the server Related to the LSP server label Oct 28, 2025
@MichaReiser MichaReiser changed the title [ruff] Add capabilities check for clear_diagnostics_for_document Avoid sending an unnecessary "clear diagnostics" message for clients supporting pull diagnostics Oct 28, 2025
Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@MichaReiser
Copy link
Member

Ahh... airplane wifi at its best.

@MichaReiser MichaReiser merged commit 7b959ef into astral-sh:main Oct 28, 2025
38 checks passed
@TaKO8Ki TaKO8Ki deleted the capabilities-check-for-clear_diagnostics_for_document branch October 28, 2025 18:31
dcreager added a commit that referenced this pull request Oct 28, 2025
…straint-sets

* dcreager/subtype-given-typevars:
  better comment
  restructure a bit
  better names/comments
  simplify before implication
  two typevars!
  [ty] Reformat constraint set mdtests (#21111)
  [ty] Move constraint set mdtest functions into `ConstraintSet` class (#21108)
  Avoid sending an unnecessary "clear diagnostics" message for clients supporting pull diagnostics (#21105)
  Update Rust crate ignore to v0.4.24 (#20979)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the LSP server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clear_diagnostics sends a publishDiagnostics notification without checking the client capabilities

2 participants