x/tools/gopls: add a work-around for file watching bug in VS Code #40812
Labels
gopls/metadata
Issues related to metadata loading in gopls
gopls
Issues related to the Go language server, gopls.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
VS Code currently does not allow the language server to watch files outside of the workspace root: microsoft/vscode#100870.
This means that users who open subdirectories of modules or modules with replace directives may see bugs because
gopls
's view of the workspace state is incorrect.@heschik has suggested that we should add a work-around to address this -- we could clear out the entire cache when we see >= 10 (or fewer?) batched
didChangeWatchedFiles
notifications. We can do this for any module with a replace directive or for any workspace whose root is not the module root.The text was updated successfully, but these errors were encountered: