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

Doxygen links to functions disappear #438

Open
carlescufi opened this issue May 21, 2019 · 4 comments
Open

Doxygen links to functions disappear #438

carlescufi opened this issue May 21, 2019 · 4 comments

Comments

@carlescufi
Copy link

carlescufi commented May 21, 2019

Sphinx: 2.0.1
Breathe: 4.13.0.post0

I have a snippet in an .h file that goes:

/** @brief Scanning callback structure.
 *
 *  This structure is used for tracking the state of a scanning.
 *  It is registered with the help of the @ref bt_scan_cb_register API.
 *  It's permissible to register multiple instances of this @ref bt_scan_device_info
 *  type, in case different modules of an application are interested in
 *  tracking the scanning state. If a callback is not of interest for
 *  an instance, it may be set to NULL and will as a consequence not be
 *  used for that instance.
 */

I include the Doyxgen API info like so:

.. doxygengroup:: nrf_bt_scan
   :project: nrf
   :members:

The @ref to structures (e.g. @ref bt_scan_device_info) work fine with breathe, but @ref directives to functions (@ref bt_scan_cb_register) are lost, although they show correctly in the Doxygen-generated HTML, which leads me to think this is a breathe issue and not a Doxygen one.

@vermeeren
Copy link
Collaborator

Appears to be a duplicate of #400. Indeed this is likely not (fully) implemented in Breathe.

@carlescufi
Copy link
Author

carlescufi commented May 21, 2019

@melvinvermeeren perhaps, but this also fails with Doxygen's auto-linking feature: http://www.doxygen.nl/manual/autolink.html, where I simply use bt_scan_cb_register() in the doxygen comment and the link to the proper function is created, as described in the "Links to functions" section of the link above.
Also, @ref <structure name> seems to work fine, so this seems exclusive to references to functions.

@mquinson
Copy link

mquinson commented Jul 1, 2019

Same here, I don't seem to get the autolinks on functions in my code (example build -- use any jobs named 'pages' if this link fails to work in the future).

I am wondering what I'm doing wrong with regard to the doc example built from this source, but then it seems to me that this example does not contain any autolink to functions. There is a plenty to methods, some to types and enum, but I don't see any to functions.

Could you please add a simple function to that example, just to see?

Thanks for everything.

@mquinson
Copy link

mquinson commented Jul 2, 2019

I realize that my logs are long and not quite clean, so it may be difficult to see what I'm referring to. My logs are full of lines like:

warning: explicit link request to 'MSG_task_send' could not be resolved

which is weird because I have the following in the xml file produced by doxygen:

      <memberdef kind="function" id="msg_8h_1a33c924177135850888f25378b8e0b3cf" prot="public" static="no" const="no" explicit="no" inline="no" virt=
"non-virtual">
        <type>msg_error_t</type>
        <definition>msg_error_t MSG_task_send</definition>
        <argsstring>(msg_task_t task, const char *alias)</argsstring>
        <name>MSG_task_send</name>
        <param>
          <type><ref refid="classsimgrid_1_1msg_1_1Task" kindref="compound">msg_task_t</ref></type>
          <declname>task</declname>
        </param>
        <param>
          <type>const char *</type>
          <declname>alias</declname>
        </param>
        <briefdescription>
[...]

I understand that this could really be a doxygen bug or an error of mine, but since I don't see the difference between what I have and what we have in the breath examples, I'm just here to ask for an example using functions, just to see. Thanks in advance,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants