-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Pkg3: Environment manipulation in the language instead of with command line arguments #5
Comments
That seems like a good idea although I'm a little skeptical about feasibility and to some extent usability. Can we have two completely unrelated environments in the same process at the same time? What if they use different versions of the same shared libraries? The |
Juno has already gone the way of independent processes, implementing a process server so that way new processes open up instantly. This is something that seems to work very well, getting the "instant" response time while getting a truly cleared workspace. If the REPL acted the same that would be nice. |
You don't get any benefit from package management being an independent process if most users will want to run it from inside Julia most of the time. Upgrading happens often, removing occasionally. Both are safe if the packages they modify aren't currently loaded. They're only potentially problematic if the package is currently loaded. Rather than inconvenience everyone all of the time, I think it would be better to just warn on potentially problematic cases, like the loaded-in-memory version of a package no longer matching what's installed. Environments might need to be separate processes, but they should be launchable and configurable from within the language. Anything you can't do from within the repl is going to rule it out from a large group of users. |
If environment manipulation gets moved to a command-line invocation, people are probably going to want to run it most often from shell mode or via
run()
, which isn't any better than what we have now. Otherwise many Windows users aren't going to find it at all because the usual workflow there is often not via the command line. (IDE features can help, but shouldn't be required for this to be usable.)As a thought, what if we make this tie into JuliaLang/julia#17997 instead? Instead of loading packages into
Main
, load them into an environment-specific namespace. Enter and leave environments viaPkg3.enterenv("newenv")
,Pkg3.leaveenv()
etc. MakePkg3.add
,Pkg3.rm
, andPkg3.update
take an environment argument. If the user attempts to update or remove a loaded package from an environment, that environment needs to be reset via something similar toworkspace()
.The text was updated successfully, but these errors were encountered: