Fix: let Revise.jl parse functions and docstrings correctly - #528
Fix: let Revise.jl parse functions and docstrings correctly #528borisdevos wants to merge 2 commits into
Revise.jl parse functions and docstrings correctly #528Conversation
|
Thanks for this, this had also bothered me quite a bit but never quite enough to actually try looking for a solution 😆. Am I understanding this right that you are now duplicating docstrings? I think there is some way of doing this without needing to copy the text, don't quote me on the exact syntax but |
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 55 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Docstrings were actually already duplicated, but now the signatures are split up, so it's somehow less duplicated 🫠 I'll look into your suggestion |
Revise.jl doesn't handle the tuple of functions with different arguments very well. I won't pretend to understand Revise internals well, but here what my robot friend told me:
"When Revise re-parses the file, it tries to evaluate that comma-tuple of signatures as a standalone expression to figure out what it documents — but a bare tuple of bodiless, where-qualified call signatures isn't valid to evaluate on its own, so it throws invalid "::" syntax and Revise gives up on the whole file (and stalls the REPL while doing so)."
This is solved by just splitting them in separate
@docblocks. Every block has 1 function with some arguments, which Revise can revise. The before and after behavior can be tested withRevise.revise(throw=true).For obvious reasons, I want Revise to keep on revising when I'm busy in the internals. If I get a dime for every time I had to restart my REPL because of this, I'd have at least a dollar.
How the error looks like for the curious: