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: build -i does not install if the argument is a main package #8242

Closed
gopherbot opened this issue Jun 19, 2014 · 6 comments
Closed

cmd/go: build -i does not install if the argument is a main package #8242

gopherbot opened this issue Jun 19, 2014 · 6 comments
Milestone

Comments

@gopherbot
Copy link

by ej@evanjones.ca:

Summary: go help build implies that if I run go build -i (main package), dependencies
should get installed. They do not. This is either a bug in the implementation of this
flag, or in the documentation?

go version go1.3 darwin/amd64


To reproduce:

mkdir newgopath
export GOPATH=`pwd`/newgopath
go get -d code.google.com/p/go.tools/cmd/vet
go build -v -i code.google.com/p/go.tools/cmd/vet
find newgopath/pkg


Result: there is no $GOPATH/pkg directory. Running "go build -v -i
code.google.com/p/go.tools/cmd/vet" again rebuilds all dependent packages a second
time.

Expected: it should have installed all the dependent packages.

If I run "go build -v -i code.google.com/p/go.tools/go/gcimporter" instead, it
does exactly what I expect, and installs the dependencies.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Labels changed: added repo-main, release-go1.4.

@adg
Copy link
Contributor

adg commented Aug 7, 2014

Comment 2:

I can reproduce this. Looks like an implementation bug.

Status changed to Accepted.

@adg
Copy link
Contributor

adg commented Aug 7, 2014

Comment 3:

In this case, package "importtest" is a package main that imports "importtest/bar". The
command "go build -i" should create the file $GOPATH/pkg/darwin_amd64/importtest/bar.a,
but it does not.
~/src/importtest $ go build -i
~/src/importtest $ ls ~/pkg/darwin_amd64/importtest/
ls: /Users/adg/pkg/darwin_amd64/importtest/: No such file or directory

@adg
Copy link
Contributor

adg commented Aug 11, 2014

Comment 4:

Issue #8255 has been merged into this issue.

@gopherbot
Copy link
Author

Comment 5:

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

@rsc
Copy link
Contributor

rsc commented Sep 25, 2014

Comment 6:

This issue was closed by revision dd84cf4.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
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