Gentoo Archives: gentoo-dev

From: "Herb Miller Jr." <herb@×××××.com>
To: "gentoo-dev@l.g.o" <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [RFC] Begin a dev-libs/nodejs category?
Date: Tue, 20 Mar 2018 20:14:54
Message-Id: BLUPR17MB02737BD97DF18E8F5C8F6801D9AB0@BLUPR17MB0273.namprd17.prod.outlook.com
In Reply to: Re: [gentoo-dev] [RFC] Begin a dev-libs/nodejs category? by Michael Orlitzky
1 On 03/20/2018 02:48 PM, Michael Orlitzky wrote:
2 > On 03/20/2018 07:50 AM, Herb Miller Jr. wrote:
3 >> When I did my homework on creating nodejs ebuilds (not nodejs itself but
4 >> packages written in node), it seems the topic has come up a few times in
5 >> the past but the time commitment and general disorganization of upstream
6 >> has scared off any serious attempts at packaging.
7 > There's a real technical problem hidden in there. Since npm
8 > (recursively!) bundles every dependency, nobody worries about
9 > compatibility in their JS packages. You'll quickly find yourself stuck.
10 >
11 > For example, if you want to package an end-user application "foo", it
12 > might depend on libraries "bar-1.0" and "baz-2.0". But then "bar-1.0"
13 > itself depends on "baz-1.0". What do you do? Slot everything? How do you
14 > make NodeJS look in the right place? You're going to need a plan,
15 > because this situation is not at all uncommon.
16 >
17 That is scary. I hadn't noticed there are node_modules directories under
18 many node modules and that npm list outputs different versions of the
19 same dependency. To help me better understand the situation, when you
20 see this happen does "bar-1.0" normally depend on "baz-1.0" because...
21
22 A) There is some huge technical hurdle in upgrading to "baz-2.0"?
23 B) I was too lazy or didn't care to upgrade to "baz-2.0"?
24 C) My package.json is outdated?
25
26 If A, can you point me to a good example I can take a look at? If it's
27 normally B or C, I have no problem making lots of upstream pull
28 requests. It's just Javascript. Though I understand that's not a true
29 solution in the long-run and has burnout written all over it. I'll have
30 to give the problem much more thought.
31
32 ----
33 Herb Miller Jr.

Replies

Subject Author
Re: [gentoo-dev] [RFC] Begin a dev-libs/nodejs category? Michael Orlitzky <mjo@g.o>