Go version
go version go1.26.1 darwin/arm64
Output of go env in your module/workspace:
❯ go env -changed
GOBIN='/Users/connorszczepaniak/go/bin'
GOPRIVATE='github.com/Workiva'
What did you do?
Ran go clean -cache, then ran go fix -inline ./... on a large Go repository.
What did you see happen?
An almost 100GB build cache:
❯ du -sh "$(go env GOCACHE)"
98G /Users/connorszczepaniak/Library/Caches/go-build
Furthermore, while the go fix was still running, total disk usage got closer to 200GB, but roughly 100GB was freed right before the command exited. This one is harder to show in a GitHub issue, but I observed by watching macOS's disk usage estimate. Often when running a go fix like this, I end up with many of the following errors:
mkdir /var/folders/14/dl88pgbs11766nqnslc5ry8h0000gs/T/go-build114066672/b14431/: no space left on device
I attempted a du -sh /var/folders/14/dl88pgbs11766nqnslc5ry8h0000gs/T during the go fix but the command hung.
What did you expect to see?
I'm not sure what I expect the Go build cache disk usage to look like, but 100GB seems high. The fact that there seems to be an (even more) ephemeral extra 100GB during the go fix was also surprising and means I need twice as much disk space available to run such a command.
Go version
go version go1.26.1 darwin/arm64
Output of
go envin your module/workspace:What did you do?
Ran
go clean -cache, then rango fix -inline ./...on a large Go repository.What did you see happen?
An almost 100GB build cache:
Furthermore, while the
go fixwas still running, total disk usage got closer to 200GB, but roughly 100GB was freed right before the command exited. This one is harder to show in a GitHub issue, but I observed by watching macOS's disk usage estimate. Often when running ago fixlike this, I end up with many of the following errors:I attempted a
du -sh /var/folders/14/dl88pgbs11766nqnslc5ry8h0000gs/Tduring thego fixbut the command hung.What did you expect to see?
I'm not sure what I expect the Go build cache disk usage to look like, but 100GB seems high. The fact that there seems to be an (even more) ephemeral extra 100GB during the
go fixwas also surprising and means I need twice as much disk space available to run such a command.