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

fix(golang): Repository are incorrectly tagged #27

Merged
merged 2 commits into from
Feb 2, 2021

Conversation

iliapolo
Copy link
Contributor

@iliapolo iliapolo commented Feb 2, 2021

Added a module prefix to the tag. Either this, or a major version subdirectory is necessary for modules with a major version higher than 1 - we opted to use tag prefixes.

https://research.swtch.com/vgo-module#multiple-module_repositories

This means that if a repository has multiple modules, it will have multiple tags for each version.

Example dry run:

===========================================
            🏜️ DRY-RUN MODE 🏜️
===========================================
Cloning target repository aws/constructs-go
Cloning into '/var/folders/mb/5zx1h88x2891nhk4qpr6_zc8jcqzm6/T/tmp.Rzb5CmkP/repo'...
remote: Enumerating objects: 53, done.
remote: Total 53 (delta 0), reused 0 (delta 0), pack-reused 53
Unpacking objects: 100% (53/53), done.
/var/folders/mb/5zx1h88x2891nhk4qpr6_zc8jcqzm6/T/tmp.Rzb5CmkP/repo ~/dev/src/github.com/aws/constructs
Already on 'main'
Your branch is up to date with 'origin/main'.
Removing /var/folders/mb/5zx1h88x2891nhk4qpr6_zc8jcqzm6/T/tmp.Rzb5CmkP/repo/constructs
Copying go modules to repository root
[main 886b5aa] chore(release): 1.1.0
 7 files changed, 3269 insertions(+), 3683 deletions(-)
 rewrite constructs/jsii/tarball.embedded.go (95%)
 delete mode 100644 constructs/local.go.sum
Will create tag: constructs/v1.1.0
Will push to branch: main
~/dev/src/github.com/aws/constructs

@iliapolo iliapolo requested a review from eladb February 2, 2021 12:36
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Feels like we can simplify - if each module could have a different version now, we can remove the validation that all modules use the same version, no?

@iliapolo
Copy link
Contributor Author

iliapolo commented Feb 2, 2021

Feels like we can simplify - if each module could have a different version now, we can remove the validation that all modules use the same version, no?

@eladb Do we want to support multiple versions now as well? I was thinking to just stick to a single version for now. Not sure adding this use-case will simplify...lets address it when we decide to support it and have consumers to test it.

Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

Let's consider supporting multiple versions in a subsequent commit. I believe it will simplify, but I don't really care right now.

@eladb eladb merged commit 786e503 into master Feb 2, 2021
@eladb eladb deleted the epolon/golang-prefix-tag-with-module-name branch February 2, 2021 12:59
eladb pushed a commit to projen/projen that referenced this pull request Feb 2, 2021
campionfellin pushed a commit to campionfellin/projen that referenced this pull request Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants