# Is it possible to integrate Revise.jl into the Base library of Julia?

**URL:** <https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291>\
**Category:** General Usage\
**Tags:** package\
**Created:** [March 25, 2019, 2:06am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291 "2019-03-25T02:06:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhangliye](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhangliye/32/3208_2.png) [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Post date:** [March 25, 2019, 2:06am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/1 "2019-03-25T02:06:05Z")

</div>

When the source file is revised, users want it be known by Julia immediately, which is a quite natural idea.

Is it possible to integrate Revise.jl into Julia Base library and let it track the source files whenever Julia is started?

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [March 25, 2019, 3:54am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/2 "2019-03-25T03:54:20Z")

</div>

what about just putting `using Revise` into your startup.jl see [How to set up Julia to always run a set of code at the beginning of each session?](https://discourse.julialang.org/t/how-to-set-up-julia-to-always-run-a-set-of-code-at-the-beginning-of-each-session/13152)

---

<div class="post-metadata">

**Author:** ![zhangliye](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zhangliye/32/3208_2.png) [@zhangliye](https://discourse.julialang.org/u/zhangliye)\
**Post date:** [March 25, 2019, 6:18am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/3 "2019-03-25T06:18:13Z")

</div>

Thanks! In fact, I use Revise the same way with the startup.jl in as follows.

```julia
# This file should contain site-specific commands to be executed on Julia startup;
# Users may store their own personal commands in `~/.julia/config/startup.jl`.
atreplinit() do repl
    try
        @eval using Revise
        @async Revise.wait_steal_repl_backend()
    catch
        @warn "Could not load Revise."
    end   
end

function my_include( path::AbstractString)
    include(path)
    Revise.track(path)
end 

```

Then, In the REPL or Juno, I include other file as

```julia
my_include("c:/temp/main.jl")

```

If Revise.jl is part of Julia, the users do not need to do anything to track the code.

---

<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:** [March 25, 2019, 8:30am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/4 "2019-03-25T08:30:05Z")

</div>

> [@zhangliye](#):
>
> Is it possible to integrate Revise.jl into Julia Base library and let it track the source files whenever Julia is started?

Perhaps you mean the standard library, not `Base`.

It should be possible, but it’s not a good idea, as this would

1. couple the release cycle of these packages to Julia,

2. make development much more tedious.

Functionality is being moved _out_ of `Base` and the standard libraries.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [March 25, 2019, 8:30am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/5 "2019-03-25T08:30:49Z")

</div>

Revise is a big piece of software with some fairly chunky dependencies.  
They would all have to go into the started library.

The julia philosophy is to put almost nothing in the standard library that could be in a package.  
Most things there are to support _Pkg_, or the _REPL_,  
a few are things that used to be in _Base_ but that noone could quiet bring to toss out entirely.

I am a big supporter of that.  
Anything in the standard library is comparatively hard for anyone to just work on.  
And for now has its releases synchronized against julia’s releases.

That would slow things immensely.

---

<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:** [March 25, 2019, 8:41am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/6 "2019-03-25T08:41:46Z")

</div>

But Revise.jl is so central to a nice Julia experience, that bundling it somehow with the Julia installation would make sense.

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [March 25, 2019, 8:48am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/7 "2019-03-25T08:48:04Z")

</div>

I might be wrong, but I have the impression is less about where the code for Revise lives, and more that the Revise workflow be the way that Julia works out of the box. Of course that would require it living in the stdlib too.

> [@zhangliye](#):
>
> When the source file is revised, users want it be known by Julia immediately, which is a quite natural idea.

But that’s not always the case right? If I have some script that I want to be fast, I don’t want Julia monitoring to see if the source code has changed. Revise is awesome for development workflow, but I don’t think it would be a great idea for it to always be running in the background.

Or am I misunderstanding?

---

<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:** [March 25, 2019, 8:58am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/8 "2019-03-25T08:58:36Z")

</div>

> [@mauro3](#):
>
> bundling it somehow with the Julia installation would make sense.

I think the key problem is not installation, but discovery. Installing Revise.jl takes 12 keystrokes (`]add Revise` + RET), so it is trivial.

Users just may not know about it. Mentioning it in the docs prominently could be a start.

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [March 25, 2019, 9:03am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/9 "2019-03-25T09:03:24Z")

</div>

> [@zhangliye](#):
>
> function my\_include( path::AbstractString)  
> include(path)  
> Revise.track(path)  
> end

Are you looking for `includet`?

```julia
help?> includet
search: includet include_string include include_dependency

  includet(filename)

  Load filename and track any future changes to it. includet is deliberately non-recursive, so if filename loads any other files, they will not be automatically tracked. (See Revise.track to
  set it up manually.)

  includet is intended for "user scripts," e.g., a file you use locally for a specific purpose such as loading a specific data set or performing some kind of analysis. Do not use includet
  for packages, as those should be handled by using or import. If using and import aren't working, you may have packages in a non-standard location; try fixing it with something like
  push!(LOAD_PATH, "/path/to/my/private/repos").

```

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [March 25, 2019, 10:01am UTC](https://discourse.julialang.org/t/is-it-possible-to-integrate-revise-jl-into-the-base-library-of-julia/22291/10 "2019-03-25T10:01:32Z")

</div>

I thought Revise was mentioned in  
[https://docs.julialang.org/en/v1/manual/workflow-tips/](https://docs.julialang.org/en/v1/manual/workflow-tips/)

But I guess not, I think a PR to fix that would be good.  
I was thinking of ProfileView,jl mentioned in the profiler section.
