Skip to content

feat: get static binaries from per-version releases - #510

Merged
shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-viy4jw
Oct 19, 2026
Merged

shenxianpeng merged 1 commit into
mainfrom
claude/project-thread-viy4jw

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Before: clang-tools-manager downloaded every static binary from the single release behind releases/latest (2026.09.01-5fb8802d), using that release's versions.json at build time. Since cpp-linter/clang-tools-static-binaries#142, new LLVM builds no longer go into that release, so they never reach clang-tools-manager.

After: the build script reads the static binaries' index.json, which lists one immutable release per LLVM version (llvm-12.0.1 … llvm-23.1.0). Each binary is downloaded from its own version's release and checked against that release's SHA512SUMS.

How: build.rs fetches index.json (still cached for 24 hours, and still shipped in the crate for docs.rs, now as static-binaries-index.json), checks schema_version == 1, emits MIN/MAX_CLANG_TOOLS_VERSION as before, and writes a (major, release tag) table to OUT_DIR. find_suitable_version() now returns the tag along with the version. The cached SHA512SUMS moved to static_dist/<tag>/SHA512SUMS, so a rebuilt release (llvm-X.Y.Z-2) never reuses stale checksums. The pre-seed workflow, the dev-test version loop and nur seed versions read the new file. The public API does not change.

Tested locally: lib tests pass, and a temporary test downloaded and verified clang-format 12 and 23 from their own releases.

Summary by CodeRabbit

  • New Features
    • Static binary downloads now use version-specific release information and checksum data.
    • ARM64 is listed alongside x86_64 as a supported architecture, including on Windows.
  • Bug Fixes
    • Version information is now retrieved from the published static binaries index across builds, tests, and package preparation.

clang-tools-static-binaries now publishes one immutable release per LLVM
version and lists them all in an index.json on GitHub Pages. The old
`releases/latest` (2026.09.01-5fb8802d) no longer receives new builds.

The build script now reads that index instead of `versions.json`, and
records each major version's release tag. Downloads (and the cached
SHA512SUMS) use the tag of the requested version.
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.41%. Comparing base (4cb2e2c) to head (756caee).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #510   +/-   ##
=======================================
  Coverage   99.41%   99.41%           
=======================================
  Files          28       28           
  Lines        6487     6507   +20     
=======================================
+ Hits         6449     6469   +20     
  Misses         38       38           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@shenxianpeng
shenxianpeng marked this pull request as ready for review October 19, 2026 10:31
@shenxianpeng shenxianpeng added the enhancement New feature or request label Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d474954-2f9d-40d2-9100-c74352e3c0dc
📥 Commits

Reviewing files that changed from the base of the PR and between 4cb2e2c and 756caee.

📒 Files selected for processing: 9
  • .github/workflows/binary-builds.yml
  • .github/workflows/pre-seed-versions.yml
  • .github/workflows/run-dev-tests.yml
  • .gitignore
  • clang-tools-manager/Cargo.toml
  • clang-tools-manager/build.rs
  • clang-tools-manager/src/downloader/static_dist.rs
  • clang-tools-manager/src/version.rs
  • nurfile

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The workflows and build process now use static-binaries-index.json in place of versions.json. The build script validates the index and generates per-version release tags. The downloader uses those tags to select releases and locate checksum caches.

Changes: Static binaries index and release selection

Layer / File(s) Summary
Index acquisition and repository integration
nurfile, .github/workflows/pre-seed-versions.yml, .github/workflows/binary-builds.yml, .github/workflows/run-dev-tests.yml, .gitignore, clang-tools-manager/Cargo.toml
The seed command and pre-seed workflow fetch static-binaries-index.json. Packaging and development tests now use the index, and related ignore rules and build comments name the new file.
Index validation and release-tag generation
clang-tools-manager/build.rs
The build script validates the index schema, derives minimum and maximum LLVM versions from its ordered version map, and generates per-version release-tag data.
Tagged release selection and checksum caching
clang-tools-manager/src/downloader/static_dist.rs, clang-tools-manager/src/version.rs
The downloader selects a compatible version and its release tag. Release URLs and checksum cache paths use that tag, and tests seed and check the tag-specific cache paths.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 756ca

This change moves static binary downloads to per-version releases and updates the related workflows and packaging. No concrete merge-blocking problem was found.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: retrieving static binaries from per-version releases.
Docstring Coverage Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. (6 skipped: 6 …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 3 files. (6 skipped: 6 unsupported.)

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@shenxianpeng
shenxianpeng merged commit ace4f60 into main Oct 19, 2026
53 checks passed
@shenxianpeng
shenxianpeng deleted the claude/project-thread-viy4jw branch October 19, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants