Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove -mod and -modfile flags rather than setting them to zero
Recently, a patch changed the argument `-mod=` to `-mod=readonly` as the former is not really a valid flag value, and broke with go.work. However, the latter seems to break our tests on Go 1.22.6 when listing all of runtimeLinknamed: panic: failed to load missing runtime-linknamed packages: golang.org/x/[email protected]: reading http://127.0.0.1:43357/mod/golang.org/x/crypto/@v/v0.16.1-0.20231129163542-152cdb1503eb.mod: 404 Not Found It seems like, somehow, listing std packages was trying to download x/crypto from GOPROXY - which is a local server with testdata/mod, and so it does not contain x/crypto. However, this is entirely wrong, as std vendors dependencies, including this very version of x/crypto. Reverting the change to `-mod=readonly` resolves this issue, which explains why we hadn't encountered this surprising GOPROXY error, but the revert would also break users of go.work files. Luckily, we have a better alternative: rather than trying to override the value of the flags by adding more arguments, delete them entirely.
- Loading branch information