ci: fix the clang-format hook failing to install - #540
Merged
Merged
Conversation
cpp-linter-hooks installs clang-format with pip at hook runtime. v1.4.0
requires only pip>=20.3, which now fails to lay the wheel down:
pip failed to install clang-format 22.1.2
PermissionError: [Errno 13] Permission denied:
.../site-packages/clang_format/data/bin/clang-format
Lint only stayed green while the prek cache survived; every cache miss
rebuilt the hook environment and went red. v1.6.0 requires pip>=26.1 for
exactly this reason.
v1.6.0 also resolves the clang-format version from PyPI at run time
instead of a static list, so pin it to the 22.1.2 the sources are
already formatted with, keeping the version independent of what PyPI
publishes next.
Refs COD-3543
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
adriencaccia
force-pushed
the
fix-clang-format-hook-install
branch
from
September 16, 2026 17:30
107f904 to
41f6539
Compare
Merging this PR will not alter performance
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cpp-linter-hooksinstalls clang-format with pip at hook runtime. v1.4.0 onlyrequires
pip>=20.3, which now fails to lay the wheel down:Lint only stayed green while the prek cache survived — every cache miss rebuilt
the hook environment and went red, which is what happened on
maintoday.v1.6.0 requires
pip>=26.1for exactly this reason.v1.6.0 also resolves the clang-format version from PyPI at run time instead of a
static list, so it is pinned to the 22.1.2 the sources are already formatted
with. Without the pin lint would jump to whatever PyPI publishes next (23.1.1
today) and reformat the eBPF C sources.
Verified against a fresh prek cache
(
PREK_HOME=<empty dir> prek run clang-format --all-files): the hook installs,reports
clang-format version 22.1.2and leaves the C sources untouched.Refs COD-3543 — that issue tracks the memtrack/runner patch releases, which this
only unblocks.