Repository navigation
Read the UFCx version from ufcx.h in FindUFCxPython - #4663
Merged
Merged
Conversation
UFCX_VERSION came from ffcx.__version__, which ties the find_package version check to FFCx releases, not to the ufcx.h interface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JudYk8UecTQyirGsLsHUN2
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.
This is a step towards unlocking the UFCx and FFCx version numbers.
ufcx.hchanges slowly, while FFCx releases with every minor version. Today the ufcx version is bumped with each FFCx release anyway, so DOLFINx has to require a matching FFCx even when the interface is unchanged. Versioning ufcx on its own, and bumping it only whenufcx.hchanges, would let one DOLFINx release work with several FFCx releases.FindUFCxPythonstood in the way of that. It setUFCX_VERSIONfromffcx.__version__, sofind_package(UFCxPython 0.12...<0.13)(#4661) checks the FFCx release, not the interface DOLFINx compiles against. It now readsUFCX_VERSION_MAJOR,UFCX_VERSION_MINORandUFCX_VERSION_MAINTENANCEfrom theufcx.hit has already found and hashed. That matches whatufcxConfigVersion.cmakereports in CONFIG mode, which also takes its version from the ufcx project, not FFCx's Python package.Today the two versions agree, so nothing changes. Once ufcx is versioned on its own, an FFCx release that still ships the same
ufcx.hpasses the check.Tested against FFCx
main(ffcx.__version__0.12.0.dev0, header 0.12), and against a stand-inffcxpackage whose__version__is0.12.0.dev0but whose header says 0.13:0.12...<0.130.13...<0.14The dev/release distinction is not in the header's three numbers, so the found version is
0.12.0, not0.12.0.dev0. CMake ignored the.dev0when comparing anyway.🤖 Generated with Claude Code
https://claude.ai/code/session_01JudYk8UecTQyirGsLsHUN2