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

Fix domain detection when rendering groups. #365

Merged
merged 1 commit into from
May 22, 2018

Conversation

rkapl
Copy link
Contributor

@rkapl rkapl commented Feb 16, 2018

Groups themselves do not have any filenames, so the detection must be
done on lower level. However, compound signatures were rendered in the
context of the group, with the default domain (C++) . This lead to all kinds of
missed reference from C domain code.

For example, let's have in test.h:
/** @ingroup test */ typedef struct {} example_t;
and /** @ingroup test */ void user(example_t arg);

Breathe is configured to recognize .h files as C domain. If you use doxygenfile, the links work correctly. If you use doxygengroup, the the arguments of the user function are not links and example_t is in the C++ domain.

Groups themselves do not have any filenames, so the detection must be
done on lower level. However, compound signatures were rendered in the
context of the group, with the default domain (C++) . This lead to all kinds of
missed reference from C domain code.
@vermeeren vermeeren self-assigned this May 16, 2018
@vermeeren vermeeren added bug Problem in existing code code Source code labels May 21, 2018
@vermeeren
Copy link
Collaborator

Hi, sorry for the wait. The changes look good to me, but I can't test an example locally.

I created a .h file in a project:

#pragma once

/** @ingroup test */
typedef struct
{
} example_t;

/** @ingroup test */
void user(example_t arg);

But get:

WARNING: doxygengroup: Cannot find namespace "test" in doxygen xml output for project "__PROJECT_NAME__" from directory: /.../build/tmp/doc/doxygen/xml

Checking the generated XML the word test is nowhere to be found. Is there something that should be enabled in Doxyfile for this to work?

@rkapl
Copy link
Contributor Author

rkapl commented May 22, 2018

Sorry, please also add /** @defgroup test */. To the example file.

@vermeeren
Copy link
Collaborator

Thanks for the quick reply.

screenshot_20180522_215804

Just to make sure I get it properly, the only difference is that in void user(example_t arg) the example_t type is now in the correct domain and thus a link, right?

@rkapl
Copy link
Contributor Author

rkapl commented May 22, 2018

Yes, the point was to make these links work. Maybe it also affects something else, but I don't know.

@vermeeren vermeeren merged commit 630b567 into breathe-doc:master May 22, 2018
vermeeren added a commit that referenced this pull request May 22, 2018
@vermeeren
Copy link
Collaborator

Merged, thank you for the PR.

vermeeren added a commit that referenced this pull request May 24, 2018
vermeeren added a commit that referenced this pull request Jun 4, 2018
vermeeren added a commit that referenced this pull request Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Problem in existing code code Source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants