Skip to content
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: spurious recursive VCS reference using Mercurial #22201

Closed
philpennock opened this issue Oct 10, 2017 · 7 comments
Closed

cmd/go: spurious recursive VCS reference using Mercurial #22201

philpennock opened this issue Oct 10, 2017 · 7 comments
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Milestone

Comments

@philpennock
Copy link

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go 1.9.1, and confirmed issue not present with go 1.9

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOHOSTARCH="amd64"
GOHOSTOS="darwin"

It's Darwin 16.7.0 from macOS 10.12.6 but problem also observed in Linux docker images under Circle CI, so it appears to be platform independent.

What did you do?

I ran go get -v -u -t -d ./... twice on a project which pulls in bitbucket.org/pkg/inflect as a dependency. When run with a clean tree, it succeeds without error. When run with the content already checked out, it errors. Across 385 lines of output from the above, there is one line of difference between the two:

-bitbucket.org/pkg/inflect (download)
+package bitbucket.org/pkg/inflect: directory "/Users/pdp/tmp/go-foo/src/bitbucket.org/pkg/inflect" uses hg, but parent "/Users/pdp/tmp/go-foo/src/bitbucket.org/pkg" uses hg

There is no .hg directory in the parent. This error appears spurious.

If I switch /usr/local/go from 1.9.1 back to 1.9, then go get -v -u -t -d ./... succeeds.

Thus 1.9.1 appears to be incorrectly determining that the parent is using hg and that this is some kind of conflict.

What did you expect to see?

No error, no difference between the two runs

What did you see instead?

A spurious failure.

@ianlancetaylor ianlancetaylor changed the title go1.9.1 regression breaks mercurial/hg update cmd/go: spurious recursive VCS reference using Mercurial Oct 10, 2017
@ianlancetaylor ianlancetaylor added this to the Go1.9.2 milestone Oct 10, 2017
@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 10, 2017
@ianlancetaylor
Copy link
Contributor

I can recreate this by doing

go get bitbucket.org/pkg/inflect
go get -u bitbucket.org/pkg/inflect

The error I get is

package bitbucket.org/pkg/inflect: directory "/home/iant/gopath/src/bitbucket.org/pkg/inflect" uses hg, but parent "/home/iant/gopath/src/bitbucket.org/pkg" uses hg

There is no .hg directory in /home/iant/gopath/src/bitbucket.org/pkg nor in /home/iant/gopath/src/bitbucket.org. There is a .hg directory in /home/iant/gopath/src/bitbucket.org/pkg/inflect.

CC @rsc

@gopherbot
Copy link

Change https://golang.org/cl/69670 mentions this issue: cmd/go: correct directory used in checkNestedVCS test

@ianlancetaylor
Copy link
Contributor

Reopening for 1.9.2.

@ianlancetaylor ianlancetaylor added release-blocker and removed NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Oct 13, 2017
@rsc
Copy link
Contributor

rsc commented Oct 13, 2017

CL 69670 OK for Go 1.9.2.

@rsc rsc added the CherryPickApproved Used during the release process for point releases label Oct 14, 2017
@gopherbot
Copy link

Change https://golang.org/cl/70839 mentions this issue: [release-branch.go1.8] cmd/go: correct directory used in checkNestedVCS test

@gopherbot
Copy link

Change https://golang.org/cl/70984 mentions this issue: [release-branch.go1.9] cmd/go: correct directory used in checkNestedVCS test

gopherbot pushed a commit that referenced this issue Oct 25, 2017
…CS test

This error was not used when using git because nested git is permitted.
Add test using Mercurial, so that at least we have a test, even though
the test is not run by default.

Fixes #22157
Fixes #22201

Change-Id: If521f3c09b0754e00e56fa3cd0364764a57a43ad
Reviewed-on: https://go-review.googlesource.com/69670
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/70839
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
gopherbot pushed a commit that referenced this issue Oct 25, 2017
…CS test

This error was not used when using git because nested git is permitted.
Add test using Mercurial, so that at least we have a test, even though
the test is not run by default.

Fixes #22157
Fixes #22201

Change-Id: If521f3c09b0754e00e56fa3cd0364764a57a43ad
Reviewed-on: https://go-review.googlesource.com/69670
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-on: https://go-review.googlesource.com/70984
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
@rsc
Copy link
Contributor

rsc commented Oct 26, 2017

go1.9.2 has been packaged and includes:

The release is posted at golang.org/dl.

— golang.org/x/build/cmd/releasebot, Oct 26 21:09:22 UTC

@rsc rsc closed this as completed Oct 26, 2017
@golang golang locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge release-blocker
Projects
None yet
Development

No branches or pull requests

4 participants