svenevs / exhale

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

KeyError: 'concept' when listing nodes to console #195

Open 5p4k opened 1 year ago

5p4k commented 1 year ago

It seems that Doxygen and Breathe now generate also concept entries from C++20. Exhale is wise enough to ignore kinds that it doesn't know how to handle:

(!) Unabridged API: unexpected kind 'concept' (IGNORED)

however, it fails later on because it does not have a color in fmt_spec for unknown kinds:

(!) Exhale: could not generate reStructuredText documents :/Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/exhale/__init__.py", line 25, in environment_ready
    deploy.explode()
  File "/usr/local/lib/python3.10/site-packages/exhale/deploy.py", line 421, in explode
    textRoot.toConsole()
  File "/usr/local/lib/python3.10/site-packages/exhale/graph.py", line 4248, in toConsole
    self.consoleFormat(
  File "/usr/local/lib/python3.10/site-packages/exhale/graph.py", line 4310, in consoleFormat
    l.toConsole(0, fmt_spec)
  File "/usr/local/lib/python3.10/site-packages/exhale/graph.py", line 595, in toConsole
    c.toConsole(level + 1, fmt_spec)
  File "/usr/local/lib/python3.10/site-packages/exhale/graph.py", line 568, in toConsole
    kind=utils._use_color(self.kind, fmt_spec[self.kind], sys.stderr),
KeyError: 'concept'
make: *** [Makefile:24: html] Error 1

I will post a PR associated to this issue in a few minutes, that will simply pick red when the kind is not known.

florianhumblot commented 1 year ago

I'll try to have a look at adding tests to your PR when I get a chance hopefully by the end of the week and then I'll try to review it ASAP