Don't re-include an already-resolved dependency - #86
Merged
Merged
Conversation
get_dependencies() set _gd_uses_fc TRUE per iteration and relied on
nwx_ecosystem_dependency() to clear it. But every dependencies/*.cmake
carries an include_guard(), and FetchContent_MakeAvailable() runs
add_subdirectory() from inside get_dependencies()'s own function scope,
so a fetched sibling's nested get_dependencies() call inherits those
guard variables: include() becomes a silent no-op, _gd_uses_fc keeps
its TRUE default, and the name reaches FetchContent_MakeAvailable()
having never been declared ("No content details recorded for <name>").
Harmless while every dependency came from git master -- the first
include() declared it, so the repeat found its details. Resolving from
an installed wheel declares nothing, so it became fatal as soon as CI
started pip-installing the ecosystem before configure: SCF's
integration-testing build resolves utilities from its wheel, then hits
it again via tensorwrapper's own get_dependencies() call.
Short-circuit such dependencies before the include() instead, reusing
the NWX_DEP_TARGET_<name> mapping already recorded for every resolved
dependency.
|
🚀 [bumpr] Bumped! |
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.
Summary
Fixes the
No content details recorded for utilitiesconfigure error currently breaking everytest_cmake_buildleg across the ecosystem (SCF PR #73, SCF nightly, etc.).get_dependencies()sets_gd_uses_fc TRUEper iteration and relies onnwx_ecosystem_dependency()to clear it. But everydependencies/*.cmakecarries aninclude_guard(), andFetchContent_MakeAvailable()callsadd_subdirectory()from insideget_dependencies()'s own function scope — so a fetched sibling's nestedget_dependencies()call inherits those guard variables. Theinclude()becomes a silent no-op,_gd_uses_fckeeps itsTRUEdefault, and the name reachesFetchContent_MakeAvailable()having never been declared.This was harmless while every dependency resolved from git master: the first
include()declared it, so the repeat found its details and did nothing. Resolving from an installed wheel declares nothing, so it turned fatal as soon asNWChemEx/.github@aa6a0fa("move pip install up") started pip-installing the ecosystem before configure — SCF's integration-testing build resolvesutilitiesfrom its wheel, then hits it again via TensorWrapper's ownget_dependencies()call.Note this also means
nwx_ecosystem_dependency()'s branch 2 ("already resolved") was unreachable in the nested case — the guard fired first.Test plan
Reduced the CI failure to a local reproduction (installed ecosystem wheels in a venv; a local-source-dir sibling whose
CMakeLists.txtmakes the nested call), which fails onmasterwith the identical error and call stack:master, passes on this branch (Dependency utilities: already resolved (nwx::utilities))pre-commit run --all-filescleantest_cmake_buildgoes green once this is released🤖 Generated with Claude Code