-
Notifications
You must be signed in to change notification settings - Fork 33
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
Wrong assumption about @doc
arguments breaks Revise
#538
Comments
This is probably reasonable either way, but that comments in the line after |
There's a typo in the OP; the comment doesn't show up anywhere after parsing:
|
Ah, that makes a lot more sense! In that case the check should be all that's needed |
Sorry, perhaps I should have provided a dump as well. Of course the comments do not show up anywhere, but also the to be documented object does not show up in the
which is actually the documented behavior. To be honest, I was actually quite confused by the fact, that the complete dump contained four arguments 😕 But the
Well, as it is documented, it is technically not a bug, but still strange: this code results in |
Closed by #539 |
When using Revise, I got the following error
which was generated by
JuliaInterpreter.jl/src/construct.jl
Line 526 in 7fe78fa
There it is assumed, that if
is_doc_expr(ex)
holds,ex.args
must have length 4. But I have foolishly added a comment between my docstring and the function I documented, likewhich resulted in
@doc
having only one argument andex.args
=[:@doc, LineNumberNode(...), "TODO ..."]
thus has only length 3. So maybe adding this comment was foolish from me, but my follys should not break Revise from working. To settle this, perhapsis_doc_expr
may get an extra linelength(ex.args) == 4 || return false
?The text was updated successfully, but these errors were encountered: