-
-
Notifications
You must be signed in to change notification settings - Fork 690
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
Use VCS module paths in Go reference from Gherkin => Messages #1608
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d47fb46
Also rebuild go packages if go.mod changes
mattwynne e0d826e
Attempt to use a VCS path to reference gherkin->messages in Go
mattwynne 16b27f1
Point go module paths to monorepo
mattwynne a209e3a
Merge branch 'main' into 1550-use-vcs-module-refs-in-go
mattwynne 2c59f01
Merge branch '1550-define-go-modules-inside-monorepo' into 1550-use-v…
mattwynne 6025eb7
Update Go module refs from gherkin->messages
mattwynne 4555af3
Update Go module refs from demo-formatter -> messages
mattwynne 758575e
Update Go module refs from json-formatter -> messages
mattwynne d2a7a54
Fix Go module self-references
mattwynne 8773fec
Merge branch '1550-define-go-modules-inside-monorepo' into 1550-use-v…
mattwynne 458f217
Merge branch 'main' into 1550-use-vcs-module-refs-in-go
mattwynne 85f1484
Use main branch again in Go module refs
mattwynne File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
There is no Git tag named
v16.0.0
in the monorepo. all tags are of the formlibrary/version
, so you need to use something like this:I haven't tested if this is valid go module syntax. If it isn't, we have to start using a different naming scheme for tags - perhaps with a hyphen or dot instead of a slash,
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.
It seems to have ways of inferring the tag from the version string that I can't quite fathom yet. If you see the first error (
...at revision messages/v16.0.0
) it seems to have figured out the tag name and found it, but it has the wrong path to the actualgo.mod
file (missing github.com/cucumber/common/messages/go.mod
)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.
In the second case it makes a different guess for the tag name, and can't find it in git:
unknown revision messages/go/v16.0.0
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 look for the module on the master branch.
But it does not exist (yet) because messages/go.mod still have
module github.com/cucumber/messages-go/v16
with the following in
gherkin/go/go.mod
I was able to have a coherent error message:I think we will have to update the modules like the following (in
messages/go/go.mod
):So we may need at least 2 PR to make it work:
The first one updating all go.mod replacing the module path from the subrepos to the appropriate monorepo sub-directory (for example
module github.com/cucumber/messages-go/v16
=>module github.com/cucumber/common/messages/go/v16
)Then a second PR to update all the go
require
directive to point to the new location.