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

Pkg3: allow upgrading and removing packages from REPL #7

Open
nalimilan opened this issue Oct 22, 2016 · 4 comments
Open

Pkg3: allow upgrading and removing packages from REPL #7

nalimilan opened this issue Oct 22, 2016 · 4 comments
Labels

Comments

@nalimilan
Copy link
Member

When the user wants to remove package or update packages from an environment, they will instead invoke an external package management mode (julia --pkg?), which makes it clear that changes will not affect any currently running Julia sessions. The impact on usability is a strict improvement:

  • Adding packages and loading them is easier since one simply does using XYZ and answers interactive prompts.
  • Removing and upgrading packages is no less difficult since it previously required restarting the current Julia process anyway, and is less confusing since the requirement to restart is explict since running a separate process clearly doesn't affect the current one.

Using the command line to manage packages sounds like a usability loss to me. This will particularly be the case for Windows users.

I think we should keep the current Pkg.* functions. They should simply print a warning or ask to restart when modified packages are currently loaded.

@tbreloff
Copy link

tbreloff commented Nov 1, 2016

I don't think "invoke an external package management mode" necessarily means you have to type commands into another prompt. In my mind this entails spinning up another process with some sort of IPC communication. You could still do Pkg.rm in the current process but it would send that command to a "package management process". Doing using XYZ when XYZ isn't installed could:

  • ask if you want to install
  • send an "install request" to the package management process
  • confirm installation
  • call using XYZ

For other commands, nothing would happen after the request is sent to the package management process. The filesystem/etc might change, but nothing in your current Julia session.

@StefanKarpinski
Copy link
Sponsor Member

Right – I think there would be less potential for confusion and problems if package management operations don't actually take place in the current process. If you want to use and uninstalled package, you would invoke the installation command, wait on it to complete, and then load the installed package. I also think that a pkg> REPL mode would be really handy.

@ChrisRackauckas
Copy link
Member

Yes, a pkg> REPL mode sounds like a perfect middleground.

@tkelman
Copy link

tkelman commented Nov 3, 2016

there would be less potential for confusion and problems if package management operations don't actually take place in the current process

Why, exactly? What problem does this solve? If an existing version of a package is already loaded, modifying it in a different process doesn't make the situation any less confusing unless you warn or force a restart of the process that has loaded the old version.

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

No branches or pull requests

5 participants