Skip to content

HermeticFetchContent v1.0.25 + v1.0.26 : Hermetic find_package() improvements + Auto-detect and expose package version in find_package() provider - #50

Open
pysco68 wants to merge 2 commits into
mainfrom
feature/TIPI-1757/transitive-dependency-handling
Open

HermeticFetchContent v1.0.25 + v1.0.26 : Hermetic find_package() improvements + Auto-detect and expose package version in find_package() provider#50
pysco68 wants to merge 2 commits into
mainfrom
feature/TIPI-1757/transitive-dependency-handling

Conversation

@pysco68

@pysco68 pysco68 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

CHANGELOG:

  • HERMETIC_DEFER_NATIVE_ROOTED_FIND_PACKAGE_FOR: forward find_package() calls to cmake's
    native implementation rooted at the HFC install prefix instead of serving from the target cache
  • HERMETIC__FIND_PACKAGE_EXTRA_CODE: inject arbitrary cmake code into the
    provider when find_package() is handled for a dependency (e.g. to set _VERSION)
  • Proxy toolchains embed dependency state fingerprints for transitive invalidation when an
    upstream dependency changes
  • HERMETIC__FIND_PACKAGE_EXTRA_CODE: inject arbitrary cmake code into the
    provider when find_package() is handled for a dependency (e.g. to set _VERSION)
  • Proxy toolchains embed dependency fingerprints for transitive invalidation when an upstream
    dependency changes
  • Transient content aliases now resolve correctly through find_package() in sub-builds
  • Alias deduplication: multiple aliases resolving to the same canonical content produce a
    single registration in the proxy toolchain (e.g. HERMETIC_FIND_PACKAGES "jemalloc;jemallocAlt")

Change-Id: I3a656d3f93f1e4ae8abcfa877f65db238aa2a59a

In context of:
https://github.com/tipi-build/specs-cmake-re/issues/447

@pysco68 pysco68 self-assigned this Jun 2, 2026
@pysco68
pysco68 force-pushed the feature/TIPI-1757/transitive-dependency-handling branch 2 times, most recently from ba42bec to e7443e1 Compare June 2, 2026 15:09
@pysco68
pysco68 force-pushed the feature/TIPI-1757/toolchain-fingerprinting branch 4 times, most recently from 6081878 to cdef43d Compare June 8, 2026 09:31

@Orphis Orphis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth it adding to the release notes that this is a caching key change and that everything will need to be rebuilt against the new computed cache key.

Also, did you measure how long it takes to generate this subproject for each dependency in a large project?

Comment thread cmake/modules/hfc_toolchain_fingerprint.cmake Outdated
Comment thread cmake/modules/hfc_toolchain_fingerprint.cmake Outdated
Comment thread example/arrow/thirdparty/build_thirdparty.cmake Outdated
Comment thread test/test_variant.hpp Outdated
Comment thread test/test_variant.hpp Outdated
@pysco68
pysco68 force-pushed the feature/TIPI-1757/transitive-dependency-handling branch 2 times, most recently from 1e3777d to 87fdc8e Compare June 8, 2026 13:35
@pysco68
pysco68 force-pushed the feature/TIPI-1757/toolchain-fingerprinting branch from cdef43d to 5389022 Compare June 8, 2026 14:52
@pysco68
pysco68 force-pushed the feature/TIPI-1757/transitive-dependency-handling branch from 87fdc8e to dd2c17c Compare June 8, 2026 14:56
@pysco68
pysco68 marked this pull request as ready for review June 8, 2026 15:29
@pysco68
pysco68 force-pushed the feature/TIPI-1757/toolchain-fingerprinting branch 3 times, most recently from 4c26efe to 050c8c6 Compare June 10, 2026 10:20
@pysco68
pysco68 force-pushed the feature/TIPI-1757/transitive-dependency-handling branch from dd2c17c to 0441fb5 Compare June 11, 2026 08:48
@pysco68
pysco68 changed the base branch from feature/TIPI-1757/toolchain-fingerprinting to main June 11, 2026 08:59

@Lambourl Lambourl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment thread .github/workflows/example.yml
Comment thread .github/workflows/example.yml
Comment thread cmake/modules/hfc_generate_cmake_proxy_toolchain.cmake Outdated
Comment thread cmake/modules/hfc_generate_cmake_proxy_toolchain.cmake Outdated
Comment thread cmake/modules/hfc_generate_cmake_proxy_toolchain.cmake
Comment thread cmake/HermeticFetchContent.cmake Outdated
Comment thread test/configure_stability_test.cpp

@Orphis Orphis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, satisfied by all the changes!

  CHANGELOG:
  - HERMETIC_DEFER_NATIVE_ROOTED_FIND_PACKAGE_FOR: forward find_package() calls to cmake's
    native implementation rooted at the HFC install prefix instead of serving from the target cache
  - HERMETIC_<content-name>_FIND_PACKAGE_EXTRA_CODE: inject arbitrary cmake code into the
    provider when find_package() is handled for a dependency (e.g. to set <Pkg>_VERSION)
  - Proxy toolchains embed dependency state fingerprints for transitive invalidation when an
    upstream dependency changes
  - HERMETIC_<content-name>_FIND_PACKAGE_EXTRA_CODE: inject arbitrary cmake code into the
    provider when find_package() is handled for a dependency (e.g. to set <Pkg>_VERSION)
  - Proxy toolchains embed dependency fingerprints for transitive invalidation when an upstream
    dependency changes
  - Transient content aliases now resolve correctly through find_package() in sub-builds
  - Alias deduplication: multiple aliases resolving to the same canonical content produce a
    single registration in the proxy toolchain (e.g. HERMETIC_FIND_PACKAGES "jemalloc;jemallocAlt")

Change-Id: I3a656d3f93f1e4ae8abcfa877f65db238aa2a59a
@pysco68
pysco68 force-pushed the feature/TIPI-1757/transitive-dependency-handling branch from 5701b10 to 85e1fb4 Compare June 12, 2026 12:43
… in find_package() provider

CHANGELOG
- Auto-detect package version from ConfigVersion.cmake and pkg-config .pc files
- Add HERMETIC_FIND_PACKAGE_VERSION_OVERRIDE parameter to FetchContent_MakeHermetic() (takes priority over auto-detection)
- HERMETIC_<pkg>_FIND_PACKAGE_EXTRA_CODE takes highest precedence and can override any version

Co-Authored-By: Claude Opus 4.6

Change-Id: Ibdc6b2f59819050b43137911fd42a9910ed85bd9

@daminetreg daminetreg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great but need communication with users before this can be merged.

See https://github.com/tipi-build/specs-cmake-re/issues/463#issuecomment-4727862969

@daminetreg daminetreg changed the title HermeticFetchContent v1.0.25 : Hermetic find_package() improvements HermeticFetchContent v1.0.25 + v1.0.26 : Hermetic find_package() improvements + Auto-detect and expose package version in find_package() provider Jun 17, 2026

@daminetreg daminetreg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit id repeats the same CHANGELOG line items multiple time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants