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

Did someone generate documentation from a Thrift Idl? #7029

Open
joseAndresGomezTovar opened this issue Jun 5, 2019 · 10 comments
Open

Did someone generate documentation from a Thrift Idl? #7029

joseAndresGomezTovar opened this issue Jun 5, 2019 · 10 comments
Labels
enhancement a request to enhance doxygen, not a bug

Comments

@joseAndresGomezTovar
Copy link

joseAndresGomezTovar commented Jun 5, 2019

I'm trying to generate an html documentation file from a Thrift IDL.
This is the example.idl

Capture

The generated html is like this:
Capture2

There is a warning:
example.idl:1: warning: Member __pad0__ (variable) of class Session is not documented.

Does anyone know how I can generate the documentation correctly?

-> Is there anyone who tries to debug doxygen and modify the source code? There are more than 594,914 lines of code! :) The warning appears in the writeDeclaration method of memberdef.cpp and for now I can not say anything else.

doxygen 1.8.15
This is a thrift idl file with a ; at the end of a variable definition
example.zip
This is the original thrift idl file
example-original.zip
This is the configuration file
Doxyfile.zip

The syntax description is here:
https://thrift.apache.org/docs/idl

@albert-github albert-github added the needinfo reported bug is incomplete, please add additional info label Jun 5, 2019
@albert-github
Copy link
Collaborator

Issue has also been posted as: https://stackoverflow.com/questions/56456135/did-someone-generate-with-doxygen-a-html-documentation-from-a-thrift-idl

  • Can you please attach a, small, self contained example (source+configuration file in a tar or zip) that allows us to reproduce the problem? Please don't add external links as they might not be persistent.
  • Please also specify the doxygen version used.

@joseAndresGomezTovar
Copy link
Author

  1. doxygen 1.8.15
  2. This is a thrift idl file with a ; at the end of a variable definition
    example.zip
  3. This is the original thrift idl file
    example-original.zip
  4. This is the configuration file
    Doxyfile.zip

@albert-github
Copy link
Collaborator

albert-github commented Jun 5, 2019

When I run doxygen I get:

Corrected

...//example.idl:8: warning: documented symbol `Session::sessionId' was not declared or defined.
.../example.idl:1: warning: Member __pad0__ (variable) of class Session is not documented.

Original

.../example-original.idl:8: warning: documented symbol `Session::sessionId' was not declared or defined.

Note: in the "original example" the Session::sessionId should be Session2::sessionId but this is not the cause of the problem.

Are these the messages you refer to?
So in the "corrected" version you get an extra warning (plus the documented attribute with the name __pad0__ (name should probably be sessionId)).

  • it there anywhere a, free, syntax description of the IDL language as 1 document (preferably pdf)?

@albert-github
Copy link
Collaborator

Regarding your question about "Is there anyone who tries to debug doxygen and modify the source code? "

I think in this case a good starting point would be scanner.l.
To "debug" scanner.l place it in debug mode i.e.:

  • touch scanner.l (to be sure it will be rebuild)
  • make LEX_FLAGS=-d / nmake LEX_FLAGS=-d

This might give a lot of output so use a minimal example. Also first look at a part where the generation is OK so you can get a little bit a feeling about what the LEX_FLAGS=-d does.

@joseAndresGomezTovar
Copy link
Author

The syntax description is here:
https://thrift.apache.org/docs/idl

@albert-github
Copy link
Collaborator

As far as I can see Apache Thrift IDL and CORBA IDL are completely different, is this correct?
or is it just another flavor of Corba, Microsoft, and UNO/OpenOffice IDL?

@joseAndresGomezTovar
Copy link
Author

As far as I can see Apache Thrift IDL and CORBA IDL are completely different, is this correct?

Yes it is completely different

@albert-github albert-github added enhancement a request to enhance doxygen, not a bug and removed needinfo reported bug is incomplete, please add additional info labels Jun 6, 2019
@albert-github
Copy link
Collaborator

OK this explains why doxygen gets confused.
There are a few ways to have doxygen understand it e.g.:

  • create (and maintain) an INPUT_FILTER (/ FILTER_PATTERNS) filter that converts the Apache Thrift IDL format to a format that is understood by doxygen
  • write (and maintain) a separate parser ('scanner' and 'code') for it.

@joseAndresGomezTovar
Copy link
Author

joseAndresGomezTovar commented Jun 6, 2019

Do you have a guide/document about:

  • How can I create a INPUT_FILTER/FILTER_PATTERNS? Is this a c++ code or a script?
  • How can I write a 'scanner' and a 'code' parser ? Is there any other language that uses a separate parser?

Thank you in advance

@albert-github
Copy link
Collaborator

albert-github commented Jun 6, 2019

  • How can I create a INPUT_FILTER/FILTER_PATTERNS? Is this a c++ code or a script?
    this can in principle be written in any language, the user must have the possibility to start it (so might need to install some packages for it). For some hints in this direction see http://www.doxygen.nl/helpers.html

  • How can I write a 'scanner' and a 'code' parser ?
    see the existing scanners / code parsers in the src directory of doxygen

  • Is there any other language that uses a separate parser?
    there are a couple of languages that use their own parsers a.o. Fortran, python, vhdl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement a request to enhance doxygen, not a bug
Projects
None yet
Development

No branches or pull requests

2 participants