Package managers should be immutable, distributed and decentralized
evertpot.com
evertpot.com
Decentralized / Distributed is a good thing to have and prior art already exists.
Source: Experience with the grand daddy CPAN.
After their first module they can create as many new modules aas they want though.
Debian seems to have no problems with that.
Major Linux distributions (Fedora/Debian/SuSE/etc.) are excellent example of proper solution for the "dependency hell" problem for C programs. JavaScript is the new C, but for web, so same solution will appear for same problem.
Because Debian developers do not package all sort of crap.
Archlinux is a bit better, but the crazy amount of timeouts and the everything-goes mentality is getting pretty frustrating.
CentOS/rhel isn't much better, for what it's worth. Dear god, those repos....
Nix still needs some sort of distributed trust model, though. Without that, nixos.org is a single point of failure.
https://www.youtube.com/watch?v=xRSFJH3Lw6I
He is the author of one of the popular Erlang books and here talks about using Nix in production instead of just pure langauge specific package managers (or OS package managers).
Some really good insights on immutability, reproduceability, and of course real production use examples.
It'd still be valuable to be able to propagate revocations, to indicate versions that are no longer valid (because of security issues or what have you), but it would be entirely possible to have mirrors available for widely used packages that still have the correct signed sha for that version for projects that can't or shouldn't move on for whatever reason.
Basically I'm saying a released version of a package could quite easily be a tuple of the following:
- gpg key of project releaser
- sha of release tag
With auxiliary information relevant to discovering both newer versions and mirrors of older versions:
- canonical git repo where the tag and signature can be found, as well as future revisions of the same
- (optional) mirror repos where you can find the above if the canonical repo is not available.
The vendoring mechanism advocated by Go is better than a central registry (like npm, PyPI, RubyGems or crates.io).
crates.io’s FAQ claims that a central registry is good for discoverability (find popular packages) and speed (fetch only necessary data instead of the whole git repository), but a proxy could provide the same benefits to an ecosystem based on decentralized repositories and vendoring.
https://medium.com/@sdboyer/so-you-want-to-write-a-package-m...
Come to think of it GIT already is able to map commits to checksums. That's practically everything that is needed. As soon as someone implements a BLOCKCHAIN GIT protocol, we're done. The problem will essentially be solved. Or in summary: Implementing a BLOCKCHAIN that stores GIT commits, along with some metadata for each commit.
BlockChain is good for finance, as well as source control is the main point here. BlockChain can store anything but the point here is redundant, verifiable storage, of all sources.
A package manager should be fast, easy to use, with good conflict resolution —and useful information when this fail, fast downloads and a web of trust behind it.
Not incidentally, you get this from major GNU/Linux distributions.
Artifactory is one package that does all of this, but in the past I have rolled my own using various packages to cache maven repos, Ubuntu packages, Python Pypi packages. It is not that hard and makes you mostly unaffected by Internet outages and repos that go away for some reason.
And since the cache is under your control you can publish your own binary objects to it, and clean it up too if you really want to get rid of something.
Not to mention most of the modules on NPM that are maintained by one person are usually less than 1k lines of code.
If you have a small project then it would not be a huge thing to replace them, if you have a big project, you've probably already did that.
Do you really enjoy bloating your projects with 3 versions of the same package because it is required by 3 other packages that have been independently maintained?
Why would you not want to know what is in your app, if you spend so many man-hours building it?
Version control for all projects seems to be a much better solution than package management.
I keep seeing people say that, but NPM rejects it if you try to publish a version that already exists. Am I misunderstanding what the author is saying?