feat: set clang version min and max at compile time#333
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThis PR introduces dynamic clang-tools version provisioning by seeding upstream release metadata in CI, parsing it at build time, and embedding the resulting version bounds as compile-time constants. Workflows download ChangesDynamic clang-tools version provisioning
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
997173f to
291f1a5
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #333 +/- ##
==========================================
+ Coverage 90.94% 91.01% +0.07%
==========================================
Files 22 22
Lines 3368 3374 +6
==========================================
+ Hits 3063 3071 +8
+ Misses 305 303 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This adds a build script that downloads versions.json from `cpp-linter/clang-tools-static-binaries` latest release and injects it into the production code using compile-time-only environment variables. Includes a similar adjustment to the test CI job in some inline nu shell script that employs gh-cli instead of direct download.
To avoid chances of a network failure in the build script, all CI jobs (except clippy job) use a pre-seeded versions.json artifact. This prevents each build of clang-installer from re-downloading the same versions.json file repeatedly.
compiling aws-ls-sys on these targets are way too flaky, even for me.
for newer static binary releases which - only use the major version - support arm64 (on unix but not windows) as well as amd64 (on all OS)
Looks like subsequent releases for the same clang version are suffixed with a build number (`11.1.0.2`), but this is not semver compliant. It seems PEP440 is not as strict as semver rules. As a workaround, we use the build number as a prerelease version and append a prerelease version of `0` to those with no build number suffixed. I also updated the logs to be less confusing about which build number (for identical clang versions) is being downloaded.
8c9352c to
eb27133
Compare
This adds a build script that downloads versions.json from
cpp-linter/clang-tools-static-binarieslatest release and injects it into the production code using compile-time-only environment variables.Includes a similar adjustment to the test CI job in some inline nu shell script that employs gh-cli instead of direct download.
Summary by CodeRabbit
New Features
--verboseflag to installer for detailed diagnostic output.Bug Fixes
Chores