-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Retract "Incompatible versions" of this package #965
Comments
Unfortunately, no way to remove version on Go module index server. https://index.golang.org/ |
The weird thing is, the Curiously, I would have expected issues due to v2.0.4 through v2.0.6, as these have go.mod files and thus are not |
Yeah, I guess that for v2.0.4 - v2.0.6 to be shown up on
I did some tests on https://play-with-go.dev/retract-module-versions_go116_en/ ,
→ In here, you can see that I tagged
→ In here, you can see that I retracted
→ In here, you can see that So, my suggestion for the
|
In addition to retracting a module, it is possible to deprecate it: https://golang.org/ref/mod#go-mod-file-grammar, "Deprecation" sub-header. I think the ideal solution could be:
|
@mattn is there a solution to this problem? I am stuck with this v2.0.3 version because it is referenced by some package deps I am using. But I must upgrade to v1.14.10 which I currently can not. |
@martinrode Does adding a |
Yes it does. I am using
From #modules in the Gopher Slack, Brian C. Mills added this: "Given that they appear to be planning to retract the bad version, an exclude seems more appropriate than a replace — in combination with module graph pruning (as of Go 1.17) it helps reduce the impact of the bad version on consumers of your module, if any." |
@AlekSi, However, |
(For mattn#965.) This retraction will take effect when this commit is included in the latest v1 release (presumably v1.14.11).
Is there any news on this issue? |
(For #965.) This retraction will take effect when this commit is included in the latest v1 release (presumably v1.14.11).
(For #965.) This retraction will take effect when this commit is included in the latest v1 release (presumably v1.14.11).
(For #965.) This retraction will take effect when this commit is included in the latest v1 release (presumably v1.14.11).
(For #965.) This retraction will take effect when this commit is included in the latest v1 release (presumably v1.14.11).
Now I retracted v2.0.0 - v2.0.6. |
Just out of curiosity, I was wondering why v1.14.10 can retract v2.0.3+incompatible. The document says:
Is v1.1.4.10 higher than v2.0.3+incompatibile? Thanks, |
|
My understanding is
Is that correct? |
Mostly yes, but if the highest However, if the higher
Correct. |
I think something is still off here. If I remove
from my go.mod file, my program is built using SQLITE version 3.31.1 (2 years old). With that line it build with the freshest SQLITE which is 3.39.2. So, I don't think this problem is fixed and the ticket should be re-opened. |
@martinrode, retracting erroneous releases does not change your own module's dependencies. To do that, first drop the
|
Ok, now I found the source of the problem. I had another replace in my go.mod
That line caused Go to pull SQLITE 3.31.1 even with the steps performed @bcmills suggested. Removing that
That is somehow unexpected. I must admit I really don't understand what is going on and which module has the right of way here. Its is very confusing to me. Why can Go not use the modules requested by 3rd party modules the way they require it? Why does a 3rd party module change the module which my program is using? I don't get the idea here. |
(For mattn#965.) This retraction will take effect when this commit is included in the latest v1 release (presumably v1.14.11).
@martinrode, when you run If you just want to lop out those parts of the dependency graph, you can use an
If you |
According to https://pkg.go.dev/github.com/mattn/go-sqlite3?tab=versions ,
there are 4 "Incompatible versions" of this package.
because of these,
In my project, I
go get
the latest release of this packagego get github.com/mattn/go-sqlite3@v1.14.8
But when I run some commands like
go mod tidy
orgo mod vendor
,Go modules automatically updates
go.mod
like this:github.com/mattn/go-sqlite3 v2.0.3+incompatible
which is what I don't want, because according to the README,
The text was updated successfully, but these errors were encountered: