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

Make it possible to avoid the warning when replacing docstrings #32118

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

Conversation

timholy
Copy link
Sponsor Member

@timholy timholy commented May 23, 2019

The fact that doc! always warns led Revise to skip doc! calls but that led to a bug, timholy/Revise.jl#309. The fix in timholy/Revise.jl#310 basically requires copy-pasting the definition of doc!, which seems like a bad idea. This just adds an extra optional argument that allows one to suppress generation of the warning. Non-breaking but probably not advisable to backport since it's a new feature.

EDIT: alternatively this could be a keyword argument.

@timholy timholy added the docsystem The documentation building system label May 23, 2019
@KristofferC
Copy link
Sponsor Member

Shouldn't we do the same as we did for function replacements? That is, only warn if generating output?

@timholy
Copy link
Sponsor Member Author

timholy commented May 23, 2019

Link please?

@KristofferC
Copy link
Sponsor Member

#23002

@timholy
Copy link
Sponsor Member Author

timholy commented May 23, 2019

Fair to ask: can anyone give an example where that warning is clearly useful? #23011 (comment) says it can be useful but I am not sure about the circumstances.

This will help answer @KristofferC 's question, which I guess comes down to the issue of whether it's useful in any context other than module definition. Question: if these warnings are off by default except during precompilation, doesn't that suppress the warning for packages marked __precompile__(false)? (EDIT: answer is yes, the warnings don't show in that case.) Shouldn't we also show them if we are includeing a file?

@KristofferC
Copy link
Sponsor Member

KristofferC commented May 23, 2019

Just as a note, feel free to ignore this whole tangent if you wish, just a thought I had with its relation to method overwrite warnings.

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

Successfully merging this pull request may close these issues.

2 participants