Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5978390

Browse filesBrowse files
authored
fix(sphinxdocs),deps: allow using sphinx_stardoc with bzlmod; add stardoc 0.6.2 as dependency (#2295)
Using the sphinx_stardoc rule doesn't work with bzlmod because it refers to the stardoc repo, which was a dev dependency. This means, even if a user's root module has visibility to stardoc, rules_python doesn't. To fix, make stardoc a non-dev dependency. With bzlmod semantics, stardoc won't actually be loaded unless a user depends on it by using sphinxdocs. I ran into this while trying to port rules_testing over to sphinxdocs. The pigweed project recently started using sphinxdocs and didn't run into this problem, but I'm pretty sure that's because they're using workspace still, which doesn't have the visibility constraints that bzlmod does.
1 parent 595fe11 commit 5978390
Copy full SHA for 5978390

File tree

Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ A brief description of the categories of changes:
3535
(or equivalent).
3636
* (toolchains) `py_runtime.implementation_name` now defaults to `cpython`
3737
(previously it defaulted to None).
38+
* (deps) stardoc 0.6.2 added as dependency.
3839

3940
### Fixed
4041
* (bzlmod) The `python.override(minor_mapping)` now merges the default and the

‎MODULE.bazel

Copy file name to clipboardExpand all lines: MODULE.bazel
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ pip.parse(
6666
)
6767
use_repo(pip, "rules_python_publish_deps")
6868

69+
# Not a dev dependency to allow usage of //sphinxdocs code, which refers to stardoc repos.
70+
bazel_dep(name = "stardoc", version = "0.6.2", repo_name = "io_bazel_stardoc")
71+
6972
# ===== DEV ONLY DEPS AND SETUP BELOW HERE =====
70-
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
7173
bazel_dep(name = "rules_bazel_integration_test", version = "0.20.0", dev_dependency = True)
7274
bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True)
7375

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.