Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle long module path names on Windows #20

Open
tbirdso opened this issue Dec 5, 2022 · 4 comments
Open

Handle long module path names on Windows #20

tbirdso opened this issue Dec 5, 2022 · 4 comments

Comments

@tbirdso
Copy link
Collaborator

tbirdso commented Dec 5, 2022

See cxx failures due to long module name: https://github.com/KitwareMedical/ITKMorphologicalContourInterpolation/actions/runs/3622628311/jobs/6107569800

@dzenanz
Copy link
Member

dzenanz commented Dec 5, 2022

@tbirdso
Copy link
Collaborator Author

tbirdso commented Dec 5, 2022

Yes, but as changing the module name obscures the directory structure and makes debugging more difficult it would be highly preferable to only change the working directory where needed, i.e. on Windows. Working to determine whether this can be done by setting environment variables to persist across Github Actions steps.

@thewtex
Copy link
Member

thewtex commented Dec 6, 2022

Worth investigating going up another directory here:

file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/.." CTEST_DASHBOARD_ROOT)
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/" CTEST_SOURCE_DIRECTORY)
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../build" CTEST_BINARY_DIRECTORY)

i.e.

         file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../.." CTEST_DASHBOARD_ROOT) 
         file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/" CTEST_SOURCE_DIRECTORY) 
         file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../../build" CTEST_BINARY_DIRECTORY) 

@tbirdso
Copy link
Collaborator Author

tbirdso commented Dec 6, 2022

After fiddling for too long today with passing environment path names between shells (bash, command prompt, powershell) I've decided preserving non-offending module directory names is not worth more time for investigation in the short term. Preparing a PR to simply move the working source directory to ../../im as we do in the Python workflow. If there is tangible negative impact on collaborators' investigation due to path renaming then I can spend more time on this in the future.

tbirdso added a commit that referenced this issue Dec 6, 2022
An issue has been observed where attempting to build modules with very
large path lengths exceeds the Windows path length constraint for cxx
builds. A fix is introduced where all cxx builds will use the working
directory "im" for a shorter length.

See #20
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

No branches or pull requests

3 participants