Repository navigation
BUG: Fix bugs and edge cases found reviewing #315 - #320
Open
hjmjohnson wants to merge 8 commits into
Open
hjmjohnson wants to merge 8 commits into
hjmjohnson wants to merge 8 commits into
Conversation
hjmjohnson
marked this pull request as ready for review
November 26, 2026 02:59
dzenanz
requested changes
Nov 26, 2026
dzenanz
left a comment
Member
There was a problem hiding this comment.
The fixes look right. The -D* cases match how the action really calls the Linux and macOS scripts, with $CMAKE_OPTIONS unquoted so it word-splits.
With #318, #319 and #320 merged on main, the tests on Windows give 534 passed, 2 failed and 7 skipped. Both failures are new tests from this PR (see inline).
Member
|
Manual glance at the changes did not spot any problems. |
Each mounted directory was added as "<new>:<everything so far>" onto everything so far, so two directories gave /a:/b:/a: and the value always ended in ":". An empty entry in LD_LIBRARY_PATH means the current directory, so auditwheel searched wherever it was run from. Join the container paths with ":" between them only, and start from an empty value rather than one inherited from the environment.
The Linux module script turns each -x into its own --exclude-libs, and argparse's nargs=1 kept only the last of them, so all but one library were bundled without a word. --lib-paths had the same shape. Append each occurrence and join them with ";" into the one-element list the builders already take.
hjmjohnson
force-pushed
the
followup-bugs
branch
from
November 26, 2026 20:34
fea553f to
2003325
Compare
InsightSoftwareConsortium#315 hashed every untracked file in the ITK source into itk_commit, so a build could not reuse one made from different sources. Three cases broke it: - A CMake build tree inside the source, such as an IDE's cmake-build-release/, is untracked unless a .gitignore covers it. It was hashed in full on every run, and since each build rewrites it, ITK rebuilt every time. A directory holding CMakeCache.txt is now skipped. - git lists an untracked nested repository as one "<name>/" entry. Opening it raised IsADirectoryError, which resolved_itk_commit caught and answered with the bare commit, dropping every other change. It now counts by its own HEAD and uncommitted changes. - A dangling symlink or an unreadable file failed the same way; the symlink now counts by its target, the unreadable file by its name. File names are read as bytes, so a name that is not UTF-8 no longer raises UnicodeDecodeError.
InsightSoftwareConsortium#315 took the active pixi environment as the --platform-env default whenever its name held a hyphen, and get_default_platform_build used the same test. An unrelated environment with a hyphen, such as dev-docs, passed the environment guard and failed later as an unknown platform. is_platform_env matches the names that build wheels, <linux|manylinuxNNN|macosx|windows>-pyNNN, and both places use it.
InsightSoftwareConsortium#315 kept the backslashes of Windows paths by doubling every one before shlex.split. Inside single quotes shlex does not unescape, so '-DX=C:\a' arrived as -DX=C:\\a. On Windows, split with a shlex lexer that has no escape character, so backslashes are literal everywhere and quotes still group. Other platforms keep shlex.split's shell rules.
ITKRemoteModuleBuildTestPackageAction passes its cmake-options input as --cmake_options -DA=1 -DB=2 without quotes. --cmake_options took -DA=1, and both scripts then stopped at -DB=2 as an unexpected option (the macOS one since InsightSoftwareConsortium#315; before, it took -DB=2 for a Python version). Each further -D argument is now added to CMAKE_OPTIONS, so the action works with several options without a change there. The macOS script also looped forever on a trailing --cmake_options with no value, as shift 2 fails without shifting when one argument is left. It now shows usage, as the Linux script does.
InsightSoftwareConsortium#315 split -cmake_options on every space and trimmed quotes from each piece, so "-DX=C:\a b" became two arguments. -setup_options was split the same way without the trimming, so a quoted --lib-paths directory kept its quotes. An -cmake_options of spaces alone added a bare "--". Split-Options splits both on whitespace outside quotes and removes the quotes, keeping backslashes literal. The new test runs it with PowerShell where one is installed; it passes with Windows PowerShell 5.1 on a Windows builder.
- The Linux module script stops before downloading when MANYLINUX_VERSION has no ITK caches. - It stops when the cache script cannot be downloaded, instead of running a missing script. - --module-itk-dir enters the build fingerprint. The script tests now run in a temporary directory, so a script that downloads does not write into the checkout.
hjmjohnson
force-pushed
the
followup-bugs
branch
from
November 26, 2026 20:35
2003325 to
e6b3661
Compare
hjmjohnson
commented
Nov 26, 2026
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.
Fix the bugs and missed edge cases found while reviewing #315, one commit each, and add tests for three #315 fixes that had none. The biggest one: an untracked CMake build tree inside the ITK source (an IDE's
cmake-build-*/) was hashed intoitk_commiton every run, so ITK rebuilt every time.Merge danger: two-way door; blast radius: Linux, macOS, and Windows module builds through the CI action, and local rebuild decisions.
Shape of the change
/a:/b:/a:; the trailing:means the current directory:between entries only-xnargs=1kept only the last--exclude-libs/--lib-pathsaction="append", joined with;IsADirectoryErrorand theexceptdropped every other change; non-UTF-8 names raisedCMakeCache.txt; nested repo counts by HEAD + changes; symlink by target; unreadable file by name; names read as bytes--platform-envdefault-(e.g.dev-docs) passed the guardis_platform_env:<linux|manylinuxNNN|macosx|windows>-pyNNN, used in both placesCMAKE_OPTIONS'-DX=C:\a'-Doptions--cmake_options -DA=1 -DB=2unquoted; both shell scripts stopped at-DB=2-Dargument joinsCMAKE_OPTIONS; macOS also stops looping on a trailing--cmake_options"-DX=C:\a b"broke;-setup_optionskept quotes; spaces alone gave a bare--Split-Optionssplits on unquoted whitespace and drops quotes--module-itk-dirfingerprint had no testEvidence
pixi run -e dev python -m pytest tests -q: 526 passed, 8 skipped (macOS; the skips are the PowerShell test and a Linux-only non-UTF-8 file name test).pre-commit run --all-files: passed.Not changed