-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: "v1.x.y is not a tag" when .gitconfig sets log.decorate
to full
#51312
Comments
Can you check what kind of tag |
v1.23.13 is a tag, not branch. |
@hidu, could you post the For example, for the
|
git ,is Annotated Tags,i create is by:
|
git ls-remote origin refs/tags/v1.23.13 |Please wait a moment... |
Hmm. Do I read correctly that the same commit is tagged with both Could you post (or would you be comfortable privately sending) the output of
|
v1.23.13, v1.23.14 is the same cimmit with go1.16.14 get -x mydomain.com/a/bnet@v1.23.13
the lastest version is |
Could you run Could you also check whether the issue reproduces with |
go1.18rc1 also reproduced |
go1.17.7 mod download -x mydomain.com/a/bnet@v1.23.13
|
Ok, so from that trace I would expect that Does the repo contain a |
yes , tag for the above test,
with go1.17.7 mod download -x mydomain.com/a/bnet@ repo bnet's
|
|
Right, the question is, why are we ending up with a pseudo-version for |
Why the error log shows v1.23.3 instead of v1.23.13 ? |
my mistake, the log is test with |
updates: Ok, I think the root cause is: multiple tags has same revision and the revToRev using "local cache" to reverse "rev->tag". Could you drop these lines? go/src/cmd/go/internal/modfetch/codehost/git.go Lines 506 to 510 in 3517036
and change into return r.stat(rev) reinstall go by execute twice |
@hidu, are the versions you're pasting above the exact versions from the tags, or are they redacted? If the version has a build-metadata suffix (like |
@hidu, one more thought. When you ran Could you try stepping through those |
Backport issue(s) opened: #51350 (for 1.16), #51351 (for 1.17). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases. |
Change https://go.dev/cl/387917 mentions this issue: |
log.decorate
to full
For 3 weeks I was wondering what happened that I started to have timeouts and errors on GO dependency resolution. All because of git configuration... Removing |
This fixes an obscure bug in 'go list -versions' if the repo contains a tag with an explicit "+incompatible" suffix. However, I've never seen such a repo in the wild; mostly it's an attempt to wrap my brain around the code and simplify things a bit for the future. Updates #51324 Updates #51312 Change-Id: I1b078b5db36470cf61aaa85b5244c99b5ee2c842 Reviewed-on: https://go-review.googlesource.com/c/go/+/387917 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org>
I'm seeing this error, too, but I don't have $ go get github.com/axiomhq/axiom-go/axiom@v0.10.0
go: github.com/axiomhq/axiom-go/axiom@v0.10.0: github.com/axiomhq/axiom-go@v0.10.0: invalid version: resolves to version v0.10.0-rc.2 (v0.10.0 is not a tag) This is on a machine I just set up from scratch and I'm trying to figure out the issue as this workflow has previously worked fine for me. Git version is |
@lukasmalkmus, please file a separate issue with steps to reproduce. |
@bcmills This issue is in the 1.19 milestone but I can't tell what the status is. Is there more to do here? Thanks. |
This has a fix CL pending Googler review; it should also be backported to Go 1.18 and 1.17 once the fix is merged. |
Change https://go.dev/cl/414874 mentions this issue: |
Change https://go.dev/cl/414875 mentions this issue: |
…ags for a commit This avoids a parse error when the user's global .gitconfig sets log.decorate to true. Updates #51312. Fixes #51351. Change-Id: Ic47b0f604c0c3a404ec50d6e09f4e138045ac2f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/387835 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> (cherry picked from commit a30f434) Reviewed-on: https://go-review.googlesource.com/c/go/+/414875
…ags for a commit This avoids a parse error when the user's global .gitconfig sets log.decorate to true. Updates #51312. Fixes #53588. Change-Id: Ic47b0f604c0c3a404ec50d6e09f4e138045ac2f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/387835 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> (cherry picked from commit a30f434) Reviewed-on: https://go-review.googlesource.com/c/go/+/414874
…ags for a commit This avoids a parse error when the user's global .gitconfig sets log.decorate to true. Updates golang#51312. Fixes golang#53588. Change-Id: Ic47b0f604c0c3a404ec50d6e09f4e138045ac2f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/387835 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> (cherry picked from commit a30f434) Reviewed-on: https://go-review.googlesource.com/c/go/+/414874
This avoids a parse error when the user's global .gitconfig sets log.decorate to true. Fixes golang#51312. Change-Id: Ic47b0f604c0c3a404ec50d6e09f4e138045ac2f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/387835 Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
Not Reproduced:
go1.14.15, go1.15.15, go1.18beta2
go1.16.13, go1.17.6
Reproduced:
go1.16.14, go1.17.7, go1.18rc1
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
mydomain.com/a/bnet
has tagv1.23.13
.mydomain.com/a/bnet
download direct:GONOPROXY="*mydomain.com*"
mydomain.com/myapp
requiremydomain.com/a/bnet@v1.23.13
go clean -modcache
mydomain.com/myapp
go version
,output:go version go1.16.14 darwin/amd64
go mod download
has error:go1.16.13 mod download
,there is no error, download successgo1.16.14 mod download
again, successthere was no useful error message, when exec
go mod doanload -x
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: