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

Prepare for Go 1.11 modules #505

Merged
merged 2 commits into from
Jul 23, 2019
Merged

Prepare for Go 1.11 modules #505

merged 2 commits into from
Jul 23, 2019

Conversation

ilammy
Copy link
Collaborator

@ilammy ilammy commented Jul 22, 2019

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.

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.
@ilammy ilammy added the W-GoThemis 🐹 Wrapper: GoThemis, Go API label Jul 22, 2019
@ilammy ilammy requested review from vixentael and Lagovas July 22, 2019 16:38
gothemis/go.mod Outdated
@@ -0,0 +1,3 @@
module github.com/cossacklabs/themis/gothemis

go 1.12
Copy link
Collaborator

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/....

Copy link
Collaborator Author

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.

@vixentael
Copy link
Contributor

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
@ilammy ilammy merged commit 1292c9d into cossacklabs:master Jul 23, 2019
@ilammy ilammy deleted the go-modules branch July 23, 2019 15:30
@vixentael
Copy link
Contributor

shall we update Go examples or installation guide to show that modules are supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
W-GoThemis 🐹 Wrapper: GoThemis, Go API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants