-
Notifications
You must be signed in to change notification settings - Fork 485
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
Issues with package extensions #2124
Comments
Do you happen to have an MWE where I could try this out? The Manifolds example is a bit heavy. It would be nice to have a simple (e.g. Example.jl-based) repo, with some trivial examples, to test this. |
I've prepared an MWE here: https://github.com/mateuszbaran/MWE2124.jl . The issue with julia> Base.@doc MWE2124.hello
hello(who::String)
Return "Hello, who".
hello(who::Int)
Return "Hello, number who". |
I've found a workaround: passing the extension module to |
Yeah, that's what I presumed you'd need to do, since they're their own modules. Having some notes about it in the Documenter manual would be useful I think. |
Thanks for the workaround @mateuszbaran ! |
Thanks @mateuszbaran . It would be good to automate this in Documenter too. I assumed that loading the packages in the make.jl file would make the extension docs available. It seems more natural to do that than to explicitly get the extensions like that. |
Hi. Related to this issue: I had a few docstrings in a package extension which I wanted to include in the main docs, without having to load the trigger package for the extension (because, the trigger package was a GPU package, and my system doesn't have support for that particular GPU). It seems that the trick mentioned here doesn't work for this case. It would be great if there was some functionality in package extensions to fetch only docstrings from extensions (without having to install trigger packages or run extension code). |
It seems that the Consider a main package with a stub function: function extension_function end Then an """Long doc string"""
MainPackage.extension_function() = println("hello world") Doing Edit. A workaround is to include the docs through explicit
|
Is there a way to document internal functions in extensions ? Although they are not accessible in the main package, a documentation may be a relevant source of information... |
I'm working on introducing package extensions to one of my packages: JuliaManifolds/Manifolds.jl#607 . I've encountered some issues that would be most easily explained by Documenter not loading (or not noticing) the code from extensions.
First, docstrings written in a package extensions are not rendered even if the extension is loaded in the Julia session from which Documenter is triggered.
Second,@example
block don't seem to load package extensions when their code is executed which leads to errors that don't happen when the same code is just executed in a new Julia REPL.I'm not 100% sure if these are Documenter.jl bugs but maybe someone has experienced similar issues?
The text was updated successfully, but these errors were encountered: