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

Install issue between version 2.7.0 and v2.7.3 #335

Open
viceice opened this issue Apr 12, 2024 · 10 comments
Open

Install issue between version 2.7.0 and v2.7.3 #335

viceice opened this issue Apr 12, 2024 · 10 comments

Comments

@viceice
Copy link

viceice commented Apr 12, 2024

We're trying to automatically upgrade this package1

so we used go install github.com/editorconfig-checker/editorconfig-checker/cmd/editorconfig-checker@2.7.0 before which works.
since v2.7.3 we need to switch to go install github.com/editorconfig-checker/editorconfig-checker/v2/cmd/editorconfig-checker@v2.7.3.

What's the reason to add the v2 after the name? it seems to be a breaking change for the v2 module.

Footnotes

  1. https://codeberg.org/forgejo/forgejo/pulls/3178

@viceice
Copy link
Author

viceice commented Apr 12, 2024

That seems to be the breaking change 😕

@viceice
Copy link
Author

viceice commented Apr 12, 2024

and the upgrade from v2.7.3 to 2.8.0 will be broken again, because the change wasn't released there 😕

@viceice
Copy link
Author

viceice commented Apr 12, 2024

I think the best would be to delete v2.7.3 or unlist it here https://pkg.go.dev/github.com/editorconfig-checker/editorconfig-checker/v2

@viceice
Copy link
Author

viceice commented Apr 12, 2024

another issue is that v3 isn't available on pkg.go.dev

@mstruebing
Copy link
Member

Hey @viceice how does a package get published on pkg.go.dev? I think I've never submitted it there.

@viceice
Copy link
Author

viceice commented Apr 12, 2024

i think they get automatically grabbed when properly defined. your v3 releases can't be installed via go install because the module version suffix is still v2 you should release a new v3 with that changed to v3

module github.com/editorconfig-checker/editorconfig-checker/v2

this version always need to correspond with your major version github tags / releases

@viceice
Copy link
Author

viceice commented Apr 12, 2024

also your version 2.8.0 isn't visible because of the missing v on the git tag

@viceice
Copy link
Author

viceice commented Apr 12, 2024

so you should publish a new v2.8.1 from the 2.8.0 or just add the v2.8.0 tag to the same commit and update the github release.

@silverwind
Copy link
Contributor

silverwind commented Apr 12, 2024

I think the best would be to delete v2.7.3 or unlist it here https://pkg.go.dev/github.com/editorconfig-checker/editorconfig-checker/v2

It's a common misconception, but go package versions can not really be deleted because go proxies already have them in cache and that cache is immutable. Just publish a fixed patch release instead.

Deleting a git tag would only break it more because then people behind a go proxy that does not have the cache entry will get a broken install. Just never delete tags on a go package repo please.

@greut
Copy link
Contributor

greut commented Apr 17, 2024

It's a common misconception, but go package versions can not really be deleted because go proxies already have them in cache and that cache is immutable. Just publish a fixed patch release instead.

Indeed, but they can be retracted: https://go.dev/doc/modules/gomod-ref#retract

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

No branches or pull requests

4 participants