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

Go module go directive #395

Closed
kpurdon opened this issue Mar 13, 2019 · 3 comments
Closed

Go module go directive #395

kpurdon opened this issue Mar 13, 2019 · 3 comments

Comments

@kpurdon
Copy link
Contributor

kpurdon commented Mar 13, 2019

Following up on #394 I wanted to track figuring out how to properly set the go directive.

An issue has been filed that provides some clarity.

Of note:

The basic guideline is fairly simple: a "go" directive 1.N means that the code in that module is permitted to use language features that existed in 1.N even if those features were removed in later releases of the language.

So the directive is really important only after features are removed from Go in a new version. Since this is not an issue currently I think we should set the directive to the current version go 1.12.

The only thing to note is that there was a bug in Go 1.11.0 -> 1.11.3 (fixed in 1.11.4) that prevents builds for modules with the go 1.12 directive. I'm personally OK with that, but it's not my call.

Again, happy to open a PR, wanted to raise the issue first.

@kpurdon
Copy link
Contributor Author

kpurdon commented Mar 13, 2019

I guess to add to this the README states:

This library supports two most recent Go release series, currently 1.10 and 1.11.

So perhaps this directive should be go 1.11 and 1.10 support should be dropped. Then update to go 1.12 when 1.13 is released and 1.11 is dropped, ...

@streadway
Copy link
Owner

Is a viable alternative to only add the go 1.12 directive to the go.mod when version 1.14 is released and leave it empty until then?

@kpurdon
Copy link
Contributor Author

kpurdon commented Apr 4, 2019

I'd suggest just leaving it as is, and then updating to go 1.12 when 1.13 is released and this module drops <1.12 support.

@kpurdon kpurdon closed this as completed Dec 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants