guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cyclic npm dependencies


From: Jelle Licht
Subject: Re: Cyclic npm dependencies
Date: Sat, 24 Nov 2018 15:41:35 +0000

Hey swedebugia,

I will still send a more elaborate reply to the general npm-importer
thread later this week, but we can assume that generally these
recursive dependencies can be untangled by looking at the different
versions of the dependencies.

So in your example, I imagine an input chain like:
node-glob 0.1  -> node-rimraf 0.1 -> node-glob 0.2 -> node-rimraf 0.2 -> .... -> node-glob 1.0 -> node-rimraf 1.0

While *extremely* annoying to untangle, this is definitely doable.
Problems arise if this chain does not actually exist, which basically
means that we have to hunt down commits [1] which are steps in these
chains. Another complication is the versioning scheme used by many npm
packages, the semver [2] + ranges notation [3]. This makes this kind of
'versioning archeology' even harder to do.

For the case where this chain does exist, I have been working on a
semi-npm-compatible semver parser for guile [4], which I was hoping to
integrate in the npm importer or a standalone tool to assist people
wanting to untangle these dependency chains. The goal would be to
reconstruct the needed versions to package by parsing data in the
package.json files of historic versions of these packages.

HTH,

Jelle

[1]: ... or even more granular, parts of commits!
[2]: https://semver.org/
[3]: https://docs.npmjs.com/misc/semver
[4]: https://git.fsfe.org/jlicht/guile-semver


Op za 24 nov. 2018 om 15:10 schreef swedebugia <address@hidden>:
Hi

We need to wonder about what to do with cyclic dependencies.

In the case below node-rimraf has node-glob in input and node-glob has
node-rimraf in NATIVE-input.

I have no idea how to solve this. Both packages are by the same author.

Same problem with jasmine and jasmine-core

~/guix-tree/pre-inst-env guix build -K node-rimraf
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind
handler.
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind
handler.
allocate_stack failed: Cannot allocate memory
Warning: Unwind-only `stack-overflow' exception; skipping pre-unwind
handler.


--
Cheers Swedebugia


reply via email to

[Prev in Thread] Current Thread [Next in Thread]