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 |
there is no suffix in the tag, see #51312 (comment)
same
I've checked it, the results are all right I'm debugging too witth func:
go1.16.13, go1.16.14 all have the same input:
|
Yeah, the tags returned by the |
@mengzhuo |
i found it @bcmills
with
without
but only support like this:
|
Neato! Thinking about how to fix it — by any chance, do you have the (We're constantly running into issues from unanticipated formatting options leaked from user's global configs. |
yes, i have:
|
Maybe we should copy repo base config to override global settings
Bryan C. Mills ***@***.***>于2022年2月24日 周四12:55写道:
… Neato! Thinking about how to fix it — by any chance, do you have the
log.decorate configuration option set in your global .gitconfig?
(We're constantly running into issues from unanticipated formatting
options leaked from user's global configs.
|
Change https://go.dev/cl/387835 mentions this issue: |
@gopherbot, please backport to Go 1.16 and 1.17. This causes erroneous error messages (which may be confusing for users), and the underlying cause is not easy to diagnose. |
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>
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: