Skip to content

go: report removal of ms_nocgo_opensslcrypto - #2443

Open
George Adams (gdams) wants to merge 2 commits into
microsoft/mainfrom
dev/gadams/cgoless
Open

go: report removal of ms_nocgo_opensslcrypto#2443
George Adams (gdams) wants to merge 2 commits into
microsoft/mainfrom
dev/gadams/cgoless

Conversation

@gdams

Copy link
Copy Markdown
Member

The ms_nocgo_opensslcrypto experiment 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 generic unknown GOEXPERIMENT error.

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:

cd go && ./bin/go test internal/buildcfg

@gdams
George Adams (gdams) requested a review from a team as a code owner August 11, 2026 09:20
Copilot AI lite review requested due to automatic review settings August 11, 2026 09:20
@azure-pipelines

Copy link
Copy Markdown
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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ParseGOEXPERIMENT error for ms_nocgo_opensslcrypto explaining the new automatic default behavior (Go 1.27+).
  • Extend internal/buildcfg tests 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

Comment thread patches/0002-Add-crypto-backends.patch Outdated

@dagood Davis Goodin (dagood) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"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.

Comment thread patches/0002-Add-crypto-backends.patch Outdated
Comment thread patches/0002-Add-crypto-backends.patch Outdated
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants