unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [GSoC update] Npm & guix
@ 2016-07-24  1:06 Jelle Licht
  2016-07-25  8:41 ` Andy Wingo
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jelle Licht @ 2016-07-24  1:06 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 3745 bytes --]

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
least.

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
Guix.

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
problem.

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

[-- Attachment #2: Type: text/html, Size: 4044 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-08-11  4:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-24  1:06 [GSoC update] Npm & guix Jelle Licht
2016-07-25  8:41 ` Andy Wingo
2016-07-25 11:33 ` Jan Nieuwenhuizen
2016-07-25 21:26 ` Ludovic Courtès
2016-07-29 14:53   ` Catonano
2016-07-29 15:26     ` Jelle Licht
2016-07-30 22:19       ` Package graph queries Ludovic Courtès
2016-08-11  4:37         ` Catonano

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).