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 does not allow for assembly output to be displayed on cached builds #23877
Comments
Yeah, we can probably disable caching for all such debug/printing flags. Want to make a list of them all? |
I'm not sure if disabling the cache for the build or caching the output is the correct way to go forward. I'll collect these in the issue and ping after it's done (should be this weeked). |
Considering how rarely these are used, and how they're only used for debugging or developing the Go compilers themselves, disabling the build cache seems simplest and safest. |
Neither of these statements are true. People use |
I mean they're only used for My point remains: they're rarely used. We can afford to give up the caching here. |
Another workaround is using |
@gopherbot please open a backport tracking issue, as this is a 1.10 regression. |
Backport issue(s) opened: #25045 (for 1.10). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
No flag whitelist needed. This is a variant of #22587. https://golang.org/cl/77110 should have fixed this but somehow did not. /cc @bcmills want to take a look? |
I'll look into it when I get a chance. Is this possibly a difference of |
In my testing the @dlsniper Were you building a main package? |
Change https://golang.org/cl/128903 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.10 windows/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?Windows 10 / amd64
What did you do?
Ran
go build -gcflags -S file.go
twice on a file that did not changed.What did you expect to see?
The assembly output should be displayed twice.
What did you see instead?
First time this works, second time this doesn't because of the caching. I understand why this happens but I don't particularly like the effect it has or the workaround, especially since on Windows it's still not trivial to run the workaround as is on other operating systems.
The workaround is:
GODEBUG=gocacheverify=1 go build -gcflags -S file.go
.My apologies for finding this so late.
The text was updated successfully, but these errors were encountered: