Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Revise.jl with Pkg.activate? #93

Open
rofinn opened this issue Feb 2, 2021 · 0 comments
Open

Use Revise.jl with Pkg.activate? #93

rofinn opened this issue Feb 2, 2021 · 0 comments

Comments

@rofinn
Copy link
Member

rofinn commented Feb 2, 2021

A common issue folks run into with JLSO files is running Pkg.activate(jlso_file) where an already loaded package needs to switch versions. I'm not sure this'll work, but it'd be nice if we could use Revise.jl to handle switching versions of already loaded packages. Particularly for the do-block style version where we want to switch version, do some work, and switch back.

https://github.com/invenia/JLSO.jl/blob/master/src/metadata.jl#L63

NOTE: The current behaviour isn't specific to JLSO.jl, but rather expected behaviour in Julia and Pkg.activate.

A package can only be loaded once per Julia session. If you have run import Example in the current Julia session, you will have to restart Julia and rerun activate tutorial in the Pkg REPL. Revise.jl can make this process significantly more pleasant, but setting it up is beyond the scope of this guide.

https://docs.julialang.org/en/v1/stdlib/Pkg/

Maybe the solution is to not depend directly on Revise.jl, but rather to include documentation on how it can be used to address that issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant