-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Interaction with autodoc plugin not working ? #148
Comments
By digging some more, the problem might come from the fact that we are not exiting the python interpreter between each build, meaning that my package gets imported once, and then each subsequent import does nothing. This might be solved by using |
@henridb - any luck debugging this? I'm seeing the same |
See https://github.com/sphinx-doc/sphinx-autobuild#relevant-sphinx-bugs. I guess #142 should be reverted/amended since it sounds like rebuilds aren't detecting rescans of source code. Can you confirm what version of Sphinx you're using? |
I'm on 7.2.6 which appears to be the latest. And autobuild 2024.02.04. I did see the note in the readme, but the issue isn't that the changes in the source code aren't detected. If I make a change to the file, the rebuild runs, but the outputs don't change, even if I disable incremental builds. I'm guessing the reporter is right that because the interpreter lives between rebuilds, it's not actually re-importing the updated source code file. |
Nop, I sorry. In the end I gave up and put the sphinx build on a key building on my IDE. It was the easiest and it's sufficient for my purpose. But if ever this get fixed (or if someone is ready to guide me through the steps to contribute to this repo :) ), I would be happy to come back to this tool! |
Hmm... It doesn't -- sphinx-build is invoked as a separate subprocess. |
Is there a way to show exactly what command is being invoked? Then I can run that separately to see what happens. |
Did some more digging; the issue isn't with autobuild. It runs |
@pradyunsg - there is definitely a
Key takeaways:
I can reproduce this consistently |
Until there is a solution, the workaround I found for this is: find source/ ../mymodule/ -name "*.rst" -o -name "*.py" | entr make html I can launch a local server with my IDE (vscode) from the build folder that does the reloading automatically. |
Sure? .. If I interpret the source code correctly; the pre-build tasks are executed in a separate subprocess .. sphinx-autobuild/sphinx_autobuild/build.py Lines 22 to 26 in 674264e
.. but not the sphinx build itself, the sphinx build is in-process ( sphinx-autobuild/sphinx_autobuild/build.py Lines 5 to 6 in 674264e
sphinx-autobuild/sphinx_autobuild/build.py Lines 36 to 40 in 674264e
|
Ah, looks like a change made directly on |
To update changes to the doc strings (autodoc) in the source code in the HTML output, the sphinx-build must not run in the same process as the server / sphinx-build must run in a subprocess so that changed source code is re-imported. This issue was introduced in commit d57f117 / a commit without a PR & review. Related: sphinx-doc#31 (comment) Closes: sphinx-doc#148 Signed-off-by: Markus Heiser <[email protected]>
To update changes to the doc strings (autodoc) in the source code in the HTML output, the sphinx-build must not run in the same process as the server / sphinx-build must run in a subprocess so that changed source code is re-imported. This issue was introduced in commit d57f117 / a commit without a PR & review. Related: sphinx-doc#31 (comment) Closes: sphinx-doc#148 Signed-off-by: Markus Heiser <[email protected]>
To update changes to the doc strings (autodoc) in the source code in the HTML output, the sphinx-build must not run in the same process as the server / sphinx-build must run in a subprocess so that changed source code is re-imported. This issue was introduced in commit d57f117 / a commit without a PR & review. Related: sphinx-doc#31 (comment) Closes: sphinx-doc#148 Signed-off-by: Markus Heiser <[email protected]>
To update changes to the doc strings (autodoc) in the source code in the HTML output, the sphinx-build must not run in the same process as the server / sphinx-build must run in a subprocess so that changed source code is re-imported. This issue was introduced in commit d57f117 / a commit without a PR & review. Related: sphinx-doc#31 (comment) Closes: sphinx-doc#148 Signed-off-by: Markus Heiser <[email protected]>
should be closed by #164 |
I'm using the autodoc sphinx plugin, so in order to work on the documentation from the docstrings in my code I would expect the following command to work:
It seems to partially work, in the sense that editing a source file and saving indeed triggers a rebuild, but the output does not change. From my experimentation, it seems like the code is somehow cached, and this it's always the version existing at the first launch of the above mentioned command that gets built.
I haven't found a solution so far, is this a bug ? a configuration problem ?
The text was updated successfully, but these errors were encountered: