conf: switch breathe to import into cpp domain#207
conf: switch breathe to import into cpp domain#207deb-intel merged 1 commit intothesofproject:masterfrom
Conversation
|
The page https://breathe.readthedocs.io/en/latest/directives.html says:
This commit does something very different... care to elaborate? |
|
@marc-hb With this commit, breathe stops enforcing C and this seems to be enough for consistent import. Running breathe with different options I found that it imports everything into cpp domain w/o extra options, cpp seems to be the default one, and the output is correct (see also breathe-doc/breathe#282 (comment)). Note that doxygen always outputs |
I think this wouldn't hurt in the commit message. To be honest I think you could just copy your entire last comment in the commit message. PS: breathe seems unfortunately unmaintained breathe-doc/breathe#444 (comment) |
Cpp domain provides much better formatting in Sphinx. Initialized enum items are correctly displayed, pointer to functions typedef-ed in place also works fine. Other projects also tend to use cpp domain for import from C headers. With this commit, breathe stops enforcing C and this seems to be enough for consistent import. Running breathe with different options I found that it imports everything into cpp domain w/o extra options, cpp seems to be the default one, and the output is correct (see also breathe-doc/breathe#282 (comment)). Note that doxygen always outputs <compounddef id="component_8h" kind="file" language="C++">. The doxygen is already configured with OPTIMIZE_OUTPUT_FOR_C = YES and adding EXTENSION_MAPPING = h=C does not make any difference too. Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
|
@marc-hb Sure, the explanation pasted into the commit message. |
|
I had to revert this locally because it causes my sphinx+breathe versions to fail like this: This is the small bit of the long traceback in Last time I tried to debug breathe I got totally lost in the many layers of OO (Object Obfuscation) and I already spent too many hours finding this particular workaround so I won't investigate further. Who knows, maybe some upgrade will fix it (not a breathe upgrade as it's not maintained anymore) I'll keep carrying this revert locally, mentioning it here just for the record and in case it can help someone else. |
|
This should be fixed by running: pip3 install -r requirements.txt Looks like someone updated the dependencies. |
We relaxed the requirements in commit 0097633
Almost! I downgraded sphinx and the failure goes away. Then I tried a few different versions in https://pypi.org/project/Sphinx/#history and I found the issue starts happening with (Another workaround is not to use doxygen at all, see PR #212 for more background) |
|
Doh! After googling the error I discovered I was running an old version of breathe-doc/breathe#411 |
Cpp domain provides much better formatting in Sphinx.
Initialized enum items are correctly displayed, pointer
to functions typedef-ed in place also works fine.
Other projects also tend to use cpp domain for import
from C headers.
Signed-off-by: Marcin Maka marcin.maka@linux.intel.com