DEV Community

Discussion on: What are your thoughts on multiples package managers?

Collapse
 
hoelzro profile image
Rob Hoelz

To be honest, I'm a little frustrated with how many package managers are out there - I understand the problem, but if there's a program I want to try that requires me to use a package manager I'm not super familiar with, I often won't bother. I guess this is a point in favor of programs written in Go or Rust, or those that are easy to statically compile. This mostly applies to a program I read about that I want to try out - once a tool has proven its value, I'll package it up myself if need be!

That being said, I don't mind npm or pip so much, mainly because node_modules stays local to whatever directory I'm working in (I never use -g), and I can easily create a virtualenv, so I can try out new JavaScript or Python tools pretty painlessly. (I'm betting other language-level package managers have something similar, but I haven't take the time to learn about them!)

Looking at other comments to this thread, I see a lot of mention of Linux package managers - I think an interesting approach could be to a) allow non-root users to install packages under a certain directory (eg. why shouldn't I be able to install a package whose contents lives under ~?) - I think Fedora was working on this?, and b) to have a mode for language-level package managers to integrate with this functionality. So, to take npm and Arch's pacman as an example, npm could tell pacman "hey, I installed these files as part of the foo package", and pacman could write an entry in its local package database for npm/foo. After all, the point of a lot of packaging build scripts like PKGBUILD is to essentially build a package tarball with a little metadata; why couldn't a tool provide that metadata and its own archive structure instead?

Even with that in mind, I think we might not see work going into that - now that containerization is taking off, the mindshare seems to be going into packaging up application as snaps or even full Docker containers.

Anyway, sorry for the rant - I just got really into thinking about this!