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

no rebuild after file changes are detected #11908

Closed
Gatherer opened this issue Jan 22, 2024 · 12 comments · Fixed by #11939
Closed

no rebuild after file changes are detected #11908

Gatherer opened this issue Jan 22, 2024 · 12 comments · Fixed by #11939
Labels

Comments

@Gatherer
Copy link

Gatherer commented Jan 22, 2024

Describe the bug

I currently update out company template from 5.3.0 to 7.2.6 (7.3.0 is planned as final version). The I noticed that documents are not rebuild. Sphinx do detect changes but somehow latexmk thinks there is nothing to do.
It is possible to do a make clean and then a rebuild. But as we often build multiple documents changes last 3 minutes instead 10 seconds. During documentation development this sums up to a lot wait time.

I tracked the point down to the 6.0.1 -> 6.1.0 update.

With 6.0.1 a change is detected and the document is rebuiild.
sphinx_6_0_1_rebuildAfterChange

Wit 6.1.0 the change is also detected but no rebuild.
sphinx_6_1_0_noRebuildAfterChange

I found the bug #11474 which describes basically the same behavior but during my tests changing the numfig setting do not show any affect.
I also tested Sphinx 7.1.0 due to the mentioned bug and the latest version 7.2.6. The behavior is the same as 6.1.0.

How to Reproduce

I have no small example. Can do it if needed.

make venv
make latexpdf
change one or multiple files
make latexpdf

Environment Information

Platform:              linux; (Linux-4.19.0-26-amd64-x86_64-with-glibc2.35)
Python version:        3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0])
Python implementation: CPython
Sphinx version:        6.0.1
Docutils version:      0.18.1
Jinja2 version:        3.1.3
Platform:              linux; (Linux-4.19.0-26-amd64-x86_64-with-glibc2.35)
Python version:        3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0])
Python implementation: CPython
Sphinx version:        6.1.0
Docutils version:      0.18.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2
Platform:              linux; (Linux-4.19.0-26-amd64-x86_64-with-glibc2.35)
Python version:        3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0])
Python implementation: CPython
Sphinx version:        7.1.0
Docutils version:      0.20.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2
Platform:              linux; (Linux-4.19.0-26-amd64-x86_64-with-glibc2.35)
Python version:        3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0])
Python implementation: CPython
Sphinx version:        7.2.6
Docutils version:      0.20.1
Jinja2 version:        3.1.3
Pygments version:      2.17.2

Sphinx extensions

requirements.txt for test with Sphinx 6.0.1 and 6.1.0

docutils==0.18.1
sphinx_rtd_theme==2.0.0
sphinx-autobuild==2021.3.14
sphinxcontrib-bibtex==2.5.0
sphinxcontrib-globalsubs==0.1.1
sphinxcontrib-scalebybuilder==0.1.1
sphinxcontrib-svg2pdfconverter==1.2.2
sphinxcontrib-wavedrom==3.0.4

requirements.txt for test with Sphinx 7.1.0 and 7.2.6

sphinx_rtd_theme==2.0.0
sphinx-autobuild==2021.3.14
sphinxcontrib-bibtex==2.6.2
sphinxcontrib-globalsubs==0.1.1
sphinxcontrib-scalebybuilder==0.1.1
sphinxcontrib-svg2pdfconverter==1.2.2
sphinxcontrib-wavedrom==3.0.4

Extension

extensions = [
    'sphinx_rtd_theme',
    'sphinx.ext.intersphinx',
    'sphinx.ext.autodoc',
    'sphinx.ext.mathjax',
    'sphinx.ext.viewcode',
    'sphinx.ext.todo',
    'sphinxcontrib.bibtex',
    'sphinxcontrib.inkscapeconverter',
    'sphinxcontrib.scalebybuilder',
    'sphinxcontrib.globalsubs',
    'sphinxcontrib.wavedrom'
]

Additional context

No response

@AA-Turner
Copy link
Member

cc: @jfbu

@jfbu
Copy link
Contributor

jfbu commented Jan 22, 2024

Try make latexpdf LATEXMKOPTS="-g" as workaround.

I can not reproduce on simple examples so a minimal example would be much appreciated.

@Gatherer
Copy link
Author

OK, will create one.

@jayaddison jayaddison added type:bug awaiting:response Waiting for a response from the author of this issue labels Jan 23, 2024
@Gatherer
Copy link
Author

Don´t worry. It last a bit because I´m still on it.

@Gatherer
Copy link
Author

Gatherer commented Jan 29, 2024

@ban2st interessting findings but they not match what I see or already tested.

  • As I wrote I tested numfig = False, no change in the behavior -> I will retest it just to double check
  • During my tests I only changes one file as seen in the screenshot, the hole document only consist of two files, index.rst and demo.rst

What might be interesting is disabling the parallel build. Need to check how to do it. The logfile show that this one a new feature in 6.1.0

  • Cache doctrees in the build environment during the writing phase.
  • Make all writing phase tasks support parallel execution.

Currently I quite busy at work and this is a background task. I will to schedule it this week.

PS: not sure why ban2st deleted his post. At least I have one new point to check.

@ban2st
Copy link

ban2st commented Jan 29, 2024

@Gatherer sorry, moved my post to the other related issue #11474 as I think it fits there better after re-reading your issue (as you also stated)

@Gatherer
Copy link
Author

Hello,

I finally boiled it done to a small example project. The outcome is not what I expected as I did end up in bug #11474. I have to retest more thinks but I was able to put it into a two github repos. This setup is maybe not the common but it is as near on the original git setup structure and as small as possible.

I just saw that there is already a pull request so maybe it's a bit late.
To reproduce the problem clone the sphinx debug repository git clone --recursive https://github.com/Gatherer/sphinx_debug_repo . This has a second repository as submodule.

To test it do the following

- check out sphinx_debug_repo either with --recursive or do a update --init later
- make venv
- make latexpdf
- change something in stuff.rst
- make latexpdf 

This should work.

- then uncomment numfig = True in submodule conf.py, line 135
- make clean
- make latexpdf
- change something in stuff.rst
- make latexpdf

The second run always fails for me. I can reproduce it with these two projects over and over again.

On another project I do have the same error. The PDF is updated even the PDF is rebuild. I also can trigger this behavior by enabling and disabling numfig = true

Will look forward to your answer.

@picnixz
Copy link
Member

picnixz commented Feb 10, 2024

Does my PR fix your issue actually?

@picnixz picnixz removed the awaiting:response Waiting for a response from the author of this issue label Feb 10, 2024
@Gatherer
Copy link
Author

Yes, it fixes the problem in both project I mentioned in the comment above and in the original one where I discovered the problem.

@Gatherer
Copy link
Author

Gatherer commented Mar 5, 2024

Hello all,

is there any update? Will the fix be applied? You need more / other information's?

@picnixz
Copy link
Member

picnixz commented Mar 5, 2024

The only thing I am wondering about is how much it could impact the build of very large projects but I think I'll merge it next week (I am currently travelling).

@Gatherer
Copy link
Author

Gatherer commented Mar 6, 2024

The only thing I am wondering about is how much it could impact the build of very large projects but I think I'll merge it next week (I am currently travelling).

Happy traveling

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

Successfully merging a pull request may close this issue.

6 participants