fix(build): gate libgit2 allocator support#829
Conversation
Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
Signed-off-by: Dustin Persek <dustin.persek@protonmail.com>
|
Thanks for the libgit2 build-gating fix for #801. Triage: build/CI correctness PR. Because this touches |
|
Thank you — this closes #801 more completely than the issue asked: the header-level guard correctly handles a future libgit2 2.x (the issue's own suggestion would have rejected it), and making the CI leg loud via REQUIRE_LIBGIT2=1 means silent fallback can never fake coverage again. The exact regression class that let the missing include ship (#722's backstory) is now structurally impossible. Merging. |
Summary
HAVE_LIBGIT2build path.REQUIRE_LIBGIT2=1so CI/proof builds fail clearly if the intended libgit2 path is missing or too old.git_allocator.libgit2-devinstalled and required.Why
Fixes #801.
The allocator binding uses the libgit2 1.7+ shape, but the build previously enabled
HAVE_LIBGIT2for any libgit2 pkg-config result. PR CI also did not intentionally cover the optional libgit2 path.Tests
make -f Makefile.cbm cbm REQUIRE_LIBGIT2=1make -f Makefile.cbm build/c/test-runner REQUIRE_LIBGIT2=1PKG_CONFIG=/bin/falseruby -e 'require "yaml"; YAML.load_file(".github/workflows/_test.yml")'git diff --checkScope
REQUIRE_LIBGIT2=1is set.Caveats
scripts/test.sh,make -f Makefile.cbm test, andmake -f Makefile.cbm lint-ciwere not run locally.actionlintwas unavailable locally, so workflow validation used YAML parsing plus manual review.