Skip to content

refactor: install clang tools on demand#279

Draft
2bndy5 wants to merge 5 commits intomainfrom
clang-tools-downloader
Draft

refactor: install clang tools on demand#279
2bndy5 wants to merge 5 commits intomainfrom
clang-tools-downloader

Conversation

@2bndy5
Copy link
Collaborator

@2bndy5 2bndy5 commented Mar 10, 2026

In order of precedence, this patch allows installing clang tools from

  1. PyPI
    • Python and pip are not required.
      The executable binary is extracted from the downloaded wheel.
    • downloaded wheels are verified using SHA256 or Blake2b256 algorithms.
  2. system package manager(s) (if any available are supported)
    • Windows: chocolatey, winget
    • MacOS: homebrew
    • Linux: apt (Debian), dnf (Fedora), pacman (arch linux)
  3. static binaries
    • binaries are verified with accompanied SHA512 checksum
    • min and max supported versions can be controlled via env variables at compile time (not runtime); MIN_CLANG_TOOLS_VERSION and MAX_CLANG_TOOLS_VERSION respectively.
    • static binary release tag can be controlled via env variable CLANG_TOOLS_TAG at compile time (not runtime).
    • static binary repo url can be controlled via env variable CLANG_TOOLS_REPO at compile time (not runtime).

Caching

Caching is enabled per OS standards and specific to cpp-linter use.
Caching does not apply to package managers as they tend to manage caches on their own.
Cache directory can be overridden using the CPP_LINTER_CACHE environment variable.


Also upgrade cargo/rust dependencies.

@2bndy5 2bndy5 added enhancement New feature or request dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Mar 10, 2026
@2bndy5 2bndy5 linked an issue Mar 10, 2026 that may be closed by this pull request
@2bndy5 2bndy5 force-pushed the clang-tools-downloader branch 7 times, most recently from ff341e6 to 4e603b1 Compare March 11, 2026 08:27
2bndy5 added 3 commits March 12, 2026 00:46
In order of precedence, this patch allows installing clang tools from
1. PyPI (downloaded wheels are verified using SHA256 or Bake2b256)
2. system package manager(s) (if available)
3. static binaries (verified with accompanied SHA512 checksum)

Also upgrade cargo/rust dependencies.
disables any API that is specific to building a binary. Thus CLI-specific API is not exposed in the library API.

Also reviewed docs
@2bndy5 2bndy5 force-pushed the clang-tools-downloader branch 3 times, most recently from 5719c93 to 9662089 Compare March 12, 2026 12:20
also check cache before (re)populating it
@2bndy5 2bndy5 force-pushed the clang-tools-downloader branch from 9662089 to 6fc06b6 Compare March 12, 2026 12:27
@2bndy5 2bndy5 force-pushed the clang-tools-downloader branch from 89de56d to f005df3 Compare March 12, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add new mechanism for installing clang tools

1 participant