useblocks / sphinx-needs

Adds needs/requirements to sphinx
https://sphinx-needs.readthedocs.io/en/latest/index.html
MIT License
212 stars 66 forks source link

:needs: role in doxygen-breathe rst section leads to sphinx-needs crash #426

Open arwedus opened 2 years ago

arwedus commented 2 years ago

While sphinx-needs directives inside a \verbatim embed:rst section are parsed by sphinx-needs (after being imported by breathe if they are included by one of the sphinx-breathe directives), the :needs: role leads to a hard error in sphinx-needs.

I tried to use a standard sphinx role (:doc:) and a configurable role of another sphinx extension (sphinx.ext.extlink) and both work just fine.

To reproduce the error I have attached an example project.

  /**
   * NOTE: The rstinline section below leads to a hard error in sphinx-needs
   * 
   * The \rstinline{:doc:`index`} realizes \rstinline{:need:`REQ_CAT_0001` and :need:`REQ_CAT_0002`}
   * and implements \rstinline{:issue:`26`}
   */
  void meow();
twodrops commented 2 years ago

@arwedus This is a known issue and needs fix within breathe. See https://github.com/useblocks/sphinxcontrib-needs/issues/231

arwedus commented 2 years ago

indeed, indeed. Importing the same C++ class comment via a doxygennamespace directive works just fine. Thanks for the hint @twodrops