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

Ensure per-package blank imports for vendoring are easy to maintain #1499

Open
dagood opened this issue Jan 16, 2025 · 0 comments
Open

Ensure per-package blank imports for vendoring are easy to maintain #1499

dagood opened this issue Jan 16, 2025 · 0 comments

Comments

@dagood
Copy link
Member

dagood commented Jan 16, 2025

+import (
+ _ "github.com/golang-fips/openssl/v2"
+ _ "github.com/golang-fips/openssl/v2/bbig"
+
+ _ "github.com/microsoft/go-crypto-darwin/bbig"
+ _ "github.com/microsoft/go-crypto-darwin/xcrypto"
+
+ _ "github.com/microsoft/go-crypto-winnative/cng"
+ _ "github.com/microsoft/go-crypto-winnative/cng/bbig"
+)
+
+// This file is here just to declare the external dependencies
+// that are used by the backend package. This allows to track
+// their versions in a single patch file.

It looks like we have to import each package to make sure go mod vendor picks it up, but I don't see this documented. (I'm also not 100% I have the reason right, didn't get a chance to poke around locally.)

If that's right, it's a little concerning that the vendoring patch has to "predict" what packages will be used by later patches--not a practical concern most likely (we have very few, pretty consistent, packages), but I want to understand better how a mistake is detected and make sure this is as maintainable and documented as necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant