-
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: updates to go.sum needed, disabled by -mod=readonly with experimentalWorkspaceModule #46061
Comments
Logs of gopls(server) with
|
Thank you for the report. I agree that this is probably a dupe of #44097, but the resolution there was to improve the quick fix. Perhaps it needs more refinement, so let's keep this open.
It should be possible to fix this error without deleting one of the modules. Do you get a quick fix on the |
I do see a
|
For what it's worth, that's not the error from the tidy command. The code lenses to fix the error should still work. I see from your logs that you ran the For completeness, did you try running the And what about tidying your modules manually from the command line (i.e. running |
Yep, I tried but didn't work.
Also didn't work.
I really look forward to it! Currently, this bug can be reproduced in any project including mutiple go modules, such as Kubernetes. |
I was able to reproduce this using the repository in the logs above (it is public): https://github.com/pingcap/tidb-operator. The |
I've spent some time investigating this and haven't fully understood it yet. I've been running some |
A good next step would be to reproduce this with the |
I would expect this to be resolved now when using go.work. |
how to fix it? I have same problem |
@strugglehonor are you using |
@strugglehonor @findleyr go.work is almost the perfect solution for multiple modules and I've used it with gopls and VSCode for about 1 month, although sometimes packages with different version may conflict which is acceptable for me. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
The issue I encountered may be the same as #44097.
VSCode settings for gopls:
There are 2 go modules in my project, and VS Code prompt that
go.sum is out of sync with go.mod. Please update it by applying the quick fix.
, but I can't fix it unless I delete one of the them.What did you expect to see?
Figure it out and fix this problem in a graceful way.
The text was updated successfully, but these errors were encountered: