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

tag </programlisting> was inserted before </highlight> parsing python / cpp file to xml #8518

Closed
sdrgroup opened this issue Apr 25, 2021 · 8 comments

Comments

@sdrgroup
Copy link

Describe the bug
Describe what you see that (you think) is wrong.
When I parse a python file,reflection_test.py, the output file reflection__test_8py.xml is error. The tag was inserted before .
Expected behavior
Describe what you would have expected or think is correct.
The tag should be after .
Screenshots
If useful, add screenshots to help explain your problem.
2021-04-25 19-16-58

To Reproduce
Attach a self contained example that allows us to reproduce the problem.
Such an example typically exist of some source code (can be dummy code) and a doxygen configuration file used (you can strip it using doxygen -s -u). After you verified the example demonstrates the problem, put it in a zip (or tarball) and attach it to the bug report. Try to avoid linking to external sources, since they might disappear in the future.
reflection_test.zip

Version
Mention the version of doxygen used (output of doxygen --version) and the platform on which you run doxygen (e.g. Windows 10, 64 bit). If you run doxygen under Linux please also mention the name and version of the distribution used (output of lsb_release -a) and mention if you compiled doxygen yourself or that you use a binary that comes with the distribution or from the doxygen website.
1.9.1
Stack trace
If you encounter a crash and can build doxygen from sources yourself with debug info (-DCMAKE_BUILD_TYPE=Debug), a stack trace can be very helpful (especially if it is not possible to capture the problem in a small example that can be shared).

Additional context
Add any other context about the problem here.

@sdrgroup
Copy link
Author

my os is ubuntu 20.04

@albert-github albert-github added bug XML XML Output labels Apr 25, 2021
albert-github added a commit to albert-github/doxygen that referenced this issue Apr 25, 2021
…ght> parsing python file to xml

Doxygen expects that decorators don't have a return in them, but the complicated decorator:
```
   @basetest.unittest.skipIf(
      api_implementation.Type() != 'cpp' or api_implementation.Version() != 2,
       'Errors are only available from the most recent C++ implementation.')
```
has some in them.
This leads to the mentioned problem as well as that the line counting is incorrect (we see that the last mentioned lie number in the xml file is 2964 though the file has 2966 lines). By fixing this (and also the line counting in the python scanner) the problem looks to be handled.
@albert-github
Copy link
Collaborator

I've just pushed a proposed patch, pull request #8519

doxygen added a commit that referenced this issue Apr 27, 2021
issue #8518 tag </programlisting> was inserted before </highlight> parsing python file to xml
@albert-github
Copy link
Collaborator

Code has been integrated in master on github (please don't close the issue as this will be done at the moment of an official release).

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Apr 28, 2021
@sdrgroup
Copy link
Author

there is a same error when parsing another .h file.

wire_format_lite_inl.zip
the error is as below:
image

@albert-github albert-github added C/C++ and removed fixed but not released Bug is fixed in github, but still needs to make its way to an official release labels Apr 29, 2021
@albert-github
Copy link
Collaborator

Normally it would be better to open a new issue as we see here that the input file giving a problem is a cpp related file and not python related. The result on the output is the same though.

The offending parts are (as far as I quickly saw):
around line 778

  target = value.MessageType_WorkAroundCppLookupDefect
      ::SerializeWithCachedSizesToArray(target);

and around line 788

  return value.MessageType_WorkAroundCppLookupDefect
      ::SerializeWithCachedSizesToArray(target);

when, as a workaround but probably not feasible due to coding guidelines, removing the \n it looks OK again.

albert-github added a commit to albert-github/doxygen that referenced this issue Apr 29, 2021
…ght> parsing cpp file to xml

The possible `\n` was not taken into account when codifying the line(s).
@albert-github albert-github changed the title tag </programlisting> was inserted before </highlight> parsing python file to xml tag </programlisting> was inserted before </highlight> parsing python / cpp file to xml Apr 29, 2021
@albert-github
Copy link
Collaborator

For the second problem (cpp related), I've just pushed a proposed patch, pull request #8524

doxygen added a commit that referenced this issue Apr 29, 2021
issue #8518 tag </programlisting> was inserted before </highlight> parsing cpp file to xml
@albert-github
Copy link
Collaborator

Code for second problem has been integrated in master on github (please don't close the issue as this will be done at the moment of an official release).

@albert-github albert-github added the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Apr 29, 2021
@doxygen
Copy link
Owner

doxygen commented Aug 18, 2021

This issue was previously marked 'fixed but not released',
which means it should be fixed in doxygen version 1.9.2.
Please verify if this is indeed the case. Reopen the
issue if you think it is not fixed and please include any additional information
that you think can be relevant (preferably in the form of a self-contained example).

@doxygen doxygen removed the fixed but not released Bug is fixed in github, but still needs to make its way to an official release label Aug 18, 2021
@doxygen doxygen closed this as completed Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants