Open mneverov opened 1 month ago
Related Issues and Documentation
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
I see a couple of issues here:
I'd like to work on this. I see a couple of ways to address the second point.
DefaultDir
should return string, bool, error
if a function during execution encounters an error it should return the error
func DefaultDirError() error { return defaultDirErr }
DefaultDir
is called. Can be fixed with the proper comment.I don't think we need to document the absolute path requirement in the "Build and test caching" section, but that we should in the GOCACHE
entry in the https://pkg.go.dev/cmd/go#hdr-Environment_variables section.
I agree that there's no nice way to address the second point, though my preference is to return string, bool, error. (We already had to change the usages to ignore the ok
value when we added it and this is a similar addition)
Change https://go.dev/cl/628596 mentions this issue: cmd/go: fail go clean command when failed to find go cache directory
Go version
go version go1.23.1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
GOCACHE='.cache' go clean --cache
What did you see happen?
No output. Neither default gocache directory nor ".cache" directory cleaned up.
What did you expect to see?
Error or empty
.cache
directory.