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: "install -v" does not reliably print changed package names #30556

Closed
kevinburke opened this issue Mar 4, 2019 · 5 comments
Closed

cmd/go: "install -v" does not reliably print changed package names #30556

kevinburke opened this issue Mar 4, 2019 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@kevinburke
Copy link
Contributor

kevinburke commented Mar 4, 2019

Please answer these questions before submitting your issue. Thanks!

What did you do?

I can't reproduce this 100% of the time, but generally, make a change to "github.com/kevinburke/travis/lib/travis.go" - add a package level variable, add a header to NewRequest, add a Do implementation that calls c.Client.Do.

Then recompile with cd $GOPATH/src/github.com/kevinburke/travis && go install -v ./...

What did you expect to see?

I expect to see github.com/kevinburke/travis/lib in the list of changed packages.

What did you see instead?

It does not appear in the output.

Does this issue reproduce with the latest release (go1.12)?

No

System details

go version devel +4fb900e9ca Mon Mar 4 01:22:28 2019 +0000 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/kevin/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/kevin"
GOPROXY=""
GORACE=""
GOROOT="/Users/kevin/go"
GOTMPDIR=""
GOTOOLDIR="/Users/kevin/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
GOROOT/bin/go version: go version devel +4fb900e9ca Mon Mar 4 01:22:28 2019 +0000 darwin/amd64
GOROOT/bin/go tool compile -V: compile version devel +4fb900e9ca Mon Mar 4 01:22:28 2019 +0000
uname -v: Darwin Kernel Version 17.7.0: Thu Dec 20 21:47:19 PST 2018; root:xnu-4570.71.22~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.13.6
BuildVersion:	17G5019
lldb --version: lldb-1000.11.38.2
  Swift-4.2
@kevinburke
Copy link
Contributor Author

Apologies; the first draft of this bug report said "Yes" for "can reproduce with Go 1.12"; the answer is "No" so this is a regression.

@mvdan
Copy link
Member

mvdan commented Mar 4, 2019

Are you by any chance making changes that had been compiled before? If the only non-cached operation is linking a binary, and not compiling any package, I've seen go install -v use my CPU while not printing anything.

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 4, 2019
@bcmills bcmills added this to the Go1.13 milestone Mar 4, 2019
@bcmills
Copy link
Contributor

bcmills commented Mar 4, 2019

CC @jayconrod

@bcmills
Copy link
Contributor

bcmills commented Mar 4, 2019

What @mvdan said: if you're just making a change, it's possible that the result of the build is already cached. (The Go build cache is content-addressed, so the cache can hit even if the mtime of the inputs has changed.)

@kevinburke
Copy link
Contributor Author

Ohhh man I'm an idiot. I changed my vim-go settings for leader+d from "check if this compiles" to "check if this compiles AND build the package." The reason it was inconsistent was I wasn't rerunning the syntax checker between every build, so sometimes it would appear and sometimes it wouldn't.

Feel free to add a "ProblemBetweenKeyboardAndChair" label.

@golang golang locked and limited conversation to collaborators Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants