cmd/go/internal/test: files opened in tests should be cached by its content hash instead of mtime #71333
Labels
ToolProposal
Issues describing a requested change to a Go tool or command-line program.
https://github.com/golang/go/blob/40b3c0e58a0ae8dec4684a009bf3806769e0fc41/src/cmd/go/internal/test/test.go#L2013C1-L2026C3
This logic makes caching inefficient in non-local environments. For example in CI it is quite common to run a job in a separate local repositories, where mtimes are different, because that is how the
git
worksI propose to switch a hashing method to use files content or make it configurable in some way. The issue will be more visible when https://pkg.go.dev/cmd/go/internal/cacheprog@master becames popular as most of tests, which are loading files (for example stuff from
testdata/*
) won't be cached at allThe text was updated successfully, but these errors were encountered: