Closed rkent closed 2 months ago
Fixed with test in my repo branch
That's quite a obscure option that seems like it should be on by default.
Diff for easier reivew: https://github.com/ros-infrastructure/rosdoc2/compare/main...rkent:rosdoc2:Only-show-relative-directories-%2371
It looks ready to merge. Is there anything else you feel needs to be checked before opening a PR on this?
There could be a couple of concerns. One is cross-package links. I believe my most advanced branch has a test case for that, I'll check. Also exhale includes a lot of commentary on this option that I don't really understand. So I want to examine it some more. It's one of those issues that seem trivial, but could have unforeseen consequences if it messes with links.
When you run rosdoc2 on a C++ project, the Directories html shows the full path to the original directory, which is typically in some sort of staging location. It should show the relative directory.
For example, In https://docs.ros.org/en/rolling/p/rosbag2_cpp/generated/dir__tmp_ws_src.html we have:
which is exposing the buildfarm directories used here. '/tmp/ws' is of no interest, it should just say 'src'.
Worse, if the doc build directory is specified, then the Directories list will go all the way back to the drive root. So if I run rosdoc2 in /home/kent/github/ros2/demos/demo_nodes_cpp with:
Then the directories listing at
http://localhost:8001/docs_output/fqdemo_nodes/generated/index.html#directories
shows:Instead, it should just show
include
anddemo_nodes_cpp
The fix to this is relatively straightforward: set STRIP_FROM_PATH in the Doxyfile. I'll give a PR with that change, but I would like to add a test for it so I'll wait for the my previous PR.