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

Closed
rsc opened this issue May 10, 2019 · 3 comments
Closed

cmd/go: go version stopped getting added to go.mod #31960

rsc opened this issue May 10, 2019 · 3 comments
Assignees
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc 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
@bcmills

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

@bcmills bcmills 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
@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented May 15, 2019

Change https://golang.org/cl/176925 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
mark-rushakoff added a commit to influxdata/influxdb that referenced this issue May 28, 2019
As of golang/go#31960, go1.13 (or tip) will always add the go directive
to go.mod. Add it now as go 1.12 so that we don't have churn later as
people start using 1.13, before we're ready to officially switch to
building influxdb with 1.13.
mark-rushakoff added a commit to influxdata/influxdb that referenced this issue May 28, 2019
As of golang/go#31960, go1.13 (or tip) will always add the go directive
to go.mod. Add it now as go 1.12 so that we don't have churn later as
people start using 1.13, before we're ready to officially switch to
building influxdb with 1.13.
mark-rushakoff added a commit to influxdata/influxdb that referenced this issue May 29, 2019
As of golang/go#31960, go1.13 (or tip) will always add the go directive
to go.mod. Add it now as go 1.12 so that we don't have churn later as
people start using 1.13, before we're ready to officially switch to
building influxdb with 1.13.
mark-rushakoff added a commit to influxdata/influxdb that referenced this issue May 29, 2019
As of golang/go#31960, go1.13 (or tip) will always add the go directive
to go.mod. Add it now as go 1.12 so that we don't have churn later as
people start using 1.13, before we're ready to officially switch to
building influxdb with 1.13.
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
5 participants
You can’t perform that action at this time.