Over many years we've been trying to move to a state in which GOPATH/pkg is no longer needed (#4719, #34527).
However, it appears that when we added support for the checksum database (#25530), we did not also add a configuration point for the location of the local copy of the checksum database and transparency log. It is currently always located in GOPATH/pkg/sumdb:
https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/cfg/cfg.go;l=422;drc=8fce59eab5cb2facfafca89e047b4b43ba44785f
For consistency, I think we should add such a configuration point as an environment variable akin to GOMODCACHE.
I suggest either GOSUMDBDIR (analogous to GOTMPDIR) or GOSUMDBCACHE (analogous to GOMODCACHE).
(CC @rsc @matloob @golang/tools-team)
Over many years we've been trying to move to a state in which
GOPATH/pkgis no longer needed (#4719, #34527).However, it appears that when we added support for the checksum database (#25530), we did not also add a configuration point for the location of the local copy of the checksum database and transparency log. It is currently always located in
GOPATH/pkg/sumdb:https://cs.opensource.google/go/go/+/master:src/cmd/go/internal/cfg/cfg.go;l=422;drc=8fce59eab5cb2facfafca89e047b4b43ba44785f
For consistency, I think we should add such a configuration point as an environment variable akin to
GOMODCACHE.I suggest either
GOSUMDBDIR(analogous toGOTMPDIR) orGOSUMDBCACHE(analogous toGOMODCACHE).(CC @rsc @matloob @golang/tools-team)