Skip to content

getmingw: support selecting the latest Nixman version - #698

Open
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dev/mclayton/mingw-latest
Open

Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
dev/mclayton/mingw-latest

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

  • Add getmingw run -latest to select the newest matching Nixman catalog version by numeric GCC version, runtime version, and revision.
  • Apply selection after the existing filters and retain equally new build variants for the existing ambiguity checks. Reject unsupported sources and malformed versions explicitly.
  • Keep existing behavior unchanged when -latest is omitted.

This is the helper change for microsoft/go#2701, which will build and test Go with both the pinned compiler and the newest matching catalog compiler. That PR needs a dependency bump after this change is merged and available to consume.

Related to https://github.com/microsoft/go-lab/issues/496.

Validation

  • go test ./cmd/getmingw -count=1
  • golangci-lint run ./cmd/getmingw
  • git diff --check

Focused tests cover numeric ordering, equal-version variants, malformed versions, numeric overflow, and unsupported sources.

Add run -latest to select the highest matching GCC, runtime and revision while preserving existing ambiguity checks for equally new build variants.

This supports testing Go with the newest catalog compiler alongside the pinned compiler.

Related to microsoft/go-lab#496 and microsoft/go#2701.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

🟢 Approval recommended

No active review issues are reported for the optional latest-version selection change.

No open issues 🎉

What changed in this PR

Adds optional latest-version selection to getmingw run, supporting downstream Go builds with the newest matching Nixman compiler while preserving behavior when -latest is omitted.

Changes:

  • Selects builds after existing filters using numeric GCC version, runtime version, and revision.
  • Preserves equally new variants for existing ambiguity checks and rejects unsupported sources or malformed versions.
  • Adds tests for numeric ordering, tied variants, malformed versions, overflow, and unsupported sources.
File Description
cmd/​getmingw/​run.go Adds the -latest flag and Nixman version selection logic.
cmd/​getmingw/​main_test.go Tests latest-version selection and validation errors.

Review effort: Balanced

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.

2 participants