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

Comments

Projects
None yet
3 participants
@kevinburke
Copy link
Contributor

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 4, 2019

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

This comment has been minimized.

Copy link
Member

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 this to the Go1.13 milestone Mar 4, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Mar 4, 2019

@bcmills

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Contributor Author

commented Mar 4, 2019

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.

@kevinburke kevinburke closed this Mar 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.