[Top][All Lists]

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

[GSoC update] Npm & guix

From: Jelle Licht
Subject: [GSoC update] Npm & guix
Date: Sun, 24 Jul 2016 03:06:52 +0200

Hello Guix!

After hopefully enough contemplation and a lot of elbow grease, I would like to
give you an overview of what I have been up to these past weeks.

To start off with something that might make some people less than happy; jQuery
and its dependencies will most likely not be packaged this summer. By me, at

On Ludo's advice, I snarfed Ricardo's recursive importer and bolted it on my npm
importer. After leaving the importer running for a quite some hours (and making
it more robust in the face of inconsistent npm information), it turns out that
jQuery has a direct or indirect dependcy on about everything. We are talking
pretty much all of the build systems, all of the testing frameworks and all of
the test runners. Literally thousands of packages, and multiple (conflicting)
versions of most.

While this is a sad realization indeed, it just makes it easier to focus on
other important packages of npm. Running the recursive importer on a handful of
packages leads me to the following possibly redundant observations:

* Quite some packages have tests (Yay!)
* Running tests requires test frameworks and test runners

This makes it IMHO a worthwhile goal bootstrap to a working test framework, with
of course at first tests disabled for the dependencies of this test framework.
Test frameworks all have an (indirect) dependency on the Coffeescript compiler,
of which the first version was written in Ruby. Using this initial (alpha)
compiler, and the awesome git-bisect command, I was able to subsequently compile
and use the more modern (but still old) Coffeescript-in-coffeescript compilers.

I am currently hovering between version 0.6 and 0.7, which can properly
recompile itself and slightly more contemporary version. Getting to version
1.6 from June 2013 should be doable using this exact same approach. This will
allow us to package a 2014 version of the Mocha testing framework.

For the people more knowledgeable in these matters, how would you deal with
deprecated functionality in languages such as python, ruby etc? Because npm
packages are so interdependent, I simply need to start somewhere, by packaging
things back when they did not have as many dependencies. Currently, I have a
file containing implementations of old Node (pre 1.0) functionality on Node 6.0.
I was thinking of releasing this 'hack' as an npm package and then package it in

The alternative would be to package each version of Node that was used to build
these ancient packages. For bootstrapping Coffeescript, this already forces us to
have 3~4 versions of Node, although it is conceptually a lot cleaner.

So my current view of our options:
* Backport ancient node features to a contemporary node version
* Package a significant variety of node versions
Please let me know if anyone has some thoughts, critiques or silver bullets for this

A goal of this project is still to have a working jQuery by the end of this summer, just
not via the procedures defined by npm. My current plan is to partially
reimplement the build procedures used for jquery, albeit in a much simpler
manner: just a single, some might say bloated, _javascript_ file created from the
sources, instead of the a-la-carte build afforded by Grunt.

In this approach, I also see something that might make packaging npm packages more Guix-friendly: as long as we have _functional_ equivalents, we should be able to build a
huge subset of packages. This can be either a blessed version of an npm package, or a
simplistic yet correct reimplementation, depending on the complexity of the specific
package. This would only work for build-time dependencies, or native-inputs.

Thanks for reading this WoT and looking forward to hearing your feedback.

- Jelle

reply via email to

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