exhale icon indicating copy to clipboard operation
exhale copied to clipboard

Windows path length issues

Open svenevs opened this issue 2 years ago • 4 comments

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.

svenevs avatar Mar 29 '23 04:03 svenevs

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.

HexDecimal avatar Mar 29 '23 05:03 HexDecimal

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.

svenevs avatar Mar 29 '23 05:03 svenevs

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 avatar Mar 29 '23 06:03 HexDecimal

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.")

HexDecimal avatar Mar 29 '23 06:03 HexDecimal