# Revise.jl and PackageCompiler.jl are not compatible?

**URL:** https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567
**Category:** New to Julia
**Tags:** revise, package-compiler
**Created:** [October 1, 2020, 3:19am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567 "2020-10-01T03:19:08Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)
#### Post date: [October 1, 2020, 3:19am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/1 "2020-10-01T03:19:08Z")

</div>

This is an extension of [the original question about Revise.jl](https://discourse.julialang.org/t/should-i-turn-on-off-repeatedly-to-reflect-changes-of-currently-developing-packages/47560/21).

I found that Revise.jl doesn’t work when using PackageCompiler.jl as reported [here](https://discourse.julialang.org/t/should-i-turn-on-off-repeatedly-to-reflect-changes-of-currently-developing-packages/47560/21).  
While compiling packages, even Revise.jl was not included.

Anybody knows the compatibility issue between Revise.jl and PackageCompiler.jl?

EDIT: I followed [this instruction](https://julialang.github.io/PackageCompiler.jl/dev/examples/plots/) with `restore_default=true` and more packages and functions.  
Here’s the list:  
:Debugger,  
:OhMyREPL,  
:HDF5,  
:StaticArrays,  
:Plots,  
:LinearAlgebra,  
:HDF5,  
:ProgressMeter,  
:Convex,  
:Mosek,  
:MosekTools,

---

<div class="post-metadata">

### Author: ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)
#### Post date: [October 1, 2020, 3:47am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/2 "2020-10-01T03:47:52Z")

</div>

Perhaps [this](https://julialang.github.io/PackageCompiler.jl/dev/devdocs/sysimages_part_1/#Custom-sysimages-1) indicates that packages depending on compiled packages by PackageCompiler.jl would not be compatible for Revise.jl well…?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [October 1, 2020, 6:32am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/3 "2020-10-01T06:32:00Z")

</div>

Revise has special handling for updating stdlibs (which are in the sysimage). It’s unlikely that will work with other packages put into the sysimage though.

---

<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: [October 1, 2020, 8:18am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/4 "2020-10-01T08:18:30Z")

</div>

To make sure Revise ends up in the system image, don’t you have to include `:Revise` in the list passed to `create_sysimage`? I suspect the image is built with `--startup-file=no`.

You can always check whether Revise is loaded by typing `Revise` at the REPL and seeing whether it gives you an error.

---

<div class="post-metadata">

### Author: ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)
#### Post date: [October 1, 2020, 8:24am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/5 "2020-10-01T08:24:17Z")

</div>

Actually I didn’t fully understand your comment.

Do you mean that, in some way, there’s an option of PackageCompiler.jl which does not include startup files and this would make Revise.jl not working?

If so, do you think that manually adding `using Revise` will solve this problem?

---

<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: [October 1, 2020, 9:12am UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/6 "2020-10-01T09:12:58Z")

</div>

I was just guessing, but a little digging turned this up: [https://github.com/JuliaLang/PackageCompiler.jl/pull/264](https://github.com/JuliaLang/PackageCompiler.jl/pull/264)

So, nothing that you load in your startup file will be built into the sysimage it creates: you have to explicitly define the particular packages you want to include. That seems like a very sensible choice to me.

I’m not a PackageCompiler user myself, because I’ve found that it’s not very convenient for people who are constantly developing the packages they’d like to build into their sysimage. So I don’t have much experience, sorry. But I would guess it should still load your startup file, and I was just proposing you check by typing Revise at the REPL. If it isn’t there, then `using Revise` should fix it for any packages that you load _later_. (Anything loaded before Revise will not be tracked.)

Revise won’t track packages that you build into your sysimage, so do be careful about how much stuff you put in there.

---

<div class="post-metadata">

### Author: ![iHany](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ihany/32/18151_2.png) [@iHany](https://discourse.julialang.org/u/iHany)
#### Post date: [October 1, 2020, 12:09pm UTC](https://discourse.julialang.org/t/revise-jl-and-packagecompiler-jl-are-not-compatible/47567/7 "2020-10-01T12:09:54Z")

</div>

As you told me, I tried to check whether Revise.jl is correctly imported at the beginning.  
And it is.

After that, Revise.jl with PackageCompiler.jl works well, and it does not depend on whether Revise.jl is included in compiling list.

Frankly speaking, I don’t understand what was going on, but it is finally works.  
Revise.jl sometimes reflect changes of codes with delay, but it may be due to my specific work flow.

I suspect that Revise.jl was not properly imported at the beginning when I asked the question.
