You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a recent discussion with @findleyr investigating golang/go#38403, we hypothesised that one potential cause of problems could be floods of file changes sent to gopls by a govim instance accidentally left open whilst a git rebase is in progress.
@findleyr made the comment that gopls should be able to handle such cases.
But whether or not gopls can/will ever handle such cases, it seems sensible to make govimgit-aware. That is to say, when git starts doing some work (that could potentially cause a storm of file changes, e.g. changing branch), put govim into a mode where it buffers file change events until the git command finishes.
This would have the massive advantage of not requiring the user to close all editor sessions (which is where the file watchers are created) every time you do something git-related.
(Incidentally, gopls will never become git-aware; the LSP server requires the client to tell it about all file events; so this is one case where the solution has to sit in the client. Contrast the alternative solution of gopls properly handling file change storms in normal operation as opposed to all clients debouncing changes; in that case, yes, all clients could debounce changes, but it makes much more sense to do that once, correctly, in the server)
In a recent discussion with @findleyr investigating golang/go#38403, we hypothesised that one potential cause of problems could be floods of file changes sent to
gopls
by agovim
instance accidentally left open whilst agit rebase
is in progress.@findleyr made the comment that
gopls
should be able to handle such cases.But whether or not
gopls
can/will ever handle such cases, it seems sensible to makegovim
git
-aware. That is to say, whengit
starts doing some work (that could potentially cause a storm of file changes, e.g. changing branch), putgovim
into a mode where it buffers file change events until thegit
command finishes.This would have the massive advantage of not requiring the user to close all editor sessions (which is where the file watchers are created) every time you do something
git
-related.(Incidentally,
gopls
will never becomegit
-aware; the LSP server requires the client to tell it about all file events; so this is one case where the solution has to sit in the client. Contrast the alternative solution ofgopls
properly handling file change storms in normal operation as opposed to all clients debouncing changes; in that case, yes, all clients could debounce changes, but it makes much more sense to do that once, correctly, in the server)cc @leitzler
The text was updated successfully, but these errors were encountered: