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 stopped getting added to go.mod #31960

rsc opened this issue May 10, 2019 · 3 comments


None yet
5 participants
Copy link

commented May 10, 2019

I ran some go build commands just now in a new module and there is not a go version in my go.mod. There should be.

/cc @bcmills @jayconrod

@rsc rsc added this to the Go1.13 milestone May 10, 2019

@rsc rsc added the release-blocker label May 10, 2019


This comment has been minimized.

Copy link

commented May 10, 2019

That was an intentional change in behavior for #30790.

We now add the go directive only in go mod init and go mod tidy

@andybons andybons added the NeedsFix label May 13, 2019


This comment has been minimized.

Copy link

commented May 14, 2019

Per discussion with Russ, we should go with the alternative described in #30790 (comment): we should always write the go version if it isn't present.

@thepudds thepudds added the modules label May 14, 2019

@bcmills bcmills self-assigned this May 15, 2019


This comment has been minimized.

Copy link

commented May 15, 2019

Change mentions this issue: cmd/go: always add 'go' directive to the go.mod file if missing

@gopherbot gopherbot closed this in 48b7bdd May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.