Open cstrahan opened 8 years ago
The readme is out-of-date. CAS is not used anymore. https://github.com/alexanderGugel/ied/issues/48#issuecomment-175318512
Hmm, i think hashes are still being used (v0.4.11)... what was mentioned in there was just a plan for future versions.
In ied's implementation though, hashes are derived not from the contents, but rather unique identifiers of the package (eg, lodash@4.0.0
). This makes much more sense in the npm context, IMHO. #79
@rstacruz I'm still not sure about what makes more sense. We might as well not use a CAS in the first place then and simply use name-version
as folder names.
or just name/version
Arrggghhh... I'm really not sure... it once was a CAS, but that's no longer the case unless we consider name + version to be the content... which is definitely kind of a lie.
I might suggest looking at some of the difficulties we've had packaging npm
libs/apps in NixOS to drive the design of ied
:
http://sandervanderburg.blogspot.com/2016/02/managing-npm-flat-module-installations.html
If ied
can provide a sane(r) story for packaging in distros, you'll have the backing of everyone using and contributing to NixOS :).
Big plus from another NixOS maintainer here. We desperately need a package manager for node that fits the sane model.
i think a killer feature of of ied
could be to (optionally) support installing system packages via nix
similar way stack does it.
which brings me to another point. you could reuse nix infrastructure and provide binaries :)
Hello, Nix package maintainer here.
I saw the "node_modules as CAS" bullet-point on the project's homepage, and it raised a potential red flag for me. In Nixpkgs, it's not uncommon to need to patch packages (to fix bad assumptions around file paths and such), and if packages are referred to via content hash, I would wonder if such patches would still work in your scheme. Is the content hash supposed to be invariant? Because it's quite likely that some of them will change under Nix (either before or after install), and it would be a packaging nightmare if we had to traverse an entire dependency graph and rewrite expected hashes in order for
ied
to correctly resolve modified dependencies.To be clear, that's not a problem unique to Nix - that would be problem for all package managers when their respective distro deems patches necessary (Debian/Ubuntu/Fedora/etc).