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

Windows path length issues #192

Open
svenevs opened this issue Mar 29, 2023 · 4 comments
Open

Windows path length issues #192

svenevs opened this issue Mar 29, 2023 · 4 comments

Comments

@svenevs
Copy link
Owner

svenevs commented Mar 29, 2023

See discussion in #175. Windows users struggle.

exhale/testing/projects/cpp_long_names/docs_CPPLongNames_test_file_hierarchy/_doxygen/xml/classclass__that__is__longer__than__two__hundred__and__fifty__five__characters__long__which__is_b3ede03b695ca987c2d4a4e7f05f30e3.xml
  • Filename itself is 132 characters coming from doxygen
  • Exhale path itself is 222 characters.

Might be able to add a check in for developers that checks if they are on windows and if so look at where they have cloned and make sure it is not too long (encourage them to clone to C:\dev or something).

Or I guess use the magic \\?\ shenangians? (Don't want to go down that road again, exhale can handle longer paths than sphinx, I'm not the full bottleneck).

I do generally treat this as a "not my problem" aka blame windows issue. While it is also true that this prevents windows users from contributing as easily. Some kind of balance should be found.

@HexDecimal
Copy link

Simple solution: Tell pytest to xfail that test if run locally on Windows.

Or I guess use the magic \\?\ shenangians

Won't work. I remember the issue was with Doxygen itself, not in the Python scripts. Without a workaround the issue would need to be fixed upstream.

@svenevs
Copy link
Owner Author

svenevs commented Mar 29, 2023

Ok good points, thanks! I think local xfail + a quick check in tox.ini printing a warning if that seems likely (so they know why).

Exhale could also choose different test directory names / paths to stage tests in. That sounds like a long term wish list item with the brief "fix it for local devs" being the priority.

@HexDecimal
Copy link

Exhale could also choose different test directory

Using a temp directory should work. Those are usually not nested too deeply. Using tmp_path from Pytest for example. It's something I could try later.

@HexDecimal
Copy link

In other cases, one can also give a reason with xfail:

@pytest.mark.xfail(sys.platform == "win32", reason="Paths my be too long for Windows.")

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

2 participants