go: report removal of ms_nocgo_opensslcrypto - #2443
Open
George Adams (gdams) wants to merge 2 commits into
Open
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Return an actionable error when the retired experiment is set, explaining that CGO-free system crypto is selected automatically on supported platforms starting in Go 1.27. Test: cd go && ./bin/go test internal/buildcfg
George Adams (gdams)
force-pushed
the
dev/gadams/cgoless
branch
from
August 11, 2026 09:21
1b25da2 to
7516257
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the Microsoft Go patch set to provide a targeted migration diagnostic when users still set the removed ms_nocgo_opensslcrypto GOEXPERIMENT, aligning it with the existing “removed system crypto experiment” error handling in internal/buildcfg.
Changes:
- Add a specific
ParseGOEXPERIMENTerror forms_nocgo_opensslcryptoexplaining the new automatic default behavior (Go 1.27+). - Extend
internal/buildcfgtests to cover the new diagnostic and ensure system crypto experiments aren’t treated as valid GOEXPERIMENT flags.
Show a summary per file
| File | Description |
|---|---|
| patches/0002-Add-crypto-backends.patch | Updates the patch content for internal/buildcfg to emit a migration error for ms_nocgo_opensslcrypto and adds focused test coverage. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
Davis Goodin (dagood)
left a comment
Member
There was a problem hiding this comment.
"system crypto with CGO_ENABLED=0 is enabled automatically" isn't a good description of the feature IMO. I think we should borrow the language from the release notes.
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
Davis Goodin (dagood)
approved these changes
Aug 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
ms_nocgo_opensslcryptoexperiment was removed in Go 1.27 because CGO-free system crypto is now selected automatically on supported platforms. Existing environments that still set it currently receive a genericunknown GOEXPERIMENTerror.Return a specific migration error explaining the new default behavior, consistent with the diagnostics for the retired system crypto experiments. Add focused coverage in
internal/buildcfg.Tested with: