Why not always use Revise?

Is there any reason not to always be use-ing Revise? If so, what are the risks or drawbacks?

I do. I don’t see any reason not to.

2 Likes

I was about to give up on Julia until I found Revise. Without it, development in Julia is really painful.

You can put it in your startup script and then you will always use it.

2 Likes

My startup script automatically activates the environment of the cwd. This may be a silly question but is there a way to use the Revise installation of another environment (say my base 1.6 environment) without having to add Revise to my current working env? Afaik this is fundamentally impossible, correct?

I’m wondering about this because while I personally may like to use Revise, other people working on the same project might not want to use it (and I don’t want to shove it down their throat by including it in all the scripts). Should I just add Revise to the project env, then add a line to the startup script to look for “Revise” in Project.toml and use it if it exists? Thanks for any advice in advance. :slight_smile:

1 Like

Julia environments are stacked. That means that even when you activate another environment, everything that’s in your 1.6 environment is also available! So if you have Revise in your base environment you can simply do using Revise, even if you have another environment activated, and it will just work.

This has been the way Julia works for ages, so I don’t get why you’d think it’s impossible.

5 Likes

Thanks, that’s what I was hoping for. (Relevant docs section for reference.)

I simply did not know. Never thought of that possibility but it’s as smart as can be. Learn something new every day. :slight_smile:

Are there future plans to integrate Revise.jl into the base Julia environment, so that it is always active? If it’s always a net positive, there should be no reason not to, right?

3 Likes

I’m also in favor to make it part of Julia, but Should Julia recommend Revise? · Issue #564 · timholy/Revise.jl · GitHub

3 Likes

That’s what I do, but as a noob I was wondering if it was Kosher. It sounds like it’s more than that even.

Julia environments are stacked.

That inspires another question.

Seeing your comment I just suggested/agreed Revise be included in Julia (1.7), to be done with it (not just in VS Code), at the linked Revise issue on here. Does it need to be a Julia issue to be noticed? Would core devs reject in in Julia (1.7)?

You can add Revise to your base environment yourself, and add using Revise in your startup.jl, to get exactly what you wanted.

As for adding Revise to the standard lib, the core Julia and Revise developers have spoken against it many times. Adding something to the standard lib means slowing down development, as releases can only happen together with Julia releases (that includes solving bugs), and breaking changes can only be made when a major Julia release is made (i.e. at the moment not before Julia 2.0). Since Revise is still being updated often, this is just not a good prospect.

6 Likes

There must be a time limit to that principle