Skip to content

fix: refactor for unsupported static binary platforms#356

Merged
2bndy5 merged 3 commits into
mainfrom
fix-static-dist-platform-warnings
Jun 13, 2026
Merged

fix: refactor for unsupported static binary platforms#356
2bndy5 merged 3 commits into
mainfrom
fix-static-dist-platform-warnings

Conversation

@2bndy5

@2bndy5 2bndy5 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Previous builds for unsupported platforms issued a bunch of warnings because of unused code.

This refactors the clang-tools-manager/src/downloader/static_dist.rs module to only compile code that is actually used per the compile target.

Summary by CodeRabbit

  • New Features

    • Added a new command to seed build versions locally for development.
  • Chores

    • Refactored continuous integration workflows for improved maintainability.
    • Updated automated stale issue closure to run on Monday, Wednesday, and Friday instead of daily.
    • Optimized platform-specific code compilation for targeted architectures.

previous builds for unsupported platforms issued a bunch of warnings because of unused code.

This refactors the clang-tools-manager/src/downloader/static_dist.rs module to only compile code that is actually used per the compile target.
@2bndy5 2bndy5 added the rust Pull requests that update Rust code label Jun 12, 2026
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.58824% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.84%. Comparing base (41fcd9e) to head (b49dc75).

Files with missing lines Patch % Lines
clang-tools-manager/src/downloader/static_dist.rs 95.58% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #356   +/-   ##
=======================================
  Coverage   92.83%   92.84%           
=======================================
  Files          23       23           
  Lines        3461     3464    +3     
=======================================
+ Hits         3213     3216    +3     
  Misses        248      248           

☔ 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.

and reduce the frequency of the stale issues check
@2bndy5 2bndy5 added bug Something isn't working and removed rust Pull requests that update Rust code labels Jun 13, 2026
@2bndy5 2bndy5 marked this pull request as ready for review June 13, 2026 02:17
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@2bndy5, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 46 minutes and 58 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 11ecce1f-a3de-4a88-aa00-92c24995abad

📥 Commits

Reviewing files that changed from the base of the PR and between 5599838 and b49dc75.

📒 Files selected for processing (1)
  • clang-tools-manager/src/downloader/static_dist.rs

Walkthrough

This PR consolidates version seeding logic across six CI/CD workflows into a new reusable workflow, refactors all workflows to use dynamic artifact naming, and restructures the Rust downloader with platform-conditional compilation modules. A minor schedule update to the stale issues workflow is also included.

Changes

Version Seeding Refactor and Platform Support

Layer / File(s) Summary
Create reusable version-seeding workflow
.github/workflows/pre-seed-versions.yml
New reusable workflow downloads versions.json from a release, uploads it as an artifact, and exposes the artifact name via workflow_call output for downstream consumers.
Refactor workflows to use reusable pattern
.github/workflows/benchmark.yml, .github/workflows/binary-builds.yml, .github/workflows/build-docs.yml, .github/workflows/node-js-packaging.yml, .github/workflows/python-packaging.yml, .github/workflows/run-dev-tests.yml
Six workflows refactored to invoke the reusable workflow for seed-build-script job instead of inline steps; all downstream artifact downloads switched from hardcoded static-binary-versions to dynamic needs.seed-build-script.outputs.artifact-name.
Platform-gated SHA512 hashing
clang-tools-manager/src/downloader/hashing.rs
SHA512 hash variant and verification branch conditionally compiled for supported platforms (Windows x86_64, Linux/macOS x86_64 and aarch64).
Reorganize downloader with platform modules
clang-tools-manager/src/downloader/static_dist.rs
StaticDistDownloader refactored into unsupported_platform module returning UnsupportedArchitecture and supported_platform module containing full download/verification logic, constants, and unit tests—all conditionally compiled per target platform.
Add local development seeding command
nurfile
New nur seed versions command downloads versions.json from GitHub and saves it to clang-tools-manager/versions.json for local development without network requests during builds.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • cpp-linter/cpp-linter-rs#333: Introduced the seed/restore workflow wiring that this PR refactors into a reusable workflow with dynamic artifact naming.

Suggested labels

rust

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'fix: refactor for unsupported static binary platforms' is concise and directly describes the main change—refactoring static_dist.rs to eliminate unused-code warnings on unsupported platforms.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-static-dist-platform-warnings

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 and usage tips.

coderabbitai[bot]

This comment was marked as low quality.

@2bndy5 2bndy5 merged commit b6ff9bd into main Jun 13, 2026
84 checks passed
@2bndy5 2bndy5 deleted the fix-static-dist-platform-warnings branch June 13, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant