You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During review of the vcpkg registry submission (microsoft/vcpkg#53682), the vcpkg maintainer flagged that the port did not fully control upstream's optional build dependencies: cmake/Ccache.cmake runs find_program(ccache) in every top-level configure and selects it as CMAKE_CXX_COMPILER_LAUNCHER when present, so the configure result depends on what happens to be installed on the build host. The registry port now passes -DDISABLE_CCACHE_DETECTION=ON (merged from Bronek/vcpkg#1).
The registry flag treats the symptom. This issue addresses the root cause and the remaining in-repo alignment, in one change:
1. Gate ccache detection on LIBFN_TESTS (root cause)
include(Ccache) (CMakeLists.txt, top-level branch) runs even when LIBFN_TESTS=OFF — but in that configuration nothing compiles at all: the library is header-only, and both LIBFN_DOCS and LIBFN_COVERAGE hard-require LIBFN_TESTS=ON. A compiler launcher can serve no purpose there; only the nondeterministic host probe remains.
Gating include(Ccache) on LIBFN_TESTS makes every install-only configure hermetic by construction:
packagers (vcpkg, nixpkgs, anyone downstream) no longer need to know DISABLE_CCACHE_DETECTION exists;
developer builds (tests on) keep ccache detection exactly as today, and the DISABLE_CCACHE_DETECTION option/env escape remains for them.
2. Align the in-repo overlay port
ports/libfn/portfile.cmake configures with only -DLIBFN_TESTS=OFF — the same omission the registry port had. Add -DDISABLE_CCACHE_DETECTION=ON to match the registry port. This stays correct regardless of item 1: the overlay port must also build pinned releases (v0.1.0) whose CMakeLists predates the gate.
3. flake.nix consistency (optional)
flake.nix does not disable the detection either. The nix sandbox makes the probe deterministic (ccache is never present unless declared), so this is consistency rather than correctness — nixpkgs' package.nix disables it explicitly. Item 1 makes this moot for install-only use; decide whether the flake's test-enabled dev shell wants ccache detection kept.
Background
During review of the vcpkg registry submission (microsoft/vcpkg#53682), the vcpkg maintainer flagged that the port did not fully control upstream's optional build dependencies:
cmake/Ccache.cmakerunsfind_program(ccache)in every top-level configure and selects it asCMAKE_CXX_COMPILER_LAUNCHERwhen present, so the configure result depends on what happens to be installed on the build host. The registry port now passes-DDISABLE_CCACHE_DETECTION=ON(merged from Bronek/vcpkg#1).The registry flag treats the symptom. This issue addresses the root cause and the remaining in-repo alignment, in one change:
1. Gate ccache detection on
LIBFN_TESTS(root cause)include(Ccache)(CMakeLists.txt, top-level branch) runs even whenLIBFN_TESTS=OFF— but in that configuration nothing compiles at all: the library is header-only, and bothLIBFN_DOCSandLIBFN_COVERAGEhard-requireLIBFN_TESTS=ON. A compiler launcher can serve no purpose there; only the nondeterministic host probe remains.Gating
include(Ccache)onLIBFN_TESTSmakes every install-only configure hermetic by construction:DISABLE_CCACHE_DETECTIONexists;cmake -B .build -DLIBFN_TESTS=OFF) probes no host tools;DISABLE_CCACHE_DETECTIONoption/env escape remains for them.2. Align the in-repo overlay port
ports/libfn/portfile.cmakeconfigures with only-DLIBFN_TESTS=OFF— the same omission the registry port had. Add-DDISABLE_CCACHE_DETECTION=ONto match the registry port. This stays correct regardless of item 1: the overlay port must also build pinned releases (v0.1.0) whose CMakeLists predates the gate.3.
flake.nixconsistency (optional)flake.nixdoes not disable the detection either. The nix sandbox makes the probe deterministic (ccache is never present unless declared), so this is consistency rather than correctness — nixpkgs'package.nixdisables it explicitly. Item 1 makes this moot for install-only use; decide whether the flake's test-enabled dev shell wants ccache detection kept.Assisted-by: Claude:claude-fable-5