svenevs / exhale

Automatic C++ library api documentation generation: breathe doxygen in and exhale it out.
BSD 3-Clause "New" or "Revised" License
218 stars 51 forks source link

Windows path length issues #192

Open svenevs opened 1 year ago

svenevs commented 1 year ago

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

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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