I’m pleased to announce the release of Revise 2.3.0. This is a major update with sweeping changes. In brief, it aims to capitalize on the advantages of the redesign introduced in Revise 2.0 while also mitigating or eliminating the most serious problems of that design.
Major changes:
- The most fundamental change is a much-improved internal analysis of source code. This is leveraged to robustly differentiate between “statements that contribute to defining methods” and “code that ‘just’ does work.” Method-defining code is run in the interpreter, as is necessary to compute method signatures which serve as a relocatable identifier for methods. Work-performing code is now either not run at all (if Revise is just parsing an already-loaded package to extract expressions and their corresponding method signatures) or run by the compiler (for, e.g.,
includet
). This should solve many problems:- it should improve performance if you
includet
files that contain a mixture of method definitions and computation-heavy analysis code - it should improve performance for packages that do significant top-level initialization
- it should be much safer, largely or completely resolving concerns I raised in my JuliaCon 2019 talk regarding double-evaluation
- it should improve performance if you
- It switches to an
O(N)
algorithm for renaming frame methods to match their running variants (note breaking changes in LoweredCodeUtils). This probably affects very few packages, but for those that generate large expression blocks with many methods the performance improvement is dramatic. - Revise now supports addition and deletion of source files. Hands-free integration with Requires.jl should also come soon.
- It significantly improves handling and printing of errors. The error messages are now more consistent, more informative, and much shorter.
Such major changes introduce multiple risks; for example, implementing file-deletion means that all methods defined in that file get deleted. If I’ve gotten, say, the path logic wrong and Revise mistakenly thinks you’ve deleted one of the stdlibs, rather bad things will happen to your session . As always, please report any problems you encounter as issues with a reproducible test case, and I will try to fix them. If this isn’t already an improvement, after a few cycles of bug fixing it should be a welcome upgrade for almost all users.