Skip to content
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: fail to recover from deletion of go.mod file #40487

Closed
stamblerre opened this issue Jul 30, 2020 · 5 comments
Closed

x/tools/gopls: fail to recover from deletion of go.mod file #40487

stamblerre opened this issue Jul 30, 2020 · 5 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@stamblerre
Copy link
Contributor

I deleted a go.mod file in a directory inside of GOPATH and got the following error message:

[Trace - 01:33:15.594 AM] Received notification 'window/logMessage'. Params: {"type":1,"message":"2020/07/30 01:33:15 The code in the workspace failed to compile (see the error message below).\nIf you believe this is a mistake, please file an issue: https://github.com/golang/go/issues/new.: stat /Users/rstambler/code/src/foo/go.mod: no such file or directory\n\tsnapshot=9\n\tdirectory=file:///Users/rstambler/code/src/foo\n"}

@stamblerre stamblerre added this to the gopls/v1.0.0 milestone Jul 30, 2020
@gopherbot gopherbot added Tools This label describes issues relating to any tools in the x/tools repository. gopls Issues related to the Go language server, gopls. labels Jul 30, 2020
@drgrib
Copy link

drgrib commented Aug 3, 2020

This is also happening for me in a Python directory in which I have no .go files.

@stamblerre
Copy link
Contributor Author

stamblerre commented Aug 4, 2020

@drgrib: It sounds like you're seeing this error as a result of a different issue (unless you deleted a go.mod file in this directory). Do you mind filing a new issue so we can continue the discussion there?

@drgrib
Copy link

drgrib commented Aug 4, 2020

@stamblerre Actually, I just realized I had a subdirectory with a .go file in it I was unaware of, so I was mistaken.

@stamblerre
Copy link
Contributor Author

@drgrib: Ok. If there's still a problem, please file a new issue so we can discuss there.

@gopherbot
Copy link

Change https://golang.org/cl/261738 mentions this issue: gopls/internal/regtest: add a test for switching from modules to GOPATH

@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.5.2 Oct 13, 2020
@golang golang locked and limited conversation to collaborators Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants