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

How to get docstrings from functions in Main #432

Closed
denizyuret opened this issue Feb 22, 2017 · 1 comment
Closed

How to get docstrings from functions in Main #432

denizyuret opened this issue Feb 22, 2017 · 1 comment

Comments

@denizyuret
Copy link

I have a bunch of functions in MyModule, another bunch in Main that I would like to use @docs with.

  • If I don't specify modules in makedocs things work fine but I don't get warnings for MyModule.
  • If I set modules=[MyModule, Main] I get a ton of warnings because of Main.
  • If I set modules=[MyModule], makedocs cannot find the docstrings in Main functions.

The last one surprised me, I thought modules=[...] was only for generating warnings, why does it effect whether docstrings are found?

@mortenpi
Copy link
Member

Sorry for a late reply, I didn't have an answer right away so it ended up on a back burner.

What do you mean by having functions in Main? Do you mean extending functions in e.g. Base or other packages? When building package docs the Main should basically be the make.jl file, and if you're documenting a package then you shouldn't have any functions there.

To get your docstrings for functions extending functions from e.g. Base, you should be able to do Base.foo. And this should exclude the docstrings from Base and only take docstrings from MyModule.

In any case, an example where the issue comes up might be best.

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