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

highlighting module code re-runs all files when only 1 was modified #8681

Closed
stas00 opened this issue Jan 11, 2021 · 1 comment
Closed

highlighting module code re-runs all files when only 1 was modified #8681

stas00 opened this issue Jan 11, 2021 · 1 comment
Labels
extensions type:enhancement enhance or introduce a new feature
Milestone

Comments

@stas00
Copy link

stas00 commented Jan 11, 2021

Describe the bug

currently if I built the docs already and now are modifying just a single file, a subsequent rebuild completes fast with the exception of:

highlighting module code... 

which runs on all files, and we have hundreds of those.

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/huggingface/transformers/
cd transformers
pip install -e .
cd docs
make html

then

touch source/examples.md; make html

and it re-runs the highlighting module code on all files.

Expected behavior

It shouldn't need to re-highlight source files that weren't modified.

If this is not possible, please provide a flag/env var to disable this feature completely while doing the bulk of writing and validation of a single document. Otherwise at times it's very difficult to figure out what sphinx is complaining about and requires multiple re-builds until the issue is sorted out and so this re-build needs to be very fast and currently it too slow.

Your project
https://github.com/huggingface/transformers/tree/master/docs

Environment info

  • OS: Ubuntu
  • Python version: 3.8.6
  • Sphinx version: 3.2.1
@tk0miya tk0miya added type:enhancement enhance or introduce a new feature extensions and removed type:bug labels Jan 17, 2021
@tk0miya tk0miya added this to the 3.5.0 milestone Jan 17, 2021
tk0miya added a commit to tk0miya/sphinx that referenced this issue Jan 17, 2021
Now viewcode supports incremental build. It generates HTML files only
when the original python code is updated from last build.
tk0miya added a commit that referenced this issue Jan 18, 2021
@stas00
Copy link
Author

stas00 commented Jan 18, 2021

Amazing! This is so much faster - thank you very much, @tk0miya!

zzzeek added a commit to sqlalchemyorg/zzzeeksphinx that referenced this issue Feb 15, 2021
viewcode documents that it can import modules at any
time, so vendor the parts we need so that there is no
chance of an unexpected module import due to sphinx
code changes such as sphinx-doc/sphinx#8681.

Reformat comment in docs.scss that seemed to be failing
for most recent pyscss release.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

2 participants