Skip to content

Conversation

@gfx
Copy link

@gfx gfx commented Dec 26, 2025

Description:

actions/go-setup cannot install go1.26rc1:

https://github.com/sqldef/sqldef/actions/runs/20521055234/job/58956343695?pr=1066

This PR fixes it by introducing normalizeVersionSpec().

With this PR, setup-go can install 1.26rc1: https://github.com/sqldef/sqldef/actions/runs/20523447714/job/58962500134?pr=1066

Related issue:

(none)

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

Copilot AI review requested due to automatic review settings December 26, 2025 13:42
@gfx gfx requested a review from a team as a code owner December 26, 2025 13:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for Go's RC version format (e.g., go 1.26rc1) by introducing a normalizeVersionSpec() function that converts Go-style prerelease versions to semver format before matching.

Key Changes:

  • Added normalizeVersionSpec() function to convert Go-style prerelease notation (e.g., 1.14rc1) to semver format (e.g., 1.14.0-rc.1)
  • Updated findMatch() to normalize version specs before matching against available Go versions
  • Added integration tests to verify Go-style RC version resolution

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

File Description
src/installer.ts Implements normalizeVersionSpec() function and integrates it into the version matching logic
dist/setup/index.js Compiled JavaScript output reflecting the TypeScript changes
tests/setup-go.test.ts Adds integration tests for Go-style RC version matching with and without range operators

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gfx gfx force-pushed the gfx/support-1.26rc1 branch from 1b06a08 to f63b7ec Compare December 26, 2025 13:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant