Revise and import

Hi folks,

a fairly basic question on Revise.jl usage: how should I use revise with packages (mine) that import other packages? For example:

julia> using Revise
julia> import MyPackage
<edit code in package imported by MyPackage>
julia> MyPackage.function()
<old code is run>

I tried adding ‘using Revise’ to MyPackage, but that didn’t seem to have any effect either. Thanks,


Your approach should work. However, note that using Revise must come before the package that you’re editing is loaded. Perhaps you already did using OtherPackageThatMyPackageImports in this Julia session?

I find it most convenient to just load Revise automatically, which ensures that it is always loaded first:

1 Like