# \[ANN\] Higher productivity (fewer Julia restarts) with Revise.jl

**URL:** <https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564>\
**Category:** Community\
**Tags:** package, announcement, productivity, development\
**Created:** [June 30, 2017, 1:36pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564 "2017-06-30T13:36:56Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![bjarthur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bjarthur/32/9638_2.png) [@bjarthur](https://discourse.julialang.org/u/bjarthur)\
**Post date:** [July 22, 2017, 10:12pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/21 "2017-07-22T22:12:16Z")

</div>

i wonder how many memory leaks in julia will be discovered if restarting occurs less often 🙂

---

<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 22, 2017, 6:50pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/22 "2017-11-22T18:50:12Z")

</div>

A brief update here. Many platform and IDE-specific issues have been fixed, thanks mostly to users who have reported bugs and contributed fixes. In particular, if you use VS Code’s console it’s worth trying the [initialization here](https://github.com/JuliaEditorSupport/julia-vscode/wiki/Known-issues-and-workarounds) discovered (I believe) by Kristoffer Carlson and David Anthoff.

For users of the in-development Julia 0.7, I just merged some fairly large changes (not yet tagged, but for the adventurous available on the `master` branch):

- Older versions of Revise needed to be able to parse your source code to determine which files you were `include`ing in your package. On 0.7, this is no longer required. In theory, Revise should now work for any package (if not, please report as a bug).
- Hacking on Base is now easier and more fun. Just say `Revise.track(Base)`, and Revise will attempt to incorporate any differences between the current source files and their state when you last built Julia.
- Revise should be faster and use less memory. For precompiled packages, due to changes in 0.7 it only needs to parse the source code when one of the files changes. This should reduce or eliminate the performance hit when loading packages.

Revise still has significant limitations (it can’t handle type definition changes, method deletion, and a few other kinds of changes), but I’m optimistic that at least some of these will be resolved in the fullness of time.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [November 22, 2017, 7:59pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/23 "2017-11-22T19:59:22Z")

</div>

Revise is amazing. It feels like magic.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 23, 2017, 7:42am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/24 "2017-11-23T07:42:59Z")

</div>

> [@tim.holy](#):
>
> (it can’t handle type definition changes, method deletion, and a few other kinds of changes), but I’m optimistic that at least some of these will be resolved

I realize that this needs changes to the language, not just `Revise.jl`, but addressing these two issues would mean that I would only have to restart very rarely. This is another way to mitigate the problem of compilation times, hope that if it does not get addressed before `v1.0` then it is possible to do it some backward-compatible way so we don’t have to wait until `v2.0`.

Thanks for the great work, this library improved my workflow so much that it is hard to even quantify.

---

<div class="post-metadata">

**Author:** ![peterkovesi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peterkovesi/32/5946_2.png) [@peterkovesi](https://discourse.julialang.org/u/peterkovesi)\
**Post date:** [November 23, 2017, 9:01am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/25 "2017-11-23T09:01:51Z")

</div>

I have felt that the need to regularly restart the REPL has been something of an elephant in the room and that it was an impediment to the marketing of the language. (It make me think of how you might try to market MATLAB or Visual Studio if you had to regularly shut it down and then restart it for your code changes to take effect).

As far as I am concerned Revise is a game changer! Thank you for your work. I do hope it makes its way into Base. It makes introducing the language to new users so much easier.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 23, 2017, 9:06am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/26 "2017-11-23T09:06:20Z")

</div>

> [@peterkovesi](#):
>
> I do hope it makes its way into Base.

I hope it **never** makes it into `Base`. That would mean 3-6 months between updates, as opposed to getting them every few days or weeks like we do now, with just a `Pkg.update()`.

---

<div class="post-metadata">

**Author:** ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)\
**Post date:** [November 23, 2017, 9:18am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/27 "2017-11-23T09:18:38Z")

</div>

But once things have stabilized you don’t need to update it so often…

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 23, 2017, 9:26am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/28 "2017-11-23T09:26:26Z")

</div>

Code may stabilize regarding _bugs_, but I hope it doesn’t “stabilize” when it comes to _features_. Also, as Julia becomes more stable, its release frequency should decrease too, exacerbating the problem.

The fewer things in `Base`, the better. That said, distributions of Julia may just install a curated set of packages, so it comes with “batteries included”. It is my perception that things are moving in this direction anyway.

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [November 23, 2017, 9:39am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/29 "2017-11-23T09:39:15Z")

</div>

> [@Tamas\_Papp](#):
>
> The fewer things in Base, the better.

I agree with this in general, but the features of Revise.jl are so fundamental that I find it hard to agree that they should not somehow be baked into the core of the language.

**Edit:** or _at least_ be available by default.

---

<div class="post-metadata">

**Author:** ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)\
**Post date:** [November 23, 2017, 9:46am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/30 "2017-11-23T09:46:34Z")

</div>

I agree with @peterkovesi that this should be unintrusive for the end user. It would be weird (for a newbie) if you needed to load a package and set it up to get this behavior.  
If that package is loaded and set up automatically then it doesn’t matter of course whether it is in `base` or it is a package that comes with the default installation. All is fine as long as a newbie doesn’t need to worry about it and things “just work”.

And indeed a very big “thank you” to Tim Holy for creating this!

---

<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 23, 2017, 10:38am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/31 "2017-11-23T10:38:06Z")

</div>

> I realize that this needs changes to the language, not just Revise.jl, but addressing these two issues would mean that I would only have to restart very rarely.

Agreed that these are currently major barriers. Personally, I’d guess the method deletion issue counts for something like 80% of my restarts. Here there is some hope: there is already a [stub of a solution](https://github.com/timholy/Revise.jl/pull/57), though it’s pretty far from being viable. Assuming we don’t make the necessary changes to Base in time for 1.0, this would be a new feature that I’m guessing can be done in a backward-compatible way, so presumably could appear in 1.x. The timing will depend a lot on how hard the Base changes are, and I confess to not really having a clue about that at the moment. Fortunately, Jameson has noticed the issue, and if you have Jameson thinking about the problem, who knows what kind of astonishing wizardry might someday be possible?

---

<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 23, 2017, 11:42am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/32 "2017-11-23T11:42:31Z")

</div>

Thanks for the kind remarks, everyone!

I agree with the general sentiment that it would be nice to make discovery of Revise and related packages more straightforward. My only real idea is to have `Pkg.init` offer to install some core “user experience” packages such as Gallium (now that it seems to be coming back) and Revise. (Maybe plotting too? IDEs? Where does one draw the line?) Then we’d just need a good build script in Revise. One potential hitch is that build scripts seemingly can’t prompt users with questions, because they run in a separate process, so we can’t ask users whether they want to have Revise start up automatically or only when they say `using Revise` in their current session.

@StefanKarpinski, as the Pkg3 guru, any thoughts?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [November 23, 2017, 12:29pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/33 "2017-11-23T12:29:24Z")

</div>

Pkg3 is already far more interactive and we can certainly add more smarts to that over time. Suppressing interactivity when not wanted is definitely necessary as well, and I guess we’ll figure that out. It’s still a work in progress.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [November 23, 2017, 6:15pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/34 "2017-11-23T18:15:28Z")

</div>

Is it possible for Revise.jl to also update generated code when the code generation is modified in a pkg?

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [November 24, 2017, 12:55am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/35 "2017-11-24T00:55:03Z")

</div>

This issue [https://github.com/timholy/Revise.jl/issues/31](https://github.com/timholy/Revise.jl/issues/31) ?

You can manually call `revise(module_name)` to force reevaluating every function in a module. Use it on the package where the generated function is defined. Similarly, if you update a macro, call `revise` on the modules that use the macro.

---

<div class="post-metadata">

**Author:** ![ValdarT](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valdart/32/24146_2.png) [@ValdarT](https://discourse.julialang.org/u/ValdarT)\
**Post date:** [April 28, 2018, 2:19pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/36 "2018-04-28T14:19:03Z")

</div>

Out of curiosity, what’s the current plan regarding `Revise.jl` and Julia 0.7/1.0? Any chance Revise will be included in the “default” experience somehow?

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [April 28, 2018, 3:50pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/37 "2018-04-28T15:50:39Z")

</div>

It would be nice if it is built-in somehow, but only if it doesn’t increase the startup time significantly. Otherwise, I would rather use it optionally when needed.

---

<div class="post-metadata">

**Author:** ![mkborregaard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkborregaard/32/556_2.png) [@mkborregaard](https://discourse.julialang.org/u/mkborregaard)\
**Post date:** [April 28, 2018, 8:19pm UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/38 "2018-04-28T20:19:29Z")

</div>

FWIW I really hope it’ll become part of the basic user experience.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [April 29, 2018, 2:00am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/39 "2018-04-29T02:00:17Z")

</div>

Just to clarify, does “part of the basic used experience” mean

1. built into `Base` or the standard library, or

2. this, and also enabled by default

in this context? As much I love Revise.jl, I think of it as part of the IDE, not the language. Or is the problem is better discoverability?

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [April 29, 2018, 3:08am UTC](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564/40 "2018-04-29T03:08:51Z")

</div>

The default initialization used by the REPL and Juno, perhaps? But two thoughts:

- As irritating as the restarts may be for introduction, I suspect it is pretty low on the irritation list for introductory users (as opposed to package developers). But maybe it is also very low effort to add and test
- A related consideration in all of this should be the alternative, Revise-free workflow that @ChrisRackauckas has championed: [Using Juno for Interactive Test-Driven Julia Package Development - YouTube](https://www.youtube.com/watch?v=i5iGVkI7XOI&t=1s) After learning about that, I didn’t end up needed Revise… but maybe that is because I am not working on fancy libraries.

[Previous page](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564.md?page=1)

[Next page](https://discourse.julialang.org/t/ann-higher-productivity-fewer-julia-restarts-with-revise-jl/4564.md?page=3)
