From 667ed13f3b96f429054715072c0bfe9847f82083 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 11 Oct 2024 14:40:36 -0700 Subject: [PATCH] fix(sphinxdocs): allow using sphinx_stardoc with bzlmod 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. --- MODULE.bazel | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 780d7f866..390e81a6d 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -66,8 +66,10 @@ pip.parse( ) use_repo(pip, "rules_python_publish_deps") +# Not a dev dependency to allow usage of //sphinxdocs code, which refers to stardoc repos. +bazel_dep(name = "stardoc", version = "0.6.2", repo_name = "io_bazel_stardoc") + # ===== DEV ONLY DEPS AND SETUP BELOW HERE ===== -bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") bazel_dep(name = "rules_bazel_integration_test", version = "0.20.0", dev_dependency = True) bazel_dep(name = "rules_testing", version = "0.6.0", dev_dependency = True)