-
Notifications
You must be signed in to change notification settings - Fork 18.1k
x/tools/gopls: remove the "allowModfileModifications" setting #65546
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
Comments
After adding the related setting in the gopls section I still have the same error. settings.json {
...
"gopls": {
"build.allowModfileModifications": false
}
} A VSCode restart didn't solve. |
Using CoC on neovim, if I don't use this setting, I need to close, then So, maybe it's necessary, or, if not, having a workaround for this. |
A couple comments:
In general, the behavior of letting the go command mutate the mod file is not well supported. It is bad behavior for a language server to modify file content without an explicit user action. |
@tuxerrante sorry I don't understand what you're saying. I think you want the nagging warning to go away? In that case, please remove this setting from your settings.json file. |
I had the issue already before adding that setting. |
@tuxerrante, with empty |
Change https://go.dev/cl/579435 mentions this issue: |
It was hidden in the user settings under AppData, not sure which plugin could have created it. |
Removing this completely breaks autocomplete for me in vscode due to private repos and the way that we are using the go project we have with bazel and generated code. Please add this setting back to future versions of gopls or something like it to restore autocomplete functionality. |
For now, I am downgrading to v0.15.0 to restore functionality. |
@jabbottn sorry to hear that, but we really can't support a setting like "allowModfileModifications", as breaks the principle that clients have control over state changes, and introduces quite a bit of complexity into gopls. Can you share more about your workflow so that we can understand how best to accommodate it? Can you insert a |
Following up on #56570, we should remove the deprecated allowModFileModifications setting.
Quoting: #56570 (comment):
I don't think this setting works well, so I don't see how it could be useful to any users. However, if you need this setting, please explain why!
The text was updated successfully, but these errors were encountered: