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: go test cannot deal well with import cycles #6872

Closed
gopherbot opened this issue Dec 2, 2013 · 5 comments
Closed

cmd/go: go test cannot deal well with import cycles #6872

gopherbot opened this issue Dec 2, 2013 · 5 comments

Comments

@gopherbot
Copy link

by alkemir:

Which version are you using?  (run 'go version')
go1.2rc5 linux/amd64

When I run "go test package" I get an error reporting an import cycle, but if
I run "go test -cover package" it hangs forever. I tried generating a minimal
example but it did work in the simple case, so the conditions for the bug might not be
obvious.
@dsymonds
Copy link
Contributor

dsymonds commented Dec 4, 2013

Comment 1:

Labels changed: added toolbug, removed priority-triage.

Owner changed to @robpike.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 2:

Labels changed: added release-none, removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added repo-tools.

@ianlancetaylor
Copy link
Contributor

Comment 4:

Issue #9031 has been merged into this issue.

@bradfitz bradfitz removed new labels Dec 18, 2014
@robpike robpike assigned rsc and unassigned robpike Mar 30, 2015
@robpike robpike changed the title go.tools/cmd/cover: cannot deal well with import cycles cmd/go: go test cannot deal well with import cycles Mar 30, 2015
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@rsc rsc removed the release-none label Apr 10, 2015
@rsc rsc changed the title cmd/go: go test cannot deal well with import cycles x/tools/cmd/go: go test cannot deal well with import cycles Apr 14, 2015
@rsc rsc changed the title x/tools/cmd/go: go test cannot deal well with import cycles cmd/go: go test cannot deal well with import cycles Apr 14, 2015
@rsc rsc removed the repo-tools label Apr 14, 2015
@rsc
Copy link
Contributor

rsc commented Oct 25, 2017

Using the repro case from #9031 with current go command:

$ go get github.com/mdwhatcott/cycle
$ cd $GOPATH/src/github.com/mdwhatcott/cycle
$ go test -cover
# github.com/mdwhatcott/cycle
import cycle not allowed in test
package github.com/mdwhatcott/cycle (test)
	imports github.com/mdwhatcott/cycle

FAIL	github.com/mdwhatcott/cycle [setup failed]
$ 

@rsc rsc closed this as completed Oct 25, 2017
@golang golang locked and limited conversation to collaborators Oct 25, 2018
@rsc rsc removed their assignment Jun 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants