-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bug
Milestone
Description
Here, notice name5 that is defined in the file on the right is missing from the completion list:
I can reproduce this by:
- Clearing the ~/.dartServer folder
- Open this project, including the (right) file
myfoo.dart - Add a new field to the class definition (
name6) - Save all files
- Restart VS Code
- Wait for analysis to complete
- Invoke completion
My theory is that this is related to using simple increasing integers as modified stamps (see here). When you open the file for the first time, the modification stamp is 0 or 1 (depending on the order of opened files), and this is embedded in cached data. When you reopen the project, even after the file was modified, the new instance of the server again starts from 0 and decides the cached data is still valid.
@bwilkerson @scheglov does this sound plausible? I can repro both on LSP and the original protocol.
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bug
