Open
Description
Proposal Details
Currently go mod vendor
copies all files in a package except:
- files whose name ends with
_test.go
- files named
go.mod
andgo.sum
- files whose names ends with
.go
and contain ago:build ignore
constraint
This means that other random files are copied into the vendored directory. For example, the vendored golang.org/x/sys/unix in the main repo includes mkall.sh
, mkerrors.sh
, and README.md
. There is no reason to vendor those files.
I propose that we change go mod vendor
to only copy files that go build
recognizes. This is files that end with .go
, .c
, .cxx
, .swig
, and so forth. Making this change would also require go mod vendor
to look for go:embed
directives and copy over all files that they mention (for example, the vendored files in GOROOT/src/cmd/vendor/github.com/google/pprof/internal/driver/html
).
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Incoming