Closed rouge8 closed 4 years ago
Its not just code affected by this but static resources like css too.
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.
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.
This seems to be caused by https://github.com/sphinx-doc/sphinx/issues/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.
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. :)
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. :)
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
Extracted from my comment on #31: When I save, it triggers the rebuild as expected, but the built content is not actually changed.
Command:
Output: