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 Modules support for v2.2.4 #554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

atavakoliyext
Copy link

@atavakoliyext atavakoliyext commented Apr 6, 2021

The differences between this and the configuration provided in
claat/v2.2.3:

  • This was built on tag v2.2.4 (via go mod init, copying the claat/v2.2.3 go.mod content, and go mod tidy)
  • This defines the name with the required major-version suffix (/v2)

@atavakoliyext
Copy link
Author

The main motivation for this was to allow the claat module to be usable as a dependency in other modules, which is currently not possible due to the module name not having the correct major-version suffix, producing errors of the form:

go: github.com/googlecodelabs/tools/claat/v2@v2.2.3: claat/go.mod has non-.../v2 module path "github.com/googlecodelabs/tools/claat" (and .../v2/go.mod does not exist) at revision claat/v2.2.3

To avoid the issues that motivated reverting claat/v2.2.3, would it be possible to have this commit live on a different branch created at tag v2.2.4? I don't believe there's a way to create a new branch in a PR, but I can edit my PR if this approach is deemed ok.

Hopefully at some point module support can exist on the master branch.

@atavakoliyext atavakoliyext marked this pull request as ready for review April 6, 2021 21:20
All tools/claat imports are updated to contain the required /v2
major-version suffix (https://golang.org/ref/mod#major-version-suffixes).
The lack of this suffix prevented other modules from being able to import
the previous stable release of this module at tag claat/v2.2.3.
@cassierecher
Copy link
Contributor

I was able to create a module for the project on the master branch, though it does not make reference to the version number. I am not very familiar with the Go modules system; is this sufficient for your use case?

@@ -14,6 +14,7 @@ before_install:
./install.sh --user

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • [ ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants