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: allowModfileModifications when using tempModFile or go.work #51056

Open
findleyr opened this issue Feb 7, 2022 · 3 comments
Open
Labels
gopls/workspace gopls NeedsInvestigation Tools
Milestone

Comments

@findleyr
Copy link
Contributor

@findleyr findleyr commented Feb 7, 2022

govim uses an internal gopls setting: tempModFile, along with allowModfileModifications. This appears to be recently broken, perhaps by https://go.dev/cl/382241.

Reported in slack, from their CI:

&protocol.LogMessageParams{Type:1, Message:"2022/02/07 17:40:55 imports fixes: AllImportsFixes: -modfile is unsupported for this Go version\n\tfile=\"/tmp/go-test-script3721705982/script-initial_open_go/main.go\"\n"}

To begin with, this error message is incorrect, as -modfile is supported.

Needs investigation, and should block gopls@v0.8.0

CC @myitcv @leitzler

@gopherbot gopherbot added Tools gopls labels Feb 7, 2022
@gopherbot gopherbot added this to the Unreleased milestone Feb 7, 2022
@findleyr findleyr added the NeedsInvestigation label Feb 7, 2022
@findleyr findleyr removed this from the Unreleased milestone Feb 7, 2022
@findleyr findleyr added this to the gopls/v0.8.0 milestone Feb 7, 2022
leitzler added a commit to govim/govim that referenced this issue Feb 7, 2022
The previous default value for for the config setting
ExperimentalAllowModfileModifications was "true", which isn't the
default value for gopls.

Enabling this setting causes issues with the new workspace mode in
gopls as described in #1112 and referred golang/go#48186. It also seem
to cause issues in upcoming Go 1.18, see golang/go#51056.

Closes #1112
leitzler added a commit to govim/govim that referenced this issue Feb 7, 2022
The previous default value for for the config setting
ExperimentalAllowModfileModifications was "true", which isn't the
default value for gopls.

Enabling this setting causes issues with the new workspace mode in
gopls as described in #1112 and referred golang/go#48186. It also seem
to cause issues in upcoming Go 1.18, see golang/go#51056.

Closes #1112
leitzler added a commit to govim/govim that referenced this issue Feb 21, 2022
The previous default value for for the config setting
ExperimentalAllowModfileModifications was "true", which isn't the
default value for gopls.

Enabling this setting causes issues with the new workspace mode in
gopls as described in #1112 and referred golang/go#48186. It also seem
to cause issues in upcoming Go 1.18, see golang/go#51056.

Closes #1112
@gopherbot
Copy link

@gopherbot gopherbot commented Feb 28, 2022

Change https://go.dev/cl/388436 mentions this issue: gopls/integration/govim: build gopls using go1.18rc1

gopherbot pushed a commit to golang/tools that referenced this issue Feb 28, 2022
Govim tests expect error messages to use 'any', so build gopls using the
RC.

For golang/go#51056

Change-Id: I0f8cab5d7eea3efbbd5b3f3dd9918e85831c2d50
Reviewed-on: https://go-review.googlesource.com/c/tools/+/388436
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
@findleyr
Copy link
Contributor Author

@findleyr findleyr commented Feb 28, 2022

I have confirmed that our gopls+govim CI is now passing (after updating our build to use RC1).

I think allowModfileModifications may still be buggy, but that shouldn't block the gopls@v0.8.0 release.

@findleyr findleyr removed this from the gopls/v0.8.0 milestone Feb 28, 2022
@findleyr findleyr added this to the gopls/v0.8.1 milestone Feb 28, 2022
@findleyr findleyr removed this from the gopls/v0.8.1 milestone Mar 7, 2022
@findleyr findleyr added this to the gopls/v0.8.2 milestone Mar 7, 2022
@findleyr findleyr removed this from the gopls/v0.8.2 milestone Mar 22, 2022
@findleyr findleyr added this to the gopls/on-deck milestone Mar 22, 2022
@findleyr findleyr changed the title x/tools/gopls: govim CI broken when using tempModfile+allowModfileModifications x/tools/gopls: allowModfileModifications when using tempModFile or go.work Mar 30, 2022
@findleyr
Copy link
Contributor Author

@findleyr findleyr commented Mar 30, 2022

Also reported in slack: allowModfileModifications breaks when using go.work:
https://gophers.slack.com/archives/CJZH85XCZ/p1648403482985169?thread_ts=1648402889.084469&cid=CJZH85XCZ

@findleyr findleyr added the gopls/workspace label May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gopls/workspace gopls NeedsInvestigation Tools
Projects
None yet
Development

No branches or pull requests

2 participants