go
go copied to clipboard
x/tools/gopls: deprecate experimentalWatchedFileDelay
I added experimentalWatchedFileDelay
for LSP clients that don't buffer file change notifications. In retrospect, I think this was a mistake:
- Clients have more knowledge of user intent, and so are better fit to implement change buffering (e.g. during branch switches)
- Clients should control the ordering of changes. By buffering change notifications gopls observes a different ordering of changes than is sent by the client. This shouldn't matter in practice, but feels incorrect.
- Change processing should be fast. In some sense, this setting was only working around a limitation of gopls that it had to do a remarkable amount of bookkeeping for each change. We've since improved that significantly (https://go.dev/issue/45686).
Therefore, I think we should remove this setting (which never made it out of 'experimental' anyway), to reduce complexity within gopls.