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 go.mod to retract the v1.14.0 #44

Closed
wants to merge 2 commits into from
Closed

Conversation

lor00x
Copy link
Contributor

@lor00x lor00x commented Apr 20, 2024

The Go Modules References still shows the v1.14.0 as the latest version, so the retract directive did not work.

https://pkg.go.dev/github.com/zc2638/swag?tab=versions

This is disturbing, getting the latest version with this command would retrieve the v1.14.0 instead of the v.1.6.0:
go get github.com/zc2638/swag@latest

Some of my students and myself spent an hour figuring why the library was not working before realizing we retrieved an incorrect version.

Maybe grouping the retract directives would work ?

@zc2638 : the Go Modules References still shows the v1.14.0 as the latest version, so the retract directive did not work.

➡ https://pkg.go.dev/github.com/zc2638/swag?tab=versions

This is disturbing, getting the latest version with this command would retrieve the v1.14.0 instead of the v.1.6.0:
`go get github.com/zc2638/swag@latest`

Some of my students and myself spent an hour figuring why the library was not working before realizing we retrieved an incorrect version.

Maybe grouping the retract directives would work ?
@zc2638
Copy link
Owner

zc2638 commented Apr 22, 2024

https://go.dev/ref/mod#go-mod-file-retract

I checked the relevant instructions and it said that they can be separated into multiple lines.
I guess there are other questions.
@lor00x

@zc2638
Copy link
Owner

zc2638 commented Apr 22, 2024

To retract a version, a module author should add a retract directive to go.mod, then publish a new version containing that directive. The new version must be higher than other release or pre-release versions; that is, the @latest version query should resolve to the new version before retractions are considered.

This is described in the document, so the withdrawal of v1.14.0 cannot take effect until a version greater than v1.14.0 is released and go.mod contains retract.

@lor00x
Copy link
Contributor Author

lor00x commented May 1, 2024

Ok, that makes sense, thank you for the clarification.

@lor00x lor00x closed this May 1, 2024
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