-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/metadataIssues related to metadata loading in goplsIssues related to metadata loading in gopls
Milestone
Description
Normally I would just fix this bug, but given our proximity to the v0.12.0 release I'm filing it for later:
When state changes in gopls, we re-evaluate file watchers. Currently, this is done synchronously to the state change processing, via Server.didModifyFiles->updateWatchedDirectories.
Problems with this:
- AFAIK there is no need to block change processing on updating watched directories. File watching is always going to be asynchronous, so I don't think we avoid any races by blocking while processing didChange notifications
- we should generally avoid blocking on server->client calls during notification processing, as it can lead to distributed deadlocks in certain clients
- we should
awaitLoadedbefore re-evaluating file watches, asgo listmight surface new directories to watch after e.g. a go.mod change. We can'tawaitLoadedduring change processing.
Metadata
Metadata
Assignees
Labels
ToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.gopls/metadataIssues related to metadata loading in goplsIssues related to metadata loading in gopls