-
-
Notifications
You must be signed in to change notification settings - Fork 588
sphinx_docs
creates an implicit build_test
target
#2645
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
Comments
I agree. Send a PR to remove it? Please just add a replacement build_test for these:
Simply putting a
Running //... is my general flow, too, so a tip I use: Actually, while were in sphinx.bzl, marking the
By incremental, you mean Sphinx's support for "incremental" building? I seem to recall it has a "check if files have been modified" feature that I disabled in the rules. You could try enabling that You're from pigweed, right? What sort of build times do you see? Something I'd like is to have sphinx implemented as a worker process, under the assumption it'd be able to leverage sphinx's "only rebuild changed files" feature somehow. |
Also, as an interim workaround, setting |
I will put together a PR with the changes you suggest, thanks! Yes, I'm from Pigweed. A warmed up Pigweed docs build takes about 1½ minutes on a fast machine. By the lack of incremental builds, I mean that our docs completely rebuild if any files they depend on change. So, a trivial whitespace change in one file takes 1½ minutes currently. The "check if files have been modified" feature sounds like what we need. Will look into that, thanks! |
No longer add implicit build_tests to sphinx_docs targets. Users can manually add build_tests as needed. Add build_tests to cover in-tree sphinx_docs uses, and rename the existing build_test for //sphinxdocs/tests/sphinx_docs for consistency with the new targets. Also, tag the sphinx_docs *.run and *.serve targets as "manual" so they are excluded from `bazel build //...`. These are only needed for interactive development.
Remove the implicit build_tests from sphinx_docs targets. Users can manually add build_tests as needed. Add build_tests to cover in-tree sphinx_docs uses, and rename the existing build_test for //sphinxdocs/tests/sphinx_docs to match the new targets. Also, tag the sphinx_docs *.run and *.serve targets as "manual" so they are excluded from wildcards. These are only needed for interactive development.
Remove implicit build_tests from sphinx_docs targets. Instead, users can decide whether or not to add build_tests for docs. This also keeps sphinx_docs builds out of `bazel test //...`, which may not be desireable. Add build_tests to cover in-tree sphinx_docs targets. Rename the existing build_test for //sphinxdocs/tests/sphinx_docs:docs to match the new targets. Also, tag the sphinx_docs *.run and *.serve targets as "manual" so they are excluded from wildcards. These are only needed for interactive development.
Remove implicit build_tests from sphinx_docs targets. Instead, users can decide whether or not to add build_tests for docs. This also keeps sphinx_docs builds out of `bazel test //...`, which may not be desirable. Add build_tests to cover in-tree sphinx_docs targets. Rename the existing build_test for //sphinxdocs/tests/sphinx_docs:docs to match the new targets. Also, tag the sphinx_docs *.run and *.serve targets as "manual" so they are excluded from wildcards. These are only needed for interactive development.
Opened #2650 with the changes. |
Remove implicit `build_test`s from `sphinx_docs` targets. Instead, users can decide whether or not to add `build_tests` for docs. This also keeps `sphinx_docs` builds out of `bazel test //...`, which may not be desirable. Add `build_test`s to cover in-tree `sphinx_docs` targets. Rename the existing `build_test` for `//sphinxdocs/tests/sphinx_docs:docs` to match the new targets. Also, tag the `sphinx_docs` `*.run` and `*.serve` targets as `"manual"` so they are excluded from wildcards. These are only needed for interactive development. --------- Co-authored-by: Richard Levasseur <[email protected]>
sphinx_docs
creates an implicitbuild_test
target. (Note that this is not currently documented.)https://github.com/bazelbuild/rules_python/blob/f2941df7562c4183c37d6ceeae23e7d390738d58/sphinxdocs/private/sphinx.bzl#L196-L197
This means that commands like
bazel test //...
always includesphinx_docs
targets. For developers (like me) that repeatedly run tests, this is pretty costly, especially given the lack of incremental builds.Could the implicit
_build_test
target be removed fromsphinx_docs
?I would prefer if
sphinx_docs
left the policy of whether tobuild_test
each target to users. Since projects don't typically have manysphinx_docs
targets, manually addingbuild_test
s as needed should not be burdensome.The text was updated successfully, but these errors were encountered: