# 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:** 12\
**Page:** 2

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [September 4, 2023, 10:09pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/21 "2023-09-04T22:09:21Z")

</div>

I would NOT like Revise be used as default, or added to Base, for one reason. But see opposite argument of mine below.

I’m trying to make Julia’s sysimage (and Base preferably) smaller, I’m already made startup 30% faster, so I would fear this addition, and it making it slower.

This applies for running a script, but much less for a REPL. I see what Revise is for:

> Revise can assist with methodologies like test-driven development.

I think you assume people use the REPL for development (true, but not all).

Could we have our cake and eat it too, by only include Revise in the REPL (and by extension e.g. VS Code, I think it may already; and Pluto)?

> [@ChrisRackauckas](#):
>
> 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`

On 1. I don’t like adding it to Base, it is (all of it?) precompiled into the sysimage. I suppose at least `include` is… Could it stay as is, for running scripts, but if the REPL is used then an implied `using Revise` is done, plus it would redefine `include` to `includet`? Or in some way using that conditionally.

About 2. it should be mentioned in Julia’s docs (is already?) at least somewhere, maybe not under Base.

I must admit I’m not a user of Revise (unlike 80%+), I know of it, and probably added it at some point (for any benefit?) without explicitly ever using `includet` that I still sort of knew of. Maybe that means I’m not a serious Julia user…

Since you used that term “user”, then I think you had “developers” in mind, and I’m more of the latter, though they overlap for many users. I do note however that it seems not just for the REPL, but also I see at juliahub that Revise has 98 dependents. I’m not clear on why packages use it in production, and that might invalidate my scripting arguement, or not since putting it as a dependency in Project.toml should still work.

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

Do you know the potential speed-difference, if e.g. you just include a file ones? I’m not sure what the t does, I mean track, but at runtime, in case of no modifications, nor if you include the same file again?

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [September 5, 2023, 12:14am UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/22 "2023-09-05T00:14:09Z")

</div>

I don’t think `includet` should be the default because it is somewhat dangerous: It hides bugs in the sense that it results in misleading error messages. I often need to replace `includet` with `include` before I see the real error message of a problem.

---

<div class="post-metadata">

**Author:** ![tecosaur](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tecosaur/32/23206_2.png) [@tecosaur](https://discourse.julialang.org/u/tecosaur)\
**Post date:** [September 5, 2023, 4:04am UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/23 "2023-09-05T04:04:44Z")

</div>

Would it be worth considering making Revise a stdlib instead of moving it into Base?

---

<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 5, 2023, 4:30am UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/24 "2023-09-05T04:30:34Z")

</div>

Is there a tracking issue of 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:** [September 5, 2023, 12:34pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/25 "2023-09-05T12:34:47Z")

</div>

The way to strip down Revise’s dependencies is to log more data at the time of the method-definition. That has to be in Julia’s core. Of course, logging more data blows up the size of your running session, and there’s a lot of interest in making Julia leaner. I’m sure there’s a reasonable solution (likely involving environment variables), but it’s a big project and I don’t foresee having a couple months to work on it anytime soon.

---

<div class="post-metadata">

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

</div>

I see, thanks for responding. It sounds like both a base and stdlib approach would be possible then, just requiring extensive changes in base either way?

---

<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 5, 2023, 3:59pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/27 "2023-09-05T15:59:06Z")

</div>

Well, to make `Revise.track(Base)` work, ideally you’d like all that functionality available before defining any method. The issue is that one thing Revise does is set up a mapping `method signature => Expr` (see [How Revise works · Revise.jl](https://timholy.github.io/Revise.jl/stable/internals/#The-structure-of-Revise's-internal-representation-1)) so that it can map backwards from stacktraces and correct line numbers in files that are being edited. (If you’re making changes but stacktrace line numbers are all wrong, it quickly gets frustrating.) So some of this functionality needs to be available so early that Base’s own code can be logged.

So most likely, some of the core functionality is going to have to be added to Julia’s internal C code. Putting it in a stdlib is far too late.

Revise currently works by _retrospectively_ setting up these mappings, but nearly all Revise bugs come from corner cases where re-parsing and re-lowering introduces problems. It’s also why the whole Revise stack is huge: we need JuliaInterpreter to _almost_ execute the source files that define Julia code, intervening at the last possible moment to extract the signature without rewriting the method definition. This is an insane amount of effort to have to go to, and I will be glad to drop it, but we may have to wait until JuliaSyntax subsumes lowering as well as parsing so that all the provenance issues can be resolved.

---

<div class="post-metadata">

**Author:** ![lewis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewis/32/5217_2.png) [@lewis](https://discourse.julialang.org/u/lewis)\
**Post date:** [September 8, 2023, 2:41pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/28 "2023-09-08T14:41:20Z")

</div>

If you assume it can be “built-in” then there may be other efficiencies, even with the option to turn it off.

I think the grumbling might relate to some exaggeration of difficulty, the lack of discoverability, and not opting for a very desirable default behavior. And the long time it has taken, even though everyone (among the maintainers) seems to agree, suggests some resistance to change that has valid reasons others far away from the implementation of Julia aren’t aware of.

Since “everyone” seems directionally onboard, an announcement of intention for a future release, possibly accompanied by an explanation of the benefits of actual integration (vs. loading by default and changing the aliases of 2 functions) is very much worth the extra time to get it in, may settle the discussions down.

---

<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 8, 2023, 2:45pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/29 "2023-09-08T14:45:01Z")

</div>

This post was temporarily hidden by the community for possibly being off-topic, unfocused, inappropriate, or spammy.

---

<div class="post-metadata">

**Author:** ![mst](https://avatars.discourse-cdn.com/v4/letter/m/e0b2c6/32.png) [@mst](https://discourse.julialang.org/u/mst)\
**Post date:** [September 8, 2023, 11:34pm UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/30 "2023-09-08T23:34:34Z")

</div>

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

Why not just change `includet` to `track`? This would avoid redefining `include` in your brain. Alternatively, should `include` change to `includet`’s behavior, well I suppose then you would need `untrack` — I’d say this would be much cleaner way to differentiate than that pesky terminal `t`. My two cents.

---

<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 9, 2023, 1:44am UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/31 "2023-09-09T01:44:57Z")

</div>

That sounds fine.

---

<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 9, 2023, 6:40am UTC](https://discourse.julialang.org/t/making-revise-the-default/103506/32 "2023-09-09T06:40:28Z")

</div>

Yeah, very welcome. I personally detest abbreviations a lot, since they only add confusion, and leave it up to the imagination what is meant anyway.  
So having a policy to forbid them in the first place, is something I would suggest as well.

Changing `include` to `includet`’s behavior, breaks the workflow of many people, who might be used to that command, and even use it in scripts.

That’s another thing, I would never do 😛

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