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 (and friends): separate -modfile and -mod out of build flags #41826

Closed
stamblerre opened this issue Oct 6, 2020 · 1 comment
Closed
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

-modfile and -mod are passed to the Go command via BuildFlags, but the usage of these flags varies across the different go subcommands -- they are not always needed/supported. We should refactor the goimports ProcessEnv, go/packages Config, and gocommand Invocation to have separate ModFile and Mod fields that aren't part of BuildFlags.

/cc @heschik

@stamblerre stamblerre added this to the gopls/v1.0.0 milestone Oct 6, 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 Oct 6, 2020
gopherbot pushed a commit to golang/tools that referenced this issue Oct 8, 2020
This is a temporary fix--golang/go#41826 is a better approach.

Fixes golang/go#41803

Change-Id: Ia055c5e171fe5d4f6d67e9e2e9e7c85fe254605e
Reviewed-on: https://go-review.googlesource.com/c/tools/+/260000
Trust: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
@gopherbot
Copy link

Change https://golang.org/cl/263213 mentions this issue: all: use explicit -mod, -modfile fields for gocommand.Invocation

@stamblerre stamblerre modified the milestones: gopls/v1.0.0, gopls/v0.5.2 Oct 19, 2020
@golang golang locked and limited conversation to collaborators Oct 19, 2021
@rsc rsc unassigned heschi Jun 23, 2022
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