-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: spurious 'package provided […] but not at required version' error #31487
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
Could you try this at tip? The error message has improved a bit since 1.12. If you see something about a package being provided at the latest version but not the required version, then this is a dup of #30394. If you still see "looping trying to add package", please post minimal example we can use to reproduce this. I think with this particular repo, the problem is that the latest version |
lets see if I can find out who requires that version |
In the meantime I made a minimal example, but I'm also quite confused. I was able to reproduce my issue without even adding the problematic import above (haven't imported k8s' client-go package) Example Repo: https://github.com/dionysius/go-issue-31487
|
Here it is: https://github.com/kubernetes/apimachinery/blob/master/go.mod#L30 (for future lookups with commit id) finding out where the import comes from
And the highest tag in https://github.com/golang/text and https://go.googlesource.com/text is v0.3.0 as of now. So I go talk to the kubernetes devs ;) But for here just a little improvement request maybe: We don't see in the error where the request to v0.3.1 is actually coming from, |
Knowing the root cause the issue can be solved (for this current time) by referencing a tag of this repo where the go.mod is fine. e.g.
or as suggested earlier, running
Another observation/bug in
Confusion can now be explained myself: The original project repo exists since longer and thus the go.mod state is from somewhere long before 12 days ago. 12 days ago the kubernetes source got the -- Anyway, you can consider this issue closed if you don't want to investigate further about the other usage observations (source of the version conflict not shown [previous comment] , no error when the issue go.mod is the only imported repo using the faulty reference [this comment]) |
That's odd, because that package actually does exist at that revision: |
Yes and no. Yes, this issue is not about a missing package (so it's no dup of #30394). The no part is, that the version On my followup issue on the kubernetes repo I got a good answer pointing me to the right direction (I didn't know about that):
From there:
So what we basically have here, is, that If I do the here already suggested |
Using a pseudo-version for an untagged commit is fine and expected. The pseudo-version is (at least supposed to be) a well-defined semver prerelease string for the next possible release version, and MVS should sort it as such. The fact that it's made up shouldn't matter. However, sometimes there are bugs (like #30634) relating to how we treat the latest tagged version when we're ahead of it. Something similar is probably happening here. An error message indicating that that commit does not contain a package that it clearly does contain is definitely a bug. We should fix that bug. It's not obvious to me whether there is some other bug involved. |
Whatever the cause of the failure, I can no longer reproduce it.
I'm going to close this issue, but if you spot another instance of the |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes. 1.12.4 is currently the newest release at the time of this writing
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
before adding kubernetes' client-go, everything was fine
$ git status
Output$ go mod tidy
Output$ go mod graph
Outputmaking the changes...
$ git diff
Output$ go mod tidy
OutputSame applies when I delete go.mod and start from scratch.
What did you expect to see?
no error
What did you see instead?
error "looping trying to add package"
Edit, with
gotip
: package provided by [packagename] at latest version vX.Y.Z but not at required version vX.Y.(Z+1)But my main concern is:
I've read #30394 carefully but can't continue myself. I understand there might be tags/version conflicts in packages. But how can I solve them myself? Where to look? The error doesn't look like it's the source of the problem, how can I find the source issue?
The text was updated successfully, but these errors were encountered: