-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
cmd/go: go env GOWORK
does not reflect -workfile
#51171
Comments
Change https://go.dev/cl/385659 mentions this issue: |
@matloob Do you think this needs to be fixed in 1.18 release? If so, please add release-blocker label, otherwise please move it to another milestone. (Edit: The CL that just came in suggests the former, so I'll apply the release-blocker label—please correct if needed.) Also CC @bcmills as cmd/go owner. |
We've realized that
I'm working on a CL to fix this. |
Change https://go.dev/cl/385995 mentions this issue: |
I'm a bit confused by this decision; was |
In contrast, setting |
Hmm. As far as I know it redirects reads as well as writes, no? But point taken that it can't be used to enter or leave a module. If the To close the loop in terms of avoiding misuse, I hope we would error out if a user attempts to do |
I think that would be reasonable. (For Go 1.19! 😉) |
Filed #51217 as a reminder, thanks! |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Set
-workfile=off
to disable go.work temporarily usinggo env -w
.I verified
go work
commands work as expected (iow ignoring thego.work
file).But,
go env GOWORK
still prints the ignoredgo.work
file.With this broken, there is no feedback that indicates whether
go.work
is affecting my build or not.What did you expect to see?
go env GOWORK
outputs the value reflecting the current-workfile
value.What did you see instead?
Unchanged behavior.
Similarly -
cc @matloob
The text was updated successfully, but these errors were encountered: