x/mod/zip: CreateFromVCS doesn't include LICENSE from repo root, does not match modfetch, results in miscomputed go.sum #60442
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?go1.20
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?darwin/arm64
What did you do?
Used https://pkg.go.dev/golang.org/x/mod@v0.10.0/zip#CreateFromVCS to create a zip file for a submodule to populate a
file://
-based goproxy directory.The root of the repo contains a LICENSE file. The subdirectory for the submodule did not.
The produced zip file did not include the LICENSE file from the repo root. This differed from the zip file downloaded by modfetch once the revision was published, and meant the go.sum calculated pre-publish did not match.
The need to copy the LICENSE file from the repo root if the subdirectory did not contain a license was mentioned during review of the CreateFromVCS addition in https://go-review.googlesource.com/c/mod/+/330769:
It doesn't look like that logic made it into the final version.
The text was updated successfully, but these errors were encountered: