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

Managing multiple versions of the same package manager #629

Open
metasean opened this issue Apr 28, 2022 · 5 comments
Open

Managing multiple versions of the same package manager #629

metasean opened this issue Apr 28, 2022 · 5 comments
Labels
🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors 📦 manager: mpm mpm

Comments

@metasean
Copy link

metasean commented Apr 28, 2022

(A) I can't believe that I just stumbled across this!

(B) Is there a way to manage multiple versions of the same package manager, ala nvm for npm? This is needed when different end consumers need a different version of the same package manager. If there's already a way to do this, I apologize for missing it in the documentation.

@github-actions github-actions bot added 📦 manager: npm-based npm, yarn 🖥 platform: Linux ALT Linux, Amazon Linux, Android, Arch Linux, Buildroot, CentOS, CloudLinux OS, Debian, … 🖥 platform: Windows Windows 🖥 platform: macOS macOS labels Apr 28, 2022
@kdeldycke
Copy link
Owner

Hmmm. I'm not sure I understand what you mean by a way to manage multiple versions of the same package manager. Do you mean something like the following?

  1. you have multiple version of npm installed on your machine
  2. you want mpm to have the capability of autodetected all the version of npm installed (by nvm or whatever)
  3. you then want mpm to "navigate" to the context of each npm version and activate it (again, maybe via nvm, I don't know that tool)
  4. for each of this context, have mpm runs its usual operations like listing outdated packages or upgrade them

Is that what you're looking for?

@kdeldycke kdeldycke added 🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors 📦 manager: mpm mpm and removed 🖥 platform: Linux ALT Linux, Amazon Linux, Android, Arch Linux, Buildroot, CentOS, CloudLinux OS, Debian, … 📦 manager: npm-based npm, yarn 🖥 platform: Windows Windows 🖥 platform: macOS macOS labels Apr 29, 2022
@metasean
Copy link
Author

Is that what you're looking for?

Yep.

A lot of individual projects require different versions of the same packages, to include different versions of the package managers themselves.

nvm is an awesome tool that enables node developers to have multiple versions of node on their system and to specify per terminal and per project which version to use. There's always a default version (e.g. nvm install v14.19.1 -> Now using node v14.19.1 (npm v8.8.0)), but a user can install and use a different version via the command line (e.g. nvm install --lts && nvm use --lts -> Now using node v16.15.0 (npm v8.5.5), i.e. the most current "long term support" version) or by including an .nvmrc file with the version and invoking nvm use in the corresponding project's directory (e.g. nvm install v14.8.0 && echo "v14.8.0" > .nvmrc && nvm use -> Now using node v14.8.0 (npm v6.14.7)).

Each of these also result in a different set of global npm packages. For example, if I were to npm install -g cowsay while using node v14.8.0 and then I ran nvm use --lts the cowsay package would no longer be available, because it wasn't installed in the node v16.15.0 scope.

I'm most familiar with the node ecosystem, but I know that this problem isn't limited to that ecosystem.

@kdeldycke
Copy link
Owner

Note: I experienced this situation with Python my machine, as I had Python 3.10 installed as python3 command and Python 3.9 available as python. So yes, even if it is not the usual situation, it can happens and it is not unreasonable to have mpm identify and handle this case.

@kdeldycke
Copy link
Owner

Looking for multiple versions and variants of the same executable might also be necessary to solve the way Microsoft in placing dummy files on Windows to invite users to install popular tools by the way of its App Store: #927 (comment)

@kdeldycke
Copy link
Owner

Also relates to: #945

kdeldycke added a commit that referenced this issue Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎁 feature request Not existing yet and need to be implemented 🙏 help wanted I can't do this alone and need contributors 📦 manager: mpm mpm
Projects
None yet
Development

No branches or pull requests

2 participants