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

Don't Reinstall Installed Packages (when installing from package-file) #117

Open
1 task done
emendir opened this issue Dec 17, 2023 · 4 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@emendir
Copy link

emendir commented Dec 17, 2023

Have you checked for existing feature requests?

  • Completed

Summary

The Problem

When installing a list of packages from a file using the command ppm install --packages-file ./MyPackages.txt, and for some reason the installation of a single package in this list fails (e.g. broken internet connection), re-running the command results in all packages, even those that have already been successfully installed, being rebuilt and reinstalled.

The Solution

When ppm installs packages from a file, it should only install those packages which aren't yet installed, skipping those packages that are already installed.

This behaviour could be optional, e.g. activated by a CLI argument such as --dont-reinstall

What benefits does this feature provide?

This feature would greatly improve the resiliency of PPM when installing multiple packages at once, as it would allow an interrupted installation process to continue where it left off instead of started all over again.

Any alternatives?

I don't see any similarly efficient or effective solutions to the described problem.

Other examples:

No response

@emendir emendir added the enhancement New feature or request label Dec 17, 2023
@confused-Techie
Copy link
Member

This is a great suggestion, and would love to see any PRs attempting an implementation, otherwise is hopefully something that can be looked at soon. Thanks for the contribution!

@Daeraxa
Copy link
Member

Daeraxa commented Dec 18, 2023

This does technically introduce a breaking change if we were to add it.

i.e. currently ppm install can be used to both install a package from scratch as well as updating an existing package.

Of course there are other commands, namely ppm upgrade and ppm update (and ppm outdated) which, when run alone will perform updates for everything on the system but can accept the package name as an argument.

Although technically breaking I think there is a case for making some changes to some of these commands. Essentially what is being requested here is unrelated to the package file but asking to change the behaviour of how the install command works.

@emendir
Copy link
Author

emendir commented Feb 10, 2024

This does technically introduce a breaking change if we were to add it.

i.e. currently ppm install can be used to both install a package from scratch as well as updating an existing package.

It wouldn't be a breaking change if ppm install were to update out-of-date packages and skip reinstalling up-to-date packages.

@2colours
Copy link
Contributor

2colours commented May 5, 2024

@emendir this already seems to be the intended behavior for everything that isn't "installed globally", whatever that means.

if (!installGlobally) {

I don't know if that is supposed to be an option somehow coming from the user, all I can see is that it's set to false for dependencies.

The question really is whether lifting that if-check could break anything elsewhere.

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

No branches or pull requests

4 participants