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

Update imports for v2 compatibility #79

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Update imports for v2 compatibility #79

merged 1 commit into from
Feb 22, 2022

Conversation

saley89
Copy link
Contributor

@saley89 saley89 commented Feb 18, 2022

For #77

This resolve the go install issue and honours go package structure correctly now. Essentially when the git versioning moved to v2.X.X we should have introduced /v2 into the module name. There are various ways to package it up when this happens including having all of the V1 code at root and then having a copy go into a v2 subfolder and development continue in there, with the v1 root being for backwards compatibility.

However, I believe we only want one version of the code in our master. As such, this PR moves the module entirely to v2. Thus, go install now works as expected using this:

go install github.com/sky-uk/osprey/[email protected]

Indeed you can even use @latest and it will find the current v2.8.0 version:

go install github.com/sky-uk/osprey/v2@latest

The previous command will always find v1.5.0 as that is the "latest" version of v1:

go install github.com/sky-uk/osprey@latest

Please let me know your thoughts on the above and if we are happy to merge this in.

Possible useful docs -> https://go.dev/blog/v2-go-modules

@saley89 saley89 linked an issue Feb 18, 2022 that may be closed by this pull request
Copy link
Contributor

@aecay aecay left a comment

Choose a reason for hiding this comment

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

seems correct to me -- aiui this is the (or a) correct way to release v2 of a go program. dunno if you want to wait for more reviews/consensus before merging in but i'm personally happy with it.

Copy link
Contributor

@howardburgess howardburgess left a comment

Choose a reason for hiding this comment

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

Looks good to me. I agree, no need to keep v1 hanging around too.

@saley89 saley89 merged commit c72b543 into master Feb 22, 2022
@saley89 saley89 deleted the v2 branch February 22, 2022 08:44
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.

It's not possible to install with go install
4 participants