COMP: Shorten Windows build root to stay under ITK path limit#128
Merged
hjmjohnson merged 1 commit intoInsightSoftwareConsortium:mainfrom Apr 15, 2026
Merged
Conversation
Instead of unconditionally skipping ITK's path length checks, shorten the build directory path on Windows using a directory junction. The repo name is stripped of its "ITK" prefix and truncated to 12 characters (e.g. ITKFixedPointInverseDisplacementField → FixedPointIn), then a junction D:\<short> → D:\a\<full-repo-name> provides a short root for ITK clone, build, and CTest dashboard directories. This keeps ITK's 50-character path validation active as a safety check while ensuring long-named remote module repos can build on Windows CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2e1b922 to
8d8b425
Compare
dzenanz
approved these changes
Apr 15, 2026
Member
dzenanz
left a comment
There was a problem hiding this comment.
I like this solution. Have you tested it on any remote module other than FixedPointInverseDisplacementField?
Member
Author
|
@dzenanz That was the only one that had a long enough name to cause the issue. This only affects CI dashboards where only 1 item is built at at ime so thare should be no errors. |
Member
|
We changed the name of MorphologicalContourInterpolation for this reason some time ago. |
Member
|
Also, I meant does this affect negatively other modules with short names, such as e.g. |
This was referenced Apr 15, 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.
Shorten the build directory path on Windows using a directory junction instead of bypassing ITK's path length validation. The repo name is stripped of its "ITK" prefix and truncated to 12 characters, then a junction provides a short root for all build directories.
How it works
ITKFixedPointInverseDisplacementField→ stripITK→ truncate to 12 →FixedPointInD:\FixedPointIn→D:\a\ITKFixedPointInverseDisplacementFieldITK_BUILD_ROOTenv var in all subsequent steps (Download ITK, Build ITK, Configure CTest)ITK_BUILD_ROOTis just the real workspace parent (no junction needed)Path math:
D:\FixedPointIn\ITK-build= 26 chars (well under the 50-char limit).Why not ITK_SKIP_PATH_LENGTH_CHECKS?
The previous approach disabled ITK's path validation entirely. This approach keeps the safety check active — if a path is genuinely too long even after shortening, ITK will still catch it at configure time.