-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Are we committed to not letting users build code unless they set $HOME or $GOCACHE? I'd expect this to break quite a few Docker images, which probably didn't want to keep the cache around anyway. Also, I run some machines with a read-only $HOME, which I guess won't be able to build Go code anymore.
It already broke tip.golang.org and stuff inside Google, too.
It's what we announced in the 1.11 release notes, and nobody complained about it then.
We could perhaps put the cache in os.TempDir() if we can't find it some other place, though.
I'd argue that https://golang.org/doc/go1.11#gocache does not communicate that if you don't set $HOME, or if it's not writeable, builds will fail. To an outsider it seems to just say you can't force $GOCACHE off manually anymore.
I personally would expect go to still work, and simply not persist the cache.
Anyway, we are seeing breakage, so this should be an explicit decision. I think we should not break build environments as much as possible: modules should make go more flexible, not less.