Skip to content
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

fix(sphinxdocs): allow using sphinx_stardoc with bzlmod #2295

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rickeylev
Copy link
Contributor

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.

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.
Copy link
Collaborator

@aignas aignas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a note in the docs? I think this may force users onto a newer version of stardoc in their own setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants