Skip to content

Raise informative error message when building man on older sphinx #158

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

Merged
merged 1 commit into from
Mar 29, 2024

Conversation

Carreau
Copy link
Collaborator

@Carreau Carreau commented Mar 26, 2024

This will make the case of building manpages with earlier sphinx fail with an informative error message

ValueError: Two different values of iframe_src attributes["iframe_src"]='lite/repl/index.html?kernel=xeus-python&toolbar=0&theme=JupyterLab%20Light&code=print%28%22Hello%20from%20a%20JupyterLite%20console%21%22%29',iframe_src='lite/repl/index.html', try upgrading sphinx to v 7.2.0 or more recent

Closes #117

As noted in the issue, we could pin sphinx to >7.2, but is it really necessary if it only affects man pages ?

This will make the case of building manpages with earlier sphinx fail
with an informative error message

```
ValueError: Two different values of iframe_src attributes["iframe_src"]='lite/repl/index.html?kernel=xeus-python&toolbar=0&theme=JupyterLab%20Light&code=print%28%22Hello%20from%20a%20JupyterLite%20console%21%22%29',iframe_src='lite/repl/index.html', try upgrading sphinx to v 7.2.0 or more recent
```

Closes jupyterlite#117

As noted in the issue, we could pin sphinx to >7.2, but is it really
necessary if it only affects man pages ?
Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

I think raising an error should be okay here. I did a quick GitHub code search and while the man phony still exists in a lot of Makefiles, I don't think it's being widely used outside them in other sorts of scripts by projects (~672 results). The HTML builder is quite widely used instead with more than ~100k results, so it's reasonable to raise this error if popularity is used as a heuristic.

Copy link
Collaborator

@steppi steppi left a comment

Choose a reason for hiding this comment

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

Looks good to me. It seems reasonable not to break things for people who are stuck on sphinx<7.2 for some reason and who don't need to generate man pages.

@steppi steppi merged commit cb9426c into jupyterlite:main Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.11.0: documentation build fails
3 participants