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

Add go/ prefix to release tags #2592

Closed
ravenac95 opened this issue Jan 24, 2020 · 3 comments · Fixed by #3242
Closed

Add go/ prefix to release tags #2592

ravenac95 opened this issue Jan 24, 2020 · 3 comments · Fixed by #3242
Assignees
Labels
c:ops Category: operations golang

Comments

@ravenac95
Copy link
Contributor

ravenac95 commented Jan 24, 2020

In order to allow for go.mod to properly use tags when resolving oasis-core as a dependency it seems we must include go/ as a prefix in our tags. This is an excerpt from the the golang docs:

A new module version may be published by pushing a tag to the repository that contains the module source code. The tag is formed by concatenating two strings: a prefix and a version.

The version is the semantic import version for the release. It should be chosen by following the rules of semantic import versioning.

The prefix indicates where a module is defined within a repository. If the module is defined at the root of the repository, the prefix is empty, and the tag is just the version. However, in multi-module repositories, the prefix distinguishes versions for different modules. The prefix is the directory within the repository where the module is defined. If the repository follows the major subdirectory pattern described above, the prefix does not include the major version suffix.

For example, suppose we have a module example.com/repo/sub/v2, and we want to publish version v2.1.6. The repository root corresponds to example.com/repo, and the module is defined in sub/v2/go.mod within the repository. The prefix for this module is sub/. The full tag for this release should be sub/v2.1.6.

See here for full details

@david-yan and I ran into this issue when trying to use oasis-core as a library in oasislabs/staking-transaction-client

I propose we make it so that our tags can be properly used by go modules by tagging our releases both as vYY.x.y and go/vYY.x.y.

@tjanez tjanez added c:ops Category: operations golang labels Jan 24, 2020
@kostko
Copy link
Member

kostko commented May 11, 2020

This doesn't seem to work (as reported here: oasisprotocol/oasis-rosetta-gateway#4 (comment)) even though the go/v20.6 tag exists:

It doesn't: no matching versions for query "v20.6" :(

The hash that's currently there points to the v20.6 release, though, so it should be equivalent. Would be nice to have the tag working, though.

Also by reading the linked guide it seems that Go mandates semver, while we explicitly do not use semver and use calver instead. This may make some things annoying.

@kostko
Copy link
Member

kostko commented Aug 24, 2020

This has been worked around by using tags in the form of go/v0.20.9 (e.g., all our calver versions map under 0.*). We should update the tag-next-release target to also generate Go-specific tags.

@kostko kostko linked a pull request Sep 7, 2020 that will close this issue
@tjanez
Copy link
Member

tjanez commented Sep 9, 2020

We should update the tag-next-release target to also generate Go-specific tags.

This has been implemented in #3258.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c:ops Category: operations golang
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants