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
Assignees
Labels
Milestone

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Oct 6, 2020

-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 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

@gopherbot gopherbot commented Oct 16, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.