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

Directories reports an absolute directory rather than relative, and in worst case shows all parent directories #71

Closed
rkent opened this issue Mar 21, 2024 · 3 comments · Fixed by #111

Comments

@rkent
Copy link
Contributor

rkent commented Mar 21, 2024

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:

Directory path: /tmp/ws/src

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:

rosdoc2 build -p . -d /tmp/rkent/docs_output

Then the directories listing at http://localhost:8001/docs_output/fqdemo_nodes/generated/index.html#directories shows:

Directories
    [Directory home]
    [Directory kent]
    [Directory github]
    [Directory ros2]
    [Directory demos]
    [Directory demo_nodes_cpp]
    [Directory include]
    [Directory demo_nodes_cpp]

Instead, it should just show include and demo_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.

@rkent
Copy link
Contributor Author

rkent commented Mar 21, 2024

Fixed with test in my repo branch

@tfoote
Copy link
Member

tfoote commented Mar 26, 2024

That's quite a obscure option that seems like it should be on by default.

Diff for easier reivew: main...rkent:rosdoc2:Only-show-relative-directories-#71

It looks ready to merge. Is there anything else you feel needs to be checked before opening a PR on this?

@rkent
Copy link
Contributor Author

rkent commented Mar 26, 2024

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.

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

Successfully merging a pull request may close this issue.

2 participants