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: TestAccidentalGitCheckout fails with unresolveble dependencies #22983

Closed
jcajka opened this issue Dec 4, 2017 · 6 comments
Closed

cmd/go: TestAccidentalGitCheckout fails with unresolveble dependencies #22983

jcajka opened this issue Dec 4, 2017 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@jcajka
Copy link
Contributor

jcajka commented Dec 4, 2017

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

1.8.5, 1.9.2

Does this issue reproduce with the latest release?

Yes, affects master/1.10 too

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

linux, amd64

What did you do?

Make sure that you have installed subversion, mercurial and git, although I guess svn and git should be enough.

go test cmd/go -run TestAccidentalGitCheckout
--- FAIL: TestAccidentalGitCheckout (12.68s)
	go_test.go:244: running testgo [get -u vcs-test.golang.org/go/test1-svn-git]
	go_test.go:263: standard error:
	go_test.go:264: package vcs-test.golang.org/go/test1-svn-git/git-README-only/pkg: directory "/tmp/gotest721156983/src/vcs-test.golang.org/go/test1-svn-git/git-README-only" uses git, but parent "/tmp/gotest721156983/src/vcs-test.golang.org/go/test1-svn-git" uses svn
		
	go_test.go:283: testgo failed as expected: exit status 1
	go_test.go:244: running testgo [get -u vcs-test.golang.org/go/test2-svn-git/test2main]
	go_test.go:263: standard error:
	go_test.go:264: package vcs-test.golang.org/go/test2-svn-git/test2pkg/pkg: cannot find package "vcs-test.golang.org/go/test2-svn-git/test2pkg/pkg" in any of:
			/usr/lib/golang/src/vcs-test.golang.org/go/test2-svn-git/test2pkg/pkg (from $GOROOT)
			/tmp/gotest721156983/src/vcs-test.golang.org/go/test2-svn-git/test2pkg/pkg (from $GOPATH)
		
	go_test.go:283: testgo failed as expected: exit status 1
	go_test.go:349: get did not fail for right reason
	go_test.go:350: pattern src[\\/]vcs-test.* uses git, but parent .*src[\\/]vcs-test.* uses svn not found in standard error

What did you expect to see?

Test passing.

What did you see instead?

Test failing.

It seem that the testing repository vcs-test.golang.org/go/test2-svn-git/test2main contains incorrect import statement on line 4 in main.go. It is vcs-test.golang.org/go/test2-svn-git/test2pkg/pkg and I guess it should be vcs-test.golang.org/go/test2-svn-git/test2PKG/pkg.

I would open CL, but I'm not sure how to modify/contribute to the up mentioned repository/ies at vcs-test.golang.org.

@jcajka jcajka changed the title TestAccidentalGitCheckout fails with unresolveble dependencies [cmd/go] TestAccidentalGitCheckout fails with unresolveble dependencies Dec 5, 2017
@dmitshur dmitshur changed the title [cmd/go] TestAccidentalGitCheckout fails with unresolveble dependencies cmd/go: TestAccidentalGitCheckout fails with unresolveble dependencies Mar 20, 2018
@andybons andybons added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Mar 20, 2018
@andybons andybons added this to the Go1.11 milestone Mar 20, 2018
@andybons andybons assigned rsc and andybons and unassigned rsc Mar 20, 2018
@bcmills
Copy link
Contributor

bcmills commented Jun 14, 2018

@andybons, would you like to hand this off to me? I found some instructions here.

@andybons
Copy link
Member

Done!

@ianlancetaylor
Copy link
Contributor

The test is failing because the code (on vcs-test.golang.org) imports "vcs-test.golang.org/go/test2-svn-git/test2pkg/pkg", but the package is named ""vcs-test.golang.org/go/test2-svn-git/test2PKG/pkg" ("test2pkg" changes to "test2PKG"). This causes the go get to fail for a reason other than the one that the test expects.

The test first appeared in the 1.8 release, in https://golang.org/cl/68110. It currently fails in every release. I went back to the commit where the test was added, and the test fails there too. I don't know whether this test has ever passed.

@ianlancetaylor
Copy link
Contributor

It would be nice to have this test pass properly but it will require changing the vcs-test.golang.org repo. CC @rsc

@gopherbot
Copy link

Change https://golang.org/cl/129615 mentions this issue: cmd/go: disable TestAccidentalGitCheckout for now

gopherbot pushed a commit that referenced this issue Aug 16, 2018
It seems it might not have ever worked.

Updates #22983

Change-Id: Icc022539aa2555486a65900abf97dfa30f92a1ea
Reviewed-on: https://go-review.googlesource.com/129615
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/129797 mentions this issue: cmd/go: fix and reenable TestAccidentalGitCheckout

@golang golang locked and limited conversation to collaborators Aug 18, 2019
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

6 participants