-
Notifications
You must be signed in to change notification settings - Fork 216
Open
astral-sh/ruff
#22335Labels
bugSomething isn't workingSomething isn't workingserverRelated to the LSP serverRelated to the LSP server
Milestone
Description
ty's LSP does support the PublishDiagnostics notification, however, it only publishes the diagnostics for the changed file. It never pushes diagnostics for related files.
Let's say you have
lib.py:
class Foo:
name: strmain.py:
from lib import Foo
foo = Foo()
print(foo.name)Now, you change Foo.name to Foo.name2. Note, how ty doesn't show any diagnostics in main.py. The new diagnostics only show up once you start making changes to main.py
We should send the PublishNotification for all open documents. However, doing so on every didChange notification seems a bit much and possibly expensive. That's why I think the approach taken by Pyrefly to only do this in didSave seems reasonable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingserverRelated to the LSP serverRelated to the LSP server