# Revise 2.3.0: improved safety and performance, new features

**URL:** <https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069>\
**Category:** Package Announcements\
**Tags:** revise\
**Created:** [November 14, 2019, 12:56am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069 "2019-11-14T00:56:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [November 14, 2019, 12:56am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/1 "2019-11-14T00:56:58Z")

</div>

> **[GitHub - timholy/Revise.jl: Automatically update function definitions in a...](https://github.com/timholy/Revise.jl)**
>
> Automatically update function definitions in a running Julia session - GitHub - timholy/Revise.jl: Automatically update function definitions in a running Julia session

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](https://www.youtube.com/watch?v=gXDI4DSp04c) regarding double-evaluation

- It switches to an `O(N)` algorithm for renaming frame methods to match their running variants (note breaking changes in [LoweredCodeUtils](https://github.com/JuliaDebug/LoweredCodeUtils.jl)). 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](https://github.com/MikeInnes/Requires.jl/pull/69).
- 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](https://github.com/timholy/Revise.jl/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.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 14, 2019, 8:41am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/2 "2019-11-14T08:41:42Z")

</div>

> [@tim.holy](#):
>
> This is a major update

In SemVer major updates increments the first digit, not the second one.

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [November 14, 2019, 8:43am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/3 "2019-11-14T08:43:22Z")

</div>

It’s major in the sense of a major improvement. There’s nothing exported that’s breaking.

---

<div class="post-metadata">

**Author:** ![Tero\_Frondelius](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tero_frondelius/32/7629_2.png) [@Tero\_Frondelius](https://discourse.julialang.org/u/Tero_Frondelius)\
**Post date:** [November 14, 2019, 8:52am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/4 "2019-11-14T08:52:17Z")

</div>

> [@tim.holy](#):
>
> 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 😆.

Of course, you will decide yourself your package version numbers. This is just my friendly attempt to point out that you have written yourself that this upgrade likely causes breakage.

And to add I am not expecting any changes maybe just a good learning opportunity for whole community.

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [November 14, 2019, 8:55am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/5 "2019-11-14T08:55:59Z")

</div>

It’s not likely breakage, it’s possible breakage. The 3000 lines of test code in Revise go a long ways towards catching problems. I just want people to be aware that a x.x.0 release could have unexpected bugs that should be reported.

By analogy, Julia 1.2-\>Julia 1.3 reworks many of Julia’s internals and thus has the same potential risk for problems that I cite above. Anytime you make fundamental changes you might introduce bugs.

Give it a whirl and see if it causes problems. No new bugs reported yet 😄.

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [November 14, 2019, 9:14am UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/6 "2019-11-14T09:14:04Z")

</div>

Tim means breakage due to bugs (because of the big rework of internals). Only breakage due to API changes need a major version increase. Note that the latter is an intended breakage.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [November 16, 2019, 5:26pm UTC](https://discourse.julialang.org/t/revise-2-3-0-improved-safety-and-performance-new-features/31069/7 "2019-11-16T17:26:53Z")

</div>

Started to use Revise…

👍

Thanks for this ingenious tool!
