-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/gopls: DidModifyFiles: "non-abs file path %q" bug in port.matches #70603
Comments
This implies that session.DidModifyFiles was passed a list of modifications that include relative paths. This is most likely because DidOpen (among others) was passed a relative path that it should have either rejected or absolutized. |
Agreed. The bug is not that the client sent bad paths, but that they weren't rejected earlier. I feel like there's a whole category of bad inputs that gopls could do a better job of catching and handling. In this case, there's no good way to reject a bad notification, so gopls needs raise a message or diagnostic (or both) alerting the user that their client is misbehaving. |
Issue created by stacks.
This stack
NaAAKw
was reported by telemetry:gopls/bug
golang.org/x/tools/gopls/internal/util/bug.report:+35
golang.org/x/tools/gopls/internal/util/bug.Reportf:+1
golang.org/x/tools/gopls/internal/cache.port.matches:+5
golang.org/x/tools/gopls/internal/cache.matchingView[...]:+23
golang.org/x/tools/gopls/internal/cache.(*Session).viewOfLocked:+15
golang.org/x/tools/gopls/internal/cache.(*Session).DidModifyFiles:+138
golang.org/x/tools/gopls/internal/server.(*server).didModifyFiles:+36
golang.org/x/tools/gopls/internal/server.(*server).DidOpen:+20
golang.org/x/tools/gopls/internal/protocol.serverDispatch:+253
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.ServerHandler.func3:+5
golang.org/x/tools/gopls/internal/lsprpc.(*streamServer).ServeStream.handshaker.func4:+52
golang.org/x/tools/gopls/internal/protocol.Handlers.MustReplyHandler.func1:+2
golang.org/x/tools/gopls/internal/protocol.Handlers.AsyncHandler.func2.2:+3
runtime.goexit:+0
Dups: HAiIaQ TeKpaQ
The text was updated successfully, but these errors were encountered: