# Making Revise the default?

**URL:** <https://discourse.julialang.org/t/making-revise-the-default/103506>\
**Category:** Internals & Design\
**Tags:** revise\
**Created:** [September 4, 2023, 12:27pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506 "2023-09-04T12:27:08Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 4, 2023, 12:27pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/1 "2023-09-04T12:27:08Z")

</div>

> [@What steps should the Julia community take to bring Julia to the next level of popularity?](https://discourse.julialang.org/t/what-steps-should-the-julia-community-take-to-bring-julia-to-the-next-level-of-popularity/101389/578):
>
> Yep. And the complex setup that it requires, is a non-solution.  
> I would rather ditch the entire language, then using that.
> 
> I can, in every single language, popular and non-popular, fire  
> up VS Code and start scripting.
> 
> If Julia forces me to **create custom packages** and follow a quite involved process  
> just to **use a REPL** , you simply lose a lot of people at that point.

> [@What steps should the Julia community take to bring Julia to the next level of popularity?](https://discourse.julialang.org/t/what-steps-should-the-julia-community-take-to-bring-julia-to-the-next-level-of-popularity/101389/591):
>
> - From REPL, execute: `using Revise; includet("myscript.jl")`
> - Edit your script, e.g. write a function` add(x, y) = x + y`
> - Call your function from REPL

> [@What steps should the Julia community take to bring Julia to the next level of popularity?](https://discourse.julialang.org/t/what-steps-should-the-julia-community-take-to-bring-julia-to-the-next-level-of-popularity/101389/593):
>
> @Eben60 You have a typo, its `include("myscript.jl")`

> [@What steps should the Julia community take to bring Julia to the next level of popularity?](https://discourse.julialang.org/t/what-steps-should-the-julia-community-take-to-bring-julia-to-the-next-level-of-popularity/101389/595):
>
> No, it is `includet` with the `t`. That’s a `Revise` function, meaning “include and track”.

Well this has gone bizarre 😅. Maybe the preconceived notion that Revise is difficult blocks the idea that it actually only requires a single character change, i.e. change `include` to `includet`, and now it all works? It’s even documented:

> **[Home · Revise.jl](https://timholy.github.io/Revise.jl/stable/#What-Revise-can-track-1)**
>
> Documentation for Revise.jl.

Look, I think that there is definitively a discussion to be had about including Revise by default. I believe `using Revise` should be unnecessary, and the base `include` should do what `includet` does. I have mentioned to @tim.holy that I think we need to start with the signaling, moving Revise.jl to the JuliaLang org, and having a real discussion on including it in the standard Julia. The Julia user’s survey says that the vast majority of users use Revise (\>80% IIRC?), and it’s basically just a standard part of the installation process now. Streamlining that would be good.

Hyperbole is just unnecessary. I’m going to assume the best intentions and that this is just a discoverability issue. Sometimes people don’t learn how easy Revise is because it’s not a part of the “standard Julia installation”. Yes it’s only a single character difference and these issues are solved, but removing that single character difference and making its docs part of the standard Julia documentation would make things a million times easier. Agreed. We’re at the very last step, and we should rectify this. This thread shows that it is possible for someone who thinks they are informed in the language to miss a pretty crucial step to the “shadow standard installation”: let’s get rid of the shadow part and just make it standard?

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 4, 2023, 12:39pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/2 "2023-09-04T12:39:26Z")

</div>

About moving `Revise` inside Julia as default. Would it include a way of disabling it (at least the `includet` mechanism)? I am not sure of implications of such a move, so just wondering is there would be a way to get back the old working (if there is a use or need for it).

On the other hand, such a move could probably be a good thing for newbie’s workflow …

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 4, 2023, 12:54pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/3 "2023-09-04T12:54:39Z")

</div>

I cannot see why changing `include` to `includet` would be breaking, maybe @tim.holy has an example. Under the assumption that it’s not breaking, I would propose the following steps:

1. Move Revise.jl to Base and enable it by default.
2. Move Revise.jl documentation to be a section in the Base documentation. Can better integrate it in the near future.
3. Change `include`’s behavior to be that of `includet`, and make a new `includent` that is the untracked version. Change the docstring and docs in Base for `include` to mention the difference between the two and improve the discoverability of `includent`, though heavily suppose that the tracking behavior is what the vast majority wants.

And I think we’re good? Again, these are rather “trivial” workflow changes to someone who’s already using Revise, it’s essentially no difference if it’s in Base or not to someone who already knows about it. But I think that this small difference would be a massive improvement to the discoverability of good workflows, and I don’t think we should underestimate the importance of making it the actual standard.

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 4, 2023, 1:16pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/4 "2023-09-04T13:16:03Z")

</div>

> [@ChrisRackauckas](#):
>
> The Julia user’s survey says that the vast majority of users use Revise (\>80% IIRC?)

I would argue, the rest doesn’t know about it 😛

The video in [this thread](https://discourse.julialang.org/t/video-how-to-reduce-julias-latency/100298), is what led me to believe Revise is complicated to setup.

---

<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:** [September 4, 2023, 1:28pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/5 "2023-09-04T13:28:45Z")

</div>

I like the idea of moving Revise to Base, but not before we lay some groundwork to make it a lot lighter. It’s a huge dependency chain right now.

> Change `include`’s behavior to be that of `includet`

Oh god, that’s terrifying. I dislike `includet` because of all the subtle ways people can forget about data-dependencies when they try new methods with old inputs. I fear an awful lot of false bug reports.

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [September 4, 2023, 1:34pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/6 "2023-09-04T13:34:57Z")

</div>

> [@ShalokShalom](#):
>
> The video in [this thread](https://discourse.julialang.org/t/video-how-to-reduce-julias-latency/100298), is what led me to believe Revise is complicated to setup

The video goes into depth about how to avoid errors while redefining structs. Setting it up (the loading is usually automated through startup scripts), and using it to redefine methods, is almost trivial from a user’s perspective. Often one doesn’t need to redefine structs, and won’t have to go through the hoops listed in the video.

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [September 4, 2023, 2:23pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/7 "2023-09-04T14:23:33Z")

</div>

> [@ChrisRackauckas](#):
>
> Change `include`’s behavior to be that of `includet`, and make a new `includent` that is the untracked version

Perhaps better make `include` work as `includet` only when explicitly called in interactive mode (repl etc.), where it may be expected that contents of the included file may change.

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [September 4, 2023, 2:31pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/8 "2023-09-04T14:31:42Z")

</div>

These (steps) are good ideas, I would also add a way to go to old behavior as an environment variable (e.g. `JULIA_INCLUDET=false`) as a switch control, and maybe an API (e.g. `Revise.defaultincludet(false)`) to complement?

Just my two cent,

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 4, 2023, 2:36pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/9 "2023-09-04T14:36:53Z")

</div>

Yeah, and my context was, that I simply wanted a bearable performance on my REPL, so a much smaller usecase.

It later turned out, that the 6 seconds to compile a simple function, is much rather a bug, and not how slow Julia usually is.

I was under the assumption, I have to separate out my REPL code into small libraries, just so it doesnt take a couple of seconds for every function to run.

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [September 4, 2023, 2:54pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/10 "2023-09-04T14:54:34Z")

</div>

`include("some.jl"; track=false)`?

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [September 4, 2023, 3:14pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/11 "2023-09-04T15:14:22Z")

</div>

I like this idea (with optional argument `true/false`). In that case it might be unnecessary to make the default behavior different to the current, safer one (`track=false`). The option should be sufficiently visible even to newbies by its description in the docs of `include`.

---

<div class="post-metadata">

**Author:** ![GHTaarn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ghtaarn/32/216007_2.png) [@GHTaarn](https://discourse.julialang.org/u/GHTaarn)\
**Post date:** [September 4, 2023, 4:14pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/12 "2023-09-04T16:14:19Z")

</div>

The default could be determined by an environment variable

---

<div class="post-metadata">

**Author:** ![tictaccat](https://avatars.discourse-cdn.com/v4/letter/t/9f8e36/32.png) [@tictaccat](https://discourse.julialang.org/u/tictaccat)\
**Post date:** [September 4, 2023, 5:13pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/13 "2023-09-04T17:13:16Z")

</div>

My main issue with `includet` is that in workflows which use a module not in a package (e.g. `includet("MyModule.jl"); import MyModule`), as is common in scripting, the script code itself needs to depend on `Revise`. It is not enough for the user to have `Revise` loaded, since the script code itself needs to be modified to be compatible with `Revise` workflows. Even if `includet` were not the default for `include`, being able to put something like ` __revise__ include__= true` inside of `MyModule`, which Revise would auto-detect to work with `include`, would be useful as then the script code does not need to depend on `Revise`. (This is inspired by `__revise_mode__ = :eval`, which I also end up putting into all my non-package modules so that revise behaves the same for the module as for a package.)

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [September 4, 2023, 5:15pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/14 "2023-09-04T17:15:27Z")

</div>

We could also revisit to ship Revise in the VS Code extension by default and make it available in the REPL there. I started that at some point and got stuck somewhere, but that would probably go a fair way to make it available to a lot of folks.

---

<div class="post-metadata">

**Author:** ![GregVernon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregvernon/32/5611_2.png) [@GregVernon](https://discourse.julialang.org/u/GregVernon)\
**Post date:** [September 4, 2023, 5:47pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/15 "2023-09-04T17:47:42Z")

</div>

One thing to be aware of is there’s a selection bias with the user survey. I highly doubt the survey captures the “layman” user of Julia – even I’ve only taken the survey once and I’ve been using Julia since 2015-ish. The survey is _so_ heavy, that even though I’ve opened it a few other times I’ve given up partway through. It seems to me that the survey is probably only getting the Julia “poweruser” or “acolyte” users to respond. If we’re talking the “next level of popularity” in that other thread, it seems obvious that we’re targeting people who aren’t even aware of the user survey. There really should be a “survey-lite” and a “survey-heavy” in my opinion.

Anyways, _even though_ I’ve been aware of `Revise.jl` for probably as long as it has been around, I don’t use it. The general recommendation I’ve seen for using Julia is to not add any packages to your base Julia installation, instead use projects if you need additional packages. And I don’t want to go through the trouble of creating a project just to have `Revise.jl`. Maybe I’m just a “stubborn” user, but I’m not going to use a “default” workflow that isn’t supported in the standard library because I’ve been burnt enough times with Julia where I’ll get used to a package just for it to get mothballed/deprecated for another package. I’m willing to do that for packages that provide iterative solvers, eigen solvers, automatic differentiation, etc., but not for a package that defines my default workflow.

All this to say, I 100% support making `Revise.jl` the default / included in the standard library if the Julia power-users have determined that the functionality it provides for workflows is valuable.

---

<div class="post-metadata">

**Author:** ![ShalokShalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shalokshalom/32/52462_2.png) [@ShalokShalom](https://discourse.julialang.org/u/ShalokShalom)\
**Post date:** [September 4, 2023, 7:02pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/16 "2023-09-04T19:02:29Z")

</div>

> [@GregVernon](#):
>
> The survey is _so_ heavy, that even though I’ve opened it a few other times I’ve given up partway through.

Sounds like the next survey could be a bit smaller? Do you think its worth it, opening up a post about this as well? I also like contributing to surveys, and get tired of them, if they are lengthy 🙂

---

<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:** [September 4, 2023, 7:06pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/17 "2023-09-04T19:06:18Z")

</div>

You can use

```julia
if isdefined(Main, :Revise)
    includet("script.jl")
else
    include("script.jl")
end

```

---

<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:** [September 4, 2023, 7:09pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/18 "2023-09-04T19:09:24Z")

</div>

> [@GregVernon](#):
>
> The general recommendation I’ve seen for using Julia is to not add any packages to your base Julia installation, instead use projects if you need additional packages.

I certainly don’t advise that. I have a [substantial number of “developer” packages in my default environment](https://discourse.julialang.org/t/code-block-only-for-packagecompiler-and-not-for-revise/99870/5); project-specific packages (i.e., things that do certain computations, etc) go in the project.

---

<div class="post-metadata">

**Author:** ![ParadaCarleton](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paradacarleton/32/20005_2.png) [@ParadaCarleton](https://discourse.julialang.org/u/ParadaCarleton)\
**Post date:** [September 4, 2023, 8:37pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/19 "2023-09-04T20:37:07Z")

</div>

> [@ChrisRackauckas](#):
>
> This thread shows that it is possible for someone who thinks they are informed in the language to miss a pretty crucial step to the “shadow standard installation”: let’s get rid of the shadow part and just make it standard?

As an anecdote, I’ve been using Julia for 3-4 years. I had no idea `includet` existed until today. I just heard people tell me to use Revise, so I checked `use Revise` in the VSCode settings and assumed everything was working fine.

Plenty of things that are described in these threads as being needed for “new users” are actually just for users in the bottom 98% of the Julia user distribution 😅

---

<div class="post-metadata">

**Author:** ![GregVernon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregvernon/32/5611_2.png) [@GregVernon](https://discourse.julialang.org/u/GregVernon)\
**Post date:** [September 4, 2023, 9:22pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/20 "2023-09-04T21:22:03Z")

</div>

Same, the few times I have used `Revise.jl` I just did the exact same thing as you and found it to not be all that beneficial, probably because I’ve not been using `includet`

[Next page](https://discourse.julialang.org/t/making-revise-the-default/103506.md?page=2)
