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: confusing cache behavior for GOSSAFUNC #37335

Closed
cherrymui opened this issue Feb 20, 2020 · 3 comments
Closed

cmd/go: confusing cache behavior for GOSSAFUNC #37335

cherrymui opened this issue Feb 20, 2020 · 3 comments

Comments

@cherrymui
Copy link
Member

What version of Go are you using (go version)?

tip (631b498)

Does this issue reproduce with the latest release?

Yes

What did you do?

I generated a ssa.html using GOSSAFUNC, and somehow lost it, e.g. overwritten by another one. I try to generate it again.

$ GOSSAFUNC=F go build p.go
# command-line-arguments
dumped SSA to ./ssa.html

$ ls ssa.html 
ssa.html

$ rm ssa.html                  # somehow I lost it, e.g. overwritten by another one

$ GOSSAFUNC=F go build p.go    # try to generate it again
# command-line-arguments
dumped SSA to ./ssa.html

$ ls ssa.html
ls: ssa.html: No such file or directory

The second time, the build is cached, along with its stdout, which said ssa.html is generated. But the html is not cached and not regenerated. This is confusing. To actually regenerate the html I have to make a trivial change to the source file. It would be nice if I don't have to do it this way.

cc @rsc @bcmills

@josharian
Copy link
Contributor

Possibly related: #31290

@bcmills
Copy link
Contributor

bcmills commented Feb 20, 2020

Yes: specifically, see #31290 (comment).

@bcmills
Copy link
Contributor

bcmills commented Feb 20, 2020

Duplicate of #31290

@bcmills bcmills marked this as a duplicate of #31290 Feb 20, 2020
@bcmills bcmills closed this as completed Feb 20, 2020
@golang golang locked and limited conversation to collaborators Feb 19, 2021
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