Skip to content

rocmPackages.rocmUpdateScript: take maxMajor and tagPrefixes - #579510

Open
randomizedcoder wants to merge 1 commit into
NixOS:masterfrom
randomizedcoder:rocm-prep/update-script
Open

randomizedcoder wants to merge 1 commit into
NixOS:masterfrom
randomizedcoder:rocm-prep/update-script

Conversation

@randomizedcoder

Copy link
Copy Markdown
Contributor

Part of splitting #573885 (rocmPackages: 7.2.4 -> 10.1) into smaller PRs, as asked in its review.

Prepares rocmUpdateScript for rocmPackages_10 (update.nix needed updating).

  • New arguments:
    • maxMajor (default 7)
    • tagPrefixes (default [ "rocm" ], so the current set ignores the therock-7.x preview tags)
    • setName (default rocmPackages)
  • Picks the highest matching version, not the first one listed
  • Follows GitHub's pagination, and fails on fetch errors instead of reporting no version
  • hipfort has a real rocm-7.14.0 tag, so on master the script now offers 7.14.0 for hipfort
  • Rebuilds: none (passthru.updateScript only)

Testing

  • Table-driven tests: 5 cases for master, 11 for the rocmPackages_10 settings (boundaries, ordering, junk, empty)
  • Against the live GitHub API: rocm-systems → 7.2.4 (master), 10.1 (rocmPackages_10)
  • nixpkgs-review: no rebuilds

🤖 Generated with Claude Code

Prepare the update script for a rocmPackages_10 set built from the
TheRock monorepos, whose sources are tagged therock-X.Y[.Z]:

- maxMajor (default 7) replaces the hard-coded major cap, so a second
  set can call it with its own cap.
- tagPrefixes (default [ "rocm" ]) selects which tag families count as
  releases. The current set keeps rocm- only, so the therock-7.x
  preview tags are not picked up.
- setName (default "rocmPackages") is the attribute path passed to
  update-source-version.
- Pick the highest matching version instead of the first release
  listed: releases are not ordered by version (a rocm-7.2.x maintenance
  release can be published after a newer series).
- Follow GitHub's pagination (100 per page) so the highest version is
  found even when it is not on the first page, and fail on fetch
  errors instead of reporting "no valid version".

No change to any derivation; passthru.updateScript only.

Assisted-by: Claude Code (claude-opus-5-5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: rocm ROCm is an Advanced Micro Devices software stack for graphics processing unit programming. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. llm-assisted Contributions that include code generation with LLMs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant