Michael Matloob submitted the change![Open in Gerrit]()
Change information
Commit message:
cmd/go: use fsys.ReadDir for IsStandardPackage
FIPS140 crypto files will be bound into the virtual filesystem using the
fsys package. So IsStandardPackage needs to use fsys.ReadDir to check
that the fips140 packages are standard packages rather than os.ReadDir
because os.ReadDir doesn't know about the overlay.
It would be nice if we could pass in a io/fs.FS to IsStandardPackage but
the FS paths are slash paths and don't play well with windows paths. So
we pass in ReadDir instead. Maybe in the future we could create an
alternative interface to pass the filesystem through but that's a bigger
project.
Fixes #73649
Change-Id: I576f03cfc52a63cec0598e058e1354676a6a6964
Files:
- M src/cmd/go/internal/modindex/read.go
- A src/cmd/go/testdata/mod/example.com_importcrypto_v1.0.0.txt
- A src/cmd/go/testdata/script/mod_get_fips140_issue73649.txt
- M src/go/build/build.go
- M src/internal/goroot/gc.go
Change size: S
Delta: 5 files changed, 35 insertions(+), 6 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +1 by Dmitri Shuralyov, +1 by Michael Matloob, +2 by Dmitri Shuralyov
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I576f03cfc52a63cec0598e058e1354676a6a6964
Gerrit-Change-Number: 762581
Gerrit-PatchSet: 6