svenevs / exhale

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

Support linking to external docs using Doxygen tags #63

Open jdemilledt opened 5 years ago

jdemilledt commented 5 years ago

When I try to link to STL components using the cppreference.com Doxygen tag, I get the following error:

[+] Exhale: doxygen ran successfully in 0.81 seconds.
[~] Exhale: adding tree view css / javascript.
[+] Exhale: added tree view css / javascript.
[~] Exhale: parsing Doxygen XML.
[+] Exhale: finished parsing Doxygen XML in 0.04 seconds.
[~] Exhale: generating reStructuredText documents.
(!) Critical error while generating the file for [<REDACTED>].Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/exhale/graph.py", line 2574, in generateSingleNodeRST
    node.base_compounds, self.node_by_refid
  File "/usr/local/lib/python3.7/site-packages/exhale/graph.py", line 395, in baseOrDerivedListString
    link=nodeByRefid[refid].link_name
KeyError: 'cpp/error/exception'
make: *** [html] Error 1
svenevs commented 5 years ago

When I try to link to STL components using the cppreference.com

Oh that sounds nice. Can you provide a brief sample code / docstring of how that is actually done with doxygen? It seems like the code being processed was some kind of class or struct that was inheriting from an STL type? I didn't know doxygen linked to this...should be fixable though.

jdemilledt commented 5 years ago

https://en.cppreference.com/w/Cppreference:Archives

jdemilledt commented 5 years ago

Doxygen automatically links based on the names defined in the tag file. For example, I have an exception type inheriting from std::exception, and Doxygen automatically links it.

svenevs commented 5 years ago

Ah very interesting. This may take some doing...I will see if I can patch this weekend, can you show the exact configuration you send to doxygen for the tagfile? Like do you track it locally or do you download it or other?

What I'll need to do is populate a new mapping for tagfile refids.

For now, unfortunately, you're going to need to disable the tagfile since exhale implicitly assumes every refid shows up in index.xml :/ I didn't know about these...

jdemilledt commented 5 years ago

TAGFILES += cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/