-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: graph pruning not applied during 'go get' #55955
Comments
Hello faced the same issue and it is really difficult when we have multiple dependent packages using same modules. |
I'm bumping into this weekly. I don't know if it's also the cause, but |
Yep. I'm still actively working on it. Unfortunately |
Does this same thing (the pruning issue) occur for |
@anacrolix, only |
I've mailed CL 471595 with a proposed fix. Folks who are affected by this bug: please try out a build with that change (either now or after it is merged) and let me know if any problems remain. That change may also fix some of the “infinite hang” problems, since it fixes a source of errors in the build list. (go get iterates until the build list stabilizes, and I observed some infinite loops in testing caused by pruned dependencies being reintroduced or repeatedly re-eliminated.) |
Change https://go.dev/cl/471595 mentions this issue: |
@bcmills The CL fixes this issue, and all the issues I've linked from here. |
@bcmills will this fix be back ported to Go 1.19? |
That's not clear to me at this time. In principle it could be (I don't expect significant conflicts in the backport change), but it's a very large change. On the other hand, almost all of the change is isolated within |
@gopherbot, please backport to Go 1.19 and 1.20. This bug causes |
Backport issue(s) opened: #60159 (for 1.19), #60160 (for 1.20). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
golang/go#55955 This was causing the unknown revision errors trying to build from lantern-desktop. I think it has to be crushed upstream everywhere until it goes away.
I suspect that I hit golang/go#55955 , because I was seeing the following ``` $ go get github.com/matrix-org/sliding-sync@main go: github.com/matrix-org/[email protected]: invalid version: unknown revision 008239d3b6e7 ``` Remedy: - `go mod edit -exclude=github.com/matrix-org/[email protected]` - `go get github.com/matrix-org/complement@main`
When I tried to `go get` this project, I saw: ``` $ go get github.com/matrix-org/sliding-sync@main go: github.com/matrix-org/[email protected]: invalid version: unknown revision 008239d3b6e7 ``` I suspect that I hit golang/go#55955? Not sure. Changes here generated by: - `go mod edit -exclude=github.com/matrix-org/[email protected]` - `go get github.com/matrix-org/complement@main` - `go mod tidy` go mod tidy
(Found while investigating anacrolix/torrent#776.)
If I set
GOPRIVATE=github.com/anacrolix
and rungo get github.com/anacrolix/dht/[email protected]
, I get an invalid-version error for a pseudo-version that no longer exists (the commit may have been removed by a force-push).However, if I run the same command using
proxy.golang.org
, the operation succeeds. That isn't surprising in and of itself, because the proxy has the pseudo-version cached. What is surprising is that the invalid version is not actually in the final module graph:If I clone the repo, check out
v2.19.0
, and rungo mod tidy
, it appears to be tidy and indeed does not depend in any way onv2.15.2-0.20220123034220-0538803801cb
.This suggests that there is a bug somewhere in
go get
that is causing it to follow dependency edges that should actually be pruned out.The text was updated successfully, but these errors were encountered: