Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture vendored modules in stdlib #132

Open
nscuro opened this issue Feb 14, 2022 · 0 comments
Open

Capture vendored modules in stdlib #132

nscuro opened this issue Feb 14, 2022 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@nscuro
Copy link
Member

nscuro commented Feb 14, 2022

The Go standard library is vendoring a small selection of modules in such a way that they don't interfere with other versions of those modules in the module graph, see https://github.com/golang/go/blob/master/src/README.vendor

Vendored modules (as of Go 1.17.7) include:

golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e
golang.org/x/net v0.0.0-20220106012031-21a9c9cfe9c3

Those modules are currently not captured at all (for mod) or only as packages (for app).

While for mod we can simply load std as a normal module that uses vendoring, including this in app is a little trickier.

go list -deps doesn't recognize modules in $GOROOT/src/vendor as modules (which is by design):

$ cd $GOROOT/src
$ go list -deps -f '{{ with .Module }}{{ .Path }}{{ end }}' ./...
(No output)

$ go list -deps -f '{{ .ImportPath }}' ./... | grep '^vendor'
vendor/golang.org/x/crypto/cryptobyte/asn1
vendor/golang.org/x/crypto/cryptobyte
vendor/golang.org/x/net/dns/dnsmessage
vendor/golang.org/x/crypto/internal/subtle
vendor/golang.org/x/crypto/chacha20
vendor/golang.org/x/crypto/poly1305
vendor/golang.org/x/sys/cpu
vendor/golang.org/x/crypto/chacha20poly1305
vendor/golang.org/x/crypto/curve25519
vendor/golang.org/x/crypto/hkdf
vendor/golang.org/x/text/transform
vendor/golang.org/x/text/unicode/bidi
vendor/golang.org/x/text/secure/bidirule
vendor/golang.org/x/text/unicode/norm
vendor/golang.org/x/net/idna
vendor/golang.org/x/net/http/httpguts
vendor/golang.org/x/net/http/httpproxy
vendor/golang.org/x/net/http2/hpack
@nscuro nscuro added the enhancement New feature or request label Feb 14, 2022
@nscuro nscuro added this to the v1.3.0 milestone Feb 14, 2022
@nscuro nscuro modified the milestones: v1.3.0, v1.4.0 Aug 10, 2022
@nscuro nscuro modified the milestones: v1.4.0, v1.5.0 Apr 13, 2023
@nscuro nscuro modified the milestones: v1.6.0, v1.7.0 Jan 30, 2024
@nscuro nscuro modified the milestones: v1.7.0, v2.0.0 Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant