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

modules argument to makedocs() conflates availability with doctests #2420

Open
staticfloat opened this issue Jan 23, 2024 · 1 comment
Open

Comments

@staticfloat
Copy link
Contributor

If I need to include the docstring of one of my dependencies I must include that dependency as one of the modules passed to makedocs(), if I do not the docstring cannot be found. However if I do, then (a) I get a bunch of warnings if some of the docstrings for that module are not included in my docs output, and (b) if one of the doctests fails, my build fails.

I think the ideal behavior here is for docstrings referenced explicitly by module to work without needing to provide the owning module as an argument to makedocs().

Example repository showcasing the issue is here: https://github.com/staticfloat/DocumenterModuleProblem.jl

As written, we have a top-level module with a dependency (BrokenDoctest) that, as its name suggests, has a broken doctest. If I try to run the build, it fails. However if I remove BrokenDoctest from the list of modules, I get an error that BrokenDoctest.broken cannot be found.

@goerz goerz added the Type: Bug label Mar 4, 2024
@goerz
Copy link
Member

goerz commented Mar 4, 2024

Looking at the code, this seems to be quite deliberate. But, it's not documented behavior, and I don't think it makes any sense. I agree that setting modules should just check that every public member of the given modules has its docstring rendered in the documentation, and nothing else. It should not limit docstrings that can be rendered to only those from the given modules.

I've run into this myself, and it's the reason I don't use the modules argument.

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

No branches or pull requests

2 participants