Skip to content

chore: upgrade Go version from 1.20 to 1.24#23

Open
AWaterColorPen wants to merge 2 commits intomainfrom
feature/phase1-go-upgrade
Open

chore: upgrade Go version from 1.20 to 1.24#23
AWaterColorPen wants to merge 2 commits intomainfrom
feature/phase1-go-upgrade

Conversation

@AWaterColorPen
Copy link
Owner

变更说明

这是 caskin 现代化迭代 Phase 1 的第一个 PR。

改动内容

  • go.mod 中的 Go 版本从 1.20 升级到 1.24
  • 更新 GitHub Actions workflow 使用 actions/setup-go@v5,指定 Go 1.24
  • 运行 go mod tidy 更新依赖校验文件

验证

  • go build ./... 构建成功
  • go test ./... 所有测试通过

关联计划

参见 docs/superpowers/specs/2026-03-10-caskin-modernization.md Phase 1 任务清单。

slyao and others added 2 commits March 10, 2026 22:33
- Update go.mod to require go 1.24
- Update GitHub Actions workflow to use setup-go@v5 with Go 1.24
- Run go mod tidy to update checksums
- All existing tests pass with Go 1.24
- name: Set up Go
uses: actions/setup-go@v4
uses: actions/setup-go@v5
with:
Copy link
Owner Author

Choose a reason for hiding this comment

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

with不用吧?一直用最新的就行?

Copy link
Owner Author

Choose a reason for hiding this comment

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

Explicit version pinning is preferred here to ensure CI stability. Using actions/setup-go@v5 without version specification would automatically use the latest Go version available in the runner, which could lead to unexpected breakages when Go 1.27+ is released. Keeping with: go-version: '1.24' ensures consistent builds across time.


### 任务清单

- [ ] 升级 Go 到最新版(1.24)
Copy link
Owner Author

Choose a reason for hiding this comment

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

1.26

Copy link
Owner Author

Choose a reason for hiding this comment

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

Sticking with Go 1.24 is intentional. While Go 1.26 is the latest, it was just released in Feb 2026 and may have stability issues. Go 1.24 (released Feb 2025) is mature enough for all modernization goals (any, range over integers, slices/maps stdlib, generics). For a library project like caskin, using a version that's been battle-tested for a year provides better stability guarantees for downstream users. We can revisit 1.26 in Phase 2 or 3 once it's proven stable.

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