You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What does 'go version' print?
go version devel +c19d7fd53785 Wed Apr 30 13:03:38 2014 -0400 linux/amd64
also on go1.3-beta
What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.
(test sandbox: github.com/fudanchii/A)
$ go get github.com/fudanchii/A
$ cd A
$ go test -v ./c
=== RUN TestBbb
BBB
Ccc
--- PASS: TestBbb (0.00 seconds)
PASS
ok github.com/fudanchii/A/c 0.002s
adie@eenvijf:A $ go get ./...
go install github.com/fudanchii/A/c: open
/tmp/go-build504804933/github.com/fudanchii/A/c.a: no such file or directory
What happened?
go install error as the following:
go install github.com/fudanchii/A/c: open
/tmp/go-build504804933/github.com/fudanchii/A/c.a: no such file or directory
What should have happened instead?
$ go get github.com/fudanchii/A
$ cd A
$ go get -t -v ./...
$
no error on `go version go1.2.1 linux/386`
Please provide any additional information below.
-
The text was updated successfully, but these errors were encountered:
The root cause here is that this is a directory with a foo_test.go file but no other go
files. 'go build' and 'go install' have nothing to work with. I can fix the error to be
like:
go install github.com/fudanchii/A/c: no buildable Go source files in
/Users/rsc/g/src/github.com/fudanchii/A/c
I am not sure there's much more to do. It seems like a mistake for go install to
silently do nothing for a directory it has been asked to work on. The ... cannot exclude
these 'test-only' packages because then 'go test ./...' doesn't work.
It has never been our intent to support package directories that contain only tests.
It's an interesting use case but it's not planned for in the tool and it is difficult to
support. But we'll make the error better.
The text was updated successfully, but these errors were encountered: