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: use different output dirs with -tags #4443

Closed
rsc opened this issue Nov 26, 2012 · 8 comments
Closed

cmd/go: use different output dirs with -tags #4443

rsc opened this issue Nov 26, 2012 · 8 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Nov 26, 2012

Using go install -tags foo and go install will both install package objects to the same
place. Binaries too. That's probably a mistake. Right now there is a special case for
-race. Maybe it should not be so special.
@rsc
Copy link
Contributor Author

rsc commented Dec 10, 2012

Comment 1:

Labels changed: added size-m.

@bradfitz
Copy link
Contributor

Comment 2:

This has been biting me.
ba12:camlistore.org bradfitz$ go test ./pkg/index/sqlite/
warning: building out-of-date packages:
    camlistore.org/pkg/test
    camlistore.org/pkg/index/indextest
installing these packages with 'go test -i ./pkg/index/sqlite/' will speed future tests.
^[[Apanic: camlistored was not built with SQLite support. Rebuild with go get/install
--tags=with_sqlite  [recovered]
    panic: camlistored was not built with SQLite support. Rebuild with go get/install --tags=with_sqlite 
goroutine 3 [running]:
testing.func·003(0x1105efa8, 0x1105d100)
    /Users/bradfitz/go/src/pkg/testing/testing.go:296 +0xc3
 
Adding --tags for the test does nothing:
ba12:camlistore.org bradfitz$ go test --tags=with_sqlite ./pkg/index/sqlite/
warning: building out-of-date packages:
    camlistore.org/pkg/test
    camlistore.org/pkg/index/indextest
installing these packages with 'go test -i ./pkg/index/sqlite/' will speed future tests.
panic: camlistored was not built with SQLite support. Rebuild with go get/install
--tags=with_sqlite  [recovered]
    panic: camlistored was not built with SQLite support. Rebuild with go get/install --tags=with_sqlite 
goroutine 3 [running]:
testing.func·003(0x1105efa8, 0x1105d100)
    /Users/bradfitz/go/src/pkg/testing/testing.go:296 +0xc3
But if I do -i:
ba12:camlistore.org bradfitz$ go test -i --tags=with_sqlite ./pkg/index/sqlite/
Then it works:
 ba12:camlistore.org bradfitz$ go test --tags=with_sqlite ./pkg/index/sqlite/
ok      camlistore.org/pkg/index/sqlite 0.256s
Related to issue #3832 and issue #3895?

@bradfitz
Copy link
Contributor

Comment 3:

Russ, any new thoughts on this? I'd like to include the tags in the pkg/os-arch-tags dir.

@rsc
Copy link
Contributor Author

rsc commented Jan 31, 2013

Comment 4:

Labels changed: added priority-later, removed priority-soon.

@rsc
Copy link
Contributor Author

rsc commented Mar 12, 2013

Comment 5:

Labels changed: added go1.1maybe, removed go1.1.

@dsymonds
Copy link
Contributor

Comment 6:

FYI, this matters to App Engine (supporting testing, etc.).

@rsc
Copy link
Contributor Author

rsc commented Mar 13, 2013

Comment 7:

Okay, back to Go 1.1. But I'm still not 100% sure how this should work. Sometimes a
different -tags does not need to create a whole new output tree nor to rebuild
everything from scratch. Perhaps instead of reusing -tags there should be a separate
-buildlabel that specifies a suffix to use when naming the install directory.

Labels changed: added go1.1, removed go1.1maybe.

@rsc
Copy link
Contributor Author

rsc commented Mar 13, 2013

Comment 8:

This issue was closed by revision e778f93.

Status changed to Fixed.

@rsc rsc added fixed labels Mar 13, 2013
@rsc rsc self-assigned this Mar 13, 2013
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
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

4 participants