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

cmd/go: go version is added even when there are no other changes #32889

Closed
rogpeppe opened this issue Jul 2, 2019 · 1 comment
Closed

cmd/go: go version is added even when there are no other changes #32889

rogpeppe opened this issue Jul 2, 2019 · 1 comment
Labels

Comments

@rogpeppe
Copy link
Contributor

@rogpeppe rogpeppe commented Jul 2, 2019

Under Go 1.12.6, compiling this program will leave the go.mod file untouched. Under Go tip (go version devel +d410642f49 Mon Jul 1 21:30:23 2019 +0000 linux/amd64), a go 1.13 line is added to the end of the go.mod file.

This is annoying when compiling older Go programs, as it always leaves the repository dirty, so doing:

 git checkout oldversion
 go build

will require a git reset --hard, even though the go.mod file was fully resolved.

I'd like to suggest that if the versions remain unchanged (as they should with MVS), the go.mod file should remain unchanged too.

@rogpeppe rogpeppe added the modules label Jul 2, 2019
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 2, 2019

That's what we did for #30790, but not how the go directive was intended to work. See #31960.

@bcmills bcmills closed this Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.