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/dist: delete GOROOT/pkg/obj after bootstrap #31851

Closed
josharian opened this issue May 6, 2019 · 3 comments
Closed

cmd/dist: delete GOROOT/pkg/obj after bootstrap #31851

josharian opened this issue May 6, 2019 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

Quoting src/cmd/dist/build.go:

	// Use a build cache separate from the default user one.
	// Also one that will be wiped out during startup, so that
	// make.bash really does start from a clean slate.
	os.Setenv("GOCACHE", pathf("%s/pkg/obj/go-build", goroot))

We should delete this build cache once bootstrapping is complete; it serves no further purpose that I can see. At tip, it is 189mb, which accounts for 28% of the size of a built GOROOT.

This adds up for folks like me who use tools (compilecmp, toolstash-check) that generate new GOROOTs like candy.

cc @bradfitz @bcmills to correct me if I am wrong about wanting to delete this

@josharian josharian added the NeedsFix The path to resolution is known, but the work has not been done. label May 6, 2019
@josharian josharian added this to the Go1.14 milestone May 6, 2019
@mvdan
Copy link
Member

mvdan commented May 6, 2019

I assume this is already being deleted from binary releases?

@josharian
Copy link
Contributor Author

Also pkg/bootstrap, for another 86mb.

@gopherbot
Copy link

Change https://golang.org/cl/175377 mentions this issue: cmd/dist: delete unnecessary dirs from GOROOT on completion

@golang golang locked and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants