Replies: 2 comments 1 reply
-
We're phasing out node2nix: NixOS/nixpkgs#229475 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi,
I think phasing it out is the best thing to do. node2nix's design and
architecture are IMO no longer a good fit for modern NPM versions -- it
contains too much complexity and requires changes that are very laborious
to implement.
The biggest problem with node2nix is that it was originally designed for
deploying packages without lock files. Its main contribution was its own
implementation of NPM's dependency resolution algorithm. It did its job
well for some time, but the biggest price is that it's quite laborious to
keep the implement of the algorithm in sync with NPM and work around its
quirks. In each new major NPM release things change (sometimes in very
fundamental ways) and to cope with these changes, sometimes substantial
revisions are needed (as a matter of fact, the current node2nix
implementation has its 3th major revision).
Nowadays, NPM deployments are lock-driven. node2nix can also work with lock
files, but it was not originally designed to work with them. As a
consequence, its architecture is also more complicated than it should be.
node2nix's implementation also has a considerable amount of tech debt as a
result of accommodating all these weird difference between major NPM
releases. Furthermore, it still uses old style JavaScript conventions (e.g.
pre-ES6 concepts) and more weird things that you can get rid of if you move
to ES6 and use newer libraries.
A few years ago, I have outlined a potential new design on the NixOS
discourse that is, perhaps not as accurate as node2nix, but substantially
easier to maintain. Unfortunately, I never got very far in exploring this
new design.
Instead of fixing node2nix on an architectural level, I think it's much
more profitable to explore/implement more effective and simple
designs/approaches.
…On Sun, Oct 20, 2024 at 5:10 AM Robert Schütz ***@***.***> wrote:
We're phasing out node2nix: NixOS/nixpkgs#229475
<NixOS/nixpkgs#229475>
—
Reply to this email directly, view it on GitHub
<#1523 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIZR544TQWMGAACPZL2ERLZ4MNJBAVCNFSM6AAAAABQIB4YXGVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAOJZGQYTKMI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
node2nix is used extensively in nixpkgs so it would be nice to have more maintainers for it either by moving it to nix-community and adding maintainers or by adding maintainers without moving
@svanderburg Maybe you could pick maintainers from nixpkgs node maintainers?
Beta Was this translation helpful? Give feedback.
All reactions