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: get ./foo doesn't download foo #19769

Closed
rsc opened this issue Mar 29, 2017 · 7 comments
Closed

cmd/go: get ./foo doesn't download foo #19769

rsc opened this issue Mar 29, 2017 · 7 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Mar 29, 2017

$ rm -rf /tmp/x
$ mkdir -p /tmp/x/src/rsc.io
$ cd /tmp/x/src/rsc.io
$ GOPATH=/tmp/x go1.5 get ./pprof_mac_fix
$ rm -rf pprof_mac_fix
$ GOPATH=/tmp/x go1.7 get ./pprof_mac_fix
$ rm -rf pprof_mac_fix
$ GOPATH=/tmp/x go1.8 get ./pprof_mac_fix
$ rm -rf pprof_mac_fix
$ GOPATH=/tmp/x go get ./pprof_mac_fix
can't load package: package ./pprof_mac_fix: cannot find package "./pprof_mac_fix" in:
	/tmp/x/src/rsc.io/pprof_mac_fix
$ ls
$ 

A recurrence of #9767 except in that case the download happened and then go get failed to build the downloaded code. Now it's not downloading the code at all.

There is a test for this in cmd/go already but it doesn't run on builders because it needs an external network.

@rsc rsc added this to the Go1.9 milestone Mar 29, 2017
@gopherbot
Copy link

CL https://golang.org/cl/38743 mentions this issue.

gopherbot pushed a commit that referenced this issue Mar 29, 2017
rsc.io/toolstash is gone; use rsc.io/pprof_mac_fix.

This fixes a bug in the test. It turns out the code being tested here
is also broken, so the test still doesn't pass after this CL (filed #19769).

Change-Id: Ieb725c321d7fab600708e133ae28f531e55521ad
Reviewed-on: https://go-review.googlesource.com/38743
Reviewed-by: Alan Donovan <adonovan@google.com>
lparth pushed a commit to lparth/go that referenced this issue Apr 13, 2017
rsc.io/toolstash is gone; use rsc.io/pprof_mac_fix.

This fixes a bug in the test. It turns out the code being tested here
is also broken, so the test still doesn't pass after this CL (filed golang#19769).

Change-Id: Ieb725c321d7fab600708e133ae28f531e55521ad
Reviewed-on: https://go-review.googlesource.com/38743
Reviewed-by: Alan Donovan <adonovan@google.com>
@rsc
Copy link
Contributor Author

rsc commented May 15, 2017

This bisects to CL 33158, which also caused other problems. I wonder if we should roll back that CL instead.

/cc @shurcooL

@dmitshur
Copy link
Contributor

I didn't see this issue before. At first glance, it looks like a duplicate of issue #20175, which I was notified about and sent a fix for. I'm still waiting on your review of that CL. https://go-review.googlesource.com/c/42350/ Can you look at it first?

@dmitshur
Copy link
Contributor

dmitshur commented May 15, 2017

I've confirmed, this issue is the same as #20175, and my fix in CL 42350 fixes it too.

This is cmd/go on tip:

$ go test -v -run=TestGoGetDotSlashDownload cmd/go
=== RUN   TestGoGetDotSlashDownload
--- FAIL: TestGoGetDotSlashDownload (0.05s)
	go_test.go:310: running testgo [get ./pprof_mac_fix]
	go_test.go:323: standard error:
	go_test.go:324: can't load package: package ./pprof_mac_fix: cannot find package "./pprof_mac_fix" in:
			/var/folders/tw/kgz4v2kn4n7d7ryg5k_z3dk40000gn/T/gotest134427085/src/rsc.io/pprof_mac_fix
		
	go_test.go:333: go [get ./pprof_mac_fix] failed unexpectedly: exit status 1
FAIL
exit status 1
FAIL	cmd/go	1.701s

And this is with CL 42350:

$ go test -v -run=TestGoGetDotSlashDownload cmd/go
=== RUN   TestGoGetDotSlashDownload
--- PASS: TestGoGetDotSlashDownload (2.27s)
	go_test.go:310: running testgo [get ./pprof_mac_fix]
PASS
ok  	cmd/go	3.842s

Should we close one of the two issues as duplicate? If so, which one; this issue was earlier, but the other has more information posted in it. Or let the CL close both?

@gopherbot
Copy link

CL https://golang.org/cl/42350 mentions this issue.

@rsc
Copy link
Contributor Author

rsc commented May 15, 2017

Thanks for the fix, and sorry about the delayed review. I hadn't pinged you on this because I didn't bisect it until this morning.

@dmitshur
Copy link
Contributor

@rsc No problem, I'm happy to follow up and resolve any issues my work might (unintentionally) cause. Thanks!

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

3 participants