-
Notifications
You must be signed in to change notification settings - Fork 40
Consolidate crypto backend GOEXPERIMENTs into systemcrypto #2126
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
Conversation
Remove the per-platform GOEXPERIMENTs (opensslcrypto, cngcrypto,
darwincrypto) and use only systemcrypto with platform build constraints.
Before this change, enabling a crypto backend required knowing which
experiment to use for each platform:
- Linux: GOEXPERIMENT=opensslcrypto
- Windows: GOEXPERIMENT=cngcrypto
- Darwin: GOEXPERIMENT=darwincrypto
After this change, a single experiment works across all platforms:
- All platforms: GOEXPERIMENT=systemcrypto
Platform-specific code now uses build constraints like:
//go:build goexperiment.systemcrypto && linux
//go:build goexperiment.systemcrypto && windows
//go:build goexperiment.systemcrypto && darwin
Runtime checks use:
goexperiment.SystemCrypto && runtime.GOOS == "linux"
This simplifies the developer experience and makes cross-platform
scripts and documentation easier to maintain.
Changes:
- Remove OpenSSLCrypto, CNGCrypto, DarwinCrypto from goexperiment.Flags
- Remove exp_*crypto_{on,off}.go files for old experiments
- Update all build constraints to use systemcrypto + platform
- Update runtime checks to use SystemCrypto + runtime.GOOS
- Update test infrastructure to only check for systemcrypto
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
qmuntal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs need to be updated (including release notes, why not 🐱 )
This comment was marked as outdated.
This comment was marked as outdated.
f3c1d56 to
7cf51eb
Compare
Patch Consistency Review ✅I've completed a thorough review of the patch file changes in this PR. The changes consistently consolidate the platform-specific crypto backend GOEXPERIMENTs (opensslcrypto, cngcrypto, darwincrypto) into the unified Summary of ChangesPatch 0002 (Add crypto backend GOEXPERIMENTs):
Patch 0003 (Implement crypto internal backend):
Patch 0004 (Use crypto backends):
Consistency Check Results✅ Vendor patches: No vendor-related changes detected ConclusionThe patches maintain excellent cross-patch consistency. The consolidation is implemented uniformly across all affected areas, and the error handling for deprecated experiments provides a good migration path for users. No issues found.
|
Remove the per-platform GOEXPERIMENTs (opensslcrypto, cngcrypto, darwincrypto) and use only systemcrypto with platform build constraints.
Before this change, there was lots of confusion around the platform-specific experiements:
Platform-specific code now uses build constraints like:
//go:build goexperiment.systemcrypto && linux
//go:build goexperiment.systemcrypto && windows
//go:build goexperiment.systemcrypto && darwin
Runtime checks use:
goexperiment.SystemCrypto && runtime.GOOS == "linux"
This simplifies the developer experience and makes cross-platform scripts and documentation easier to maintain.
Changes: