-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Building docs only work the first time (for non-doc modifications) #120
Comments
I think this could be solved by implementing the proper callbacks to app.connect('env-get-updated', get_updated)
# and
app.connect('env-get-outdated', get_outdated) but the lack of docs on the matter makes it hard to understand exactly what would need to be done in those functions. (The doc : https://www.sphinx-doc.org/en/master/extdev/appapi.html#events ) Just to make it clear, I understand that this is not a real problem for pylibssh and removing the .doctrees might be enough of a workaround to not spend longer on this problem, I'm mainly doing this to get a better understanding of Sphinx :) |
@ewjoachim good point! FWIW this is something that should be documented when I start moving things to https://github.com/sphinx-contrib/towncrier. https://stackoverflow.com/a/44758406/595220 suggests to use So it looks like if I add two invocations to the tox env, first to build just the changelog document and the second one to rebuild anything else that's changed or new, it may work... But yeah, exploring those events is definitely something that needs to be investigated. |
This is a temporary workaround for #120
This change adds an extra `sphinx-build` command to ensure that the changelog document is always rebuilt regardless of the doctrees cache presence. Ref: #120
This change hotfixes #120 short-term by forcing docs that use the towncrier draft entries directive not to hit the cache unconditionally.
SUMMARY
Maybe I missed something but, (probably depending on the changes you make,)
tox -e build-docs
only builds the doc the 1st time. Then, it relies on.tox/.tmp/.doctrees
, and will read the source again only if a non-changelog-fragment rst file was modified.ISSUE TYPE
PYLISSH and LIBSSH VERSION
457c1e6 and libssh is irrelevant
OS / ENVIRONMENT
Not sure anything is relevant here, but if need be, MacOS.
STEPS TO REPRODUCE
EXPECTED RESULTS
On the second build, the changelog fragment should appear
ACTUAL RESULTS
It doesn't
CAUSED BY
Sphinx relies on
.tox/.tmp/.doctrees
. If it exists and (I assume) docs rst files have not been modified, then the doc parsing does not occur.If this folder is deleted then it works normally.
A few things that can modify the doc output and are not triggering a new build:
_ext
The text was updated successfully, but these errors were encountered: