-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: get panics with "can't find reason for requirement on" #47979
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
Comments
FYI, I met an identical issue.
to reproduce the issue:
panic
|
@ash2k, thanks for the detailed steps to reproduce! I can reproduce the panic with a
I'll investigate, and I should have a fix for either 1.17.1 or (possibly) 1.17.2. |
Somehow
There really doesn't seem to be any reason to reject |
Ah, I think I've got it!
We have an existing indirect dependency on
When we upgrade to |
Yes, I was trying to see if module graph pruning helps to reduce the number of dependencies. Thanks for investigating this! |
Change https://golang.org/cl/347290 mentions this issue: |
@gopherbot, please backport to Go 1.17. This is a |
Backport issue(s) opened: #48156 (for 1.17). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
I have a fix, and I expect that it should land for Go 1.17.1. (I also verified that it fixes the crash reported by @thomaspeugeot.) Thanks again for the detailed steps to reproduce the bug! |
:-) thks |
Change https://golang.org/cl/348411 mentions this issue: |
… root paths when raising version limits in editRequirements Updates #47979 Fixes #48156 Change-Id: I1d9d854cda1378e20c70e6c6789b77e42e467ca7 Reviewed-on: https://go-review.googlesource.com/c/go/+/347290 Trust: Bryan C. Mills <[email protected]> Run-TryBot: Bryan C. Mills <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Jay Conrod <[email protected]> (cherry picked from commit 409434d) Reviewed-on: https://go-review.googlesource.com/c/go/+/348411
Works fine with 1.17.1. Thks a lot & congrats ! |
A very similar issue is present again on 1.18, though:
It does not happen on an empty repo created just to reproduce the issue, but only on larger ones with many other dependencies. |
@fgm, please file a new issue with concrete steps to reproduce the failure. (A standalone repo that reproduces it would be ideal, even if it isn't minimal.) |
@bcmills sorry, I spent a couple of hours trying to reproduce it without involving proprietary repos without success, so I worked around it by editing the go.mod manually then doing a go mod tidy, which allowed the update to pass. I'm wondering if your 1.17 fix for that issue was really forward ported to 1.18 ? |
I just tried 1.19 and it also has this issue, don't have steps to repro as it happens on a private repo |
Also got this shortly after upgrading to 1.19 (but never before, so it feels like a 1.19 regression). I solved it by manually deleting all |
FYI, I met an identical issue.
|
@Richard1ybb, @jdemeyer: if you're observing these errors on a current Go release, please file a new issue with steps to reproduce it. (It seems likely that there is still a bug here, but the code is complex enough that we're unlikely to find it by just reading through the code.) |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I'm trying new pruned modules functionality to see if it helps reduce the number of tracked dependencies in my project.
go1.17 mod tidy -compat=1.17
. I had to change thego
directive ingo.mod
to1.17
manually, re-run the command, and only then it worked - is this expected? Pushed this into a branch (commit).go1.17 mod tidy
(without-compat=1.17
) and indeed there was a new change (commit). I pushed it too.go get
in my project:The second time it actually was not crashing immediately but after a few seconds (looks like it downloaded the library this time) it still did.
Here is the commit in my project, on which I'm trying to run the above commands and it crashes.
What did you expect to see?
No crashes. If something is wrong with my modules or their dependencies, a comprehensible error.
What did you see instead?
See above.
The text was updated successfully, but these errors were encountered: