-
Notifications
You must be signed in to change notification settings - Fork 144
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
Prepare for Go 1.11 modules #505
Conversation
Initialize go.mod file to support Go 1.11 modules. We don't have any non-standard dependencies so our go.mod and go.sum are mostly empty. Having this file in the repository will allow users to fetch GoThemis using module system, pin versions, etc. Since GoThemis and Themis core are still v0.XX, we can ignore all "v2+ modules" thingies in Golang. From semver point of view Themis has major version v0 and there are no compatibility guarantees between versions. Note that modules are not immediately available with versioning. We still need to release v0.12 and tag it in a proper way.
gothemis/go.mod
Outdated
@@ -0,0 +1,3 @@ | |||
module github.com/cossacklabs/themis/gothemis | |||
|
|||
go 1.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I remember, this line adds the requirement of golang version and users with go_version != 1.12 will take errors.
we don't have any dependencies for specific go version or specific code. so I think we can drop this line, leave only module github.com/....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go mod init
inserted this line so I though it's okay to keep it. The docs say that it should be fine if the code actually compiles, except for Go versions 1.11~1.11.3 which will be broken.
I agree that we should drop this line until we have a minimum required version on Golang that we support.
I'm not a Go master, it's all up to @Lagovas |
Don't specify "go" directive to avoid breaking some 1.11.* versions of Golang [1]. Currently we don't have a minimum required version of Go. [1]: https://golang.org/doc/go1.12#modules
shall we update Go examples or installation guide to show that modules are supported? |
Initialize go.mod file to support Go 1.11 modules. We don't have any non-standard dependencies so our go.mod and go.sum are mostly empty.
Having this file in the repository will allow users to fetch GoThemis using module system, pin versions, etc.
Since GoThemis and Themis core are still v0.XX, we can ignore all "v2+ modules" thingies in Golang. From semver point of view Themis has major version v0 and there are no compatibility guarantees between versions.
Note that modules are not immediately available with versioning. We still need to release v0.12 and tag it in a proper way.