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

AssertionError on domains/c.py #8580

Closed
inconstxpr opened this issue Dec 22, 2020 · 1 comment
Closed

AssertionError on domains/c.py #8580

inconstxpr opened this issue Dec 22, 2020 · 1 comment

Comments

@inconstxpr
Copy link

Describe the bug
I have set up a CMake project that generates documentation for C using doxygen, breathe and sphinx, following this guide. The sphinx target depends on sphinx/index.html, which can be generated by a custom command that in turn, depends on doxygen/xml/index.xml.

When using Visual Studio, Build > Clean All deletes all files that are generated by the build, in this case doxygen/xml/index.xml and sphinx/index.html. After that, the next build will fail with:

Exception occurred:
    File "c:\python39\lib\site-packages\sphinx\domains\c.py", line 1532, in _fill_empty
      assert line is not None
  AssertionError

After getting the error, running Build > Clean All and then another build works without problems. It alternates between the two, so the next cycle will give the same error. This is not exclusive to Visual Studio.

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/inconstxpr/icanc.git
$ cd icanc
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build . --target sphinx # works
$ rm docs/doxygen/xml/index.xml
$ rm docs/sphinx/index.html
$ cmake --build . --target sphinx # error
$ rm docs/doxygen/xml/index.xml
$ # sphinx/index.html was not generated
$ cmake --build . --target sphinx # works

Expected behavior
The build should work every time.

Your project
https://github.com/inconstxpr/icanc.git

Environment info

  • OS: Windows 10
  • Python version: 3.9.0
  • Sphinx version: 3.3.0
  • Sphinx extensions: breathe
  • Extra tools: CMake 3.19.0
@jakobandersen
Copy link
Contributor

It looks like this could be the same problem reported and fixed in #8364. Try upgrading to a newer version of Sphinx. If it doesn't fix it, please reopen the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants