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

Documentation does not update on changes to code/theme/static files #34

Closed
rouge8 opened this issue Sep 8, 2015 · 7 comments
Closed

Comments

@rouge8
Copy link

rouge8 commented Sep 8, 2015

Extracted from my comment on #31: When I save, it triggers the rebuild as expected, but the built content is not actually changed.

Command:

sphinx-autobuild -E -a -z /Users/rouge8/rj/fathom-assets/fathom_assets -n -b html -d /Users/rouge8/rj/fathom-assets/.tox/docs-dev/tmp/doctrees . _build/html

Output:

+--------- ../fathom_assets/query/managers.py changed ---------------------------
| Running Sphinx v1.3.1
| loading intersphinx inventory from https://docs.python.org/2.7/objects.inv...
| building [mo]: all of 0 po files
| building [html]: all source files
| updating environment: 3 added, 0 changed, 0 removed
| reading sources... [ 33%] api
| reading sources... [ 66%] index
| reading sources... [100%] queries
|
| looking for now-outdated files... none found
| pickling environment... done
| checking consistency... done
| preparing documents... done
| writing output... [ 33%] api
| writing output... [ 66%] index
| writing output... [100%] queries
|
| generating indices... genindex py-modindex
| highlighting module code... [ 25%] fathom_assets.query.managers
| highlighting module code... [ 50%] fathom_assets.query.terms
| highlighting module code... [ 75%] fathom_assets.query.query
| highlighting module code... [100%] fathom_assets.query.nodes
|
| writing additional pages... search
| copying static files... done
| copying extra files... done
| dumping search index in English (code: en) ... done
| dumping object inventory... done
| build succeeded.
+--------------------------------------------------------------------------------


+--------- ../fathom_assets/query/managers.py changed ---------------------------
| Running Sphinx v1.3.1
| loading intersphinx inventory from https://docs.python.org/2.7/objects.inv...
| building [mo]: all of 0 po files
| building [html]: all source files
| updating environment: 3 added, 0 changed, 0 removed
| reading sources... [ 33%] api
| reading sources... [ 66%] index
| reading sources... [100%] queries
|
| looking for now-outdated files... none found
| pickling environment... done
| checking consistency... done
| preparing documents... done
| writing output... [ 33%] api
| writing output... [ 66%] index
| writing output... [100%] queries
|
| generating indices... genindex py-modindex
| highlighting module code... [ 25%] fathom_assets.query.managers
| highlighting module code... [ 50%] fathom_assets.query.terms
| highlighting module code... [ 75%] fathom_assets.query.query
| highlighting module code... [100%] fathom_assets.query.nodes
|
| writing additional pages... search
| copying static files... done
| copying extra files... done
| dumping search index in English (code: en) ... done
| dumping object inventory... done
| build succeeded.
+--------------------------------------------------------------------------------

[I 150904 01:55:34 handlers:91] Reload 1 waiters: None
[I 150904 01:55:34 handlers:131] Browser Connected: http://127.0.0.1:8000/api.html#module-fathom_assets.query.managers
@Ramblurr
Copy link

Its not just code affected by this but static resources like css too.

@ebw44
Copy link

ebw44 commented Sep 4, 2018

I've got a similar issue with sphinx.ext.todo. The .. todolist:: doesn't get updated if the rst file that contains it is not modified and you only add a .. todo:: in another file.
I suppose sphinx-autobuild is building only files that have changed, it can however update references from toctree, so it would be great if it could also work for todo.

PS: Thanks for the great tool by the way.

@SunbrightShinobi
Copy link

I have a similar issue with .jinja files. autobuild detects the update to the Jinja file but has no knowledge to drive a rebuild of the .rst file(s) that uses it, so the actual document doesn't update. I have to just resave the .rst file to update. That works for one .rst file but not if the template is used in multiple different .rst files.

@pradyunsg
Copy link
Collaborator

This seems to be caused by sphinx-doc/sphinx#2090 -- Sphinx itself isn't handling such changes correctly in incremental builds.

Looks like fixing upstream might be easier than working around this behavior locally. I'll look into this, hopefully soon-ish.

@pradyunsg pradyunsg added the bug label Aug 20, 2020
@pradyunsg pradyunsg changed the title Autoreload on code changes doesn't update built docs Documentation does not update on changes to code/theme/static files Aug 27, 2020
@pradyunsg
Copy link
Collaborator

pradyunsg commented Aug 27, 2020

This behaviour is now documented under https://github.com/GaretJax/sphinx-autobuild#relevant-sphinx-bugs. I'm not going to be able to contribute a patch to fix this upstream (it's a lot more involved that I can do), but for the time being, I think this documentation-only fix is sufficient.

If someone has any suggestions for how we can workaround this issue more transparently, while not being a big maintainance burden, I'm all ears. :)

@pradyunsg pradyunsg added wontfix and removed bug labels Aug 27, 2020
@pradyunsg
Copy link
Collaborator

Going to go ahead and close this now as a wontfix, since I genuinely don't think that there's anything that can be done at the level of this tool to fix this issue.

If someone does think there is something we can do, please feel free to drop a comment here. It's not like closed issues can't be reopened. :)

@linusmarco
Copy link
Contributor

It appears that the underlying issue is at least partially fixed! Now I get automatic rebuilds and browser reloads when I update my code files (as long as the directory they're in is watched). Still no reloads for other static files, but the code files were the biggest pain point since that's where most of the docs live for many of us using autodoc.

@pradyunsg

linusmarco added a commit to linusmarco/sphinx-autobuild that referenced this issue Nov 10, 2023
pradyunsg added a commit that referenced this issue Dec 21, 2023
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

6 participants