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: