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

Comments

@josharian
Copy link
Contributor

@josharian josharian commented May 6, 2019

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 label May 6, 2019
@josharian josharian added this to the Go1.14 milestone May 6, 2019
@mvdan
Copy link
Member

@mvdan mvdan commented May 6, 2019

I assume this is already being deleted from binary releases?

@josharian
Copy link
Contributor Author

@josharian josharian commented May 6, 2019

Also pkg/bootstrap, for another 86mb.

@gopherbot
Copy link

@gopherbot gopherbot commented May 6, 2019

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

@gopherbot gopherbot closed this in a921881 May 6, 2019
@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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.