all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: swedebugia <swedebugia@riseup.net>
Cc: guix-devel@gnu.org
Subject: Re: Improved NPM importer with blacklist
Date: Fri, 30 Nov 2018 17:24:57 +0100	[thread overview]
Message-ID: <0cfa10d0f59225c3897d4fc004722ee2@lepiller.eu> (raw)
In-Reply-To: <12fdf913-eb03-b898-f9ff-8dd455935975@riseup.net>

Le 2018-11-30 17:13, swedebugia a écrit :
> Hi :)
> 
> On 2018-11-11 16:37, Julien Lepiller wrote:
>> I improved a bit over jlicht's work here, but there still a few tgings 
>> we want co work on: https://framagit.org/tyreunom/guix/tree/npm
>> 
>> There is an importer and a build system as well as a few packages. One 
>> of tge issue is that the importer is not recursive, so it doesn't get 
>> the specified version, and the packages aren't tested because the 
>> tests depend on cylic dependencies (and sometimes very big circles).
> 
> There is a stub of a recursive importer, but it does not seem to work.
> 
> --
> 
> I improved on Julliens work and added a blacklister. After much sweat
> it now works and the blacklist is populated with a lot of unneeded
> development dependencies and complex packages.
> 
> I added the version to all imported npm-packages and to the inputs as
> it does not make sense to reference the packages without a version
> given all the cyclic dependencies.
> 
> Thanks for all the help!

Hi,

I never used the recursive importer, so I didn't know it wasn't very 
good.

I wonder if we really need to import every version of the packages. That 
doesn't seem very practical. There are a few cyclic dependencies issues 
in Java packages too, and they are dealt with in a case-by-case basis. 
Most often, we made a degraded version of one of the packages, the 
second can use to build itself, then we rebuild the first with the 
second package.

Sometimes, we also have to adapt some of our packages for the newer 
versions of the dependencies we have. If we didn't, we'd have a lot of 
versions of every package, and most of them would be outdated, probably 
buggy or contain security holes. I'd prefer using the latest versions of 
dependencies, and contribute patches back to upstream, so they can use 
the latest and greatest too :)

That's obviously a lot more work, but that's also probably a saner way 
of doing things.

> 
> TODO:
> * make npm-recursive-import work by not fetching blacklisted packages

Let's be careful though: we don't want to fetch blacklisted packages 
when they are devDependencies, but we still want them if they are 
runtime dependencies.

> 
> * implement keyword blacklisting based on the descriptions

We can probably use tags instead of the description : '("test" "testing" 
"check" "doc" "coverage" "unit") seem like a good approximation of what 
we want to blacklist.

> 
> * match not just the whole string of blacklisted packages:
>   e.g. match also "rollup-plugin" when "rollup" is in the blacklist.
> 
> * get the tarballs from npm-registry instead as they are never missing
>   (githubs sometimes are) and likely reproducible.

Are they actual source tarballs, or are they somewhat different than the 
source used to build the "binary" npm package? With maven (for java) for 
instance, some sources are hosted, but they aren't supposed to be used 
to build the package, they're only here for the debugger.

> 
> * Output a (define-public <guixname> (inherit <guixname>-<version>)) 
> for
>   all imported npm-packages.

I don't think that's a good idea: if we have multiple versions of a 
package, we'll have multiple <guixname> packages...

> 
> * Make it possible to specify a specific version to import (and perhaps
>   the latest of all minor versions of a package :D).
> (For async that would be "0.1.22", "0.2.10", "0.3.0", etc all the way
> up to "2.6.1" which is the current beast. This would mean that we in
> total import about 477.000 packages times the number of minor releases
> (mean ~10?) that equals 4,7 mio. npm-packages :p) Then we will
> definitely need to speed up guile. My guess is that we will have to
> import at least 1,5 versions for every npm package to mitigate cyclic
> dependencies (this means 477.000*1,5 = 715.500 npm-package-versions).

Again, I'm more in favor of patching them, rather than importing more 
versions. Do we still have as many cyclic deps with the blacklist?

> 
> * Make it easy to analyze a given npm-package to see when deps/devdeps
> were added. In the case async, propose we import 0.9.0 first which is
> the last version without lodash as devdep. From 1.0.0 more devdeps
> were added. (source: https://registry.npmjs.org/async)
> 
> Perhaps some kind of tree output for these complex packages with
> versions as branches and dependencies as subbranches would be nice?
> --
> 
> See the files I changed attached.

Thanks for your work!

  reply	other threads:[~2018-11-30 16:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-11 10:41 NPM importer swedebugia
2018-11-11 15:37 ` Julien Lepiller
2018-11-19 23:29   ` swedebugia
2018-11-20  7:50     ` Julien Lepiller
2018-11-20 19:58       ` swedebugia
2018-11-20 21:12         ` swedebugia
2018-11-20 22:35           ` Julien Lepiller
2018-11-21 15:36             ` swedebugia
2018-11-21  1:41           ` Mike Gerwitz
2018-11-21 22:01             ` Brett Gilio
2018-11-21 23:22               ` swedebugia
2018-11-22  1:02                 ` swedebugia
2018-11-22  5:43                   ` Brett Gilio
2018-11-22 11:27                     ` import libjs-*.deb from Debian? (was Re: NPM importer) Giovanni Biscuolo
2018-11-30  3:23                       ` Ricardo Wurmus
2018-11-22  8:36                   ` NPM importer Julien Lepiller
2018-11-24 13:47                     ` swedebugia
2018-11-23 19:50                   ` swedebugia
2018-11-30  3:17                     ` Ricardo Wurmus
2018-11-30 14:17                   ` Packaging async and underscore (Was: Re: NPM importer) swedebugia
2018-11-30 16:08                     ` Packaging async and underscore Julien Lepiller
2018-11-30 16:44                       ` swedebugia
2018-11-24 13:42       ` NPM importer swedebugia
2018-11-30 16:13   ` Improved NPM importer with blacklist (Was: Re: NPM importer) swedebugia
2018-11-30 16:24     ` Julien Lepiller [this message]
2018-11-30 17:20       ` Improved NPM importer with blacklist swedebugia
2018-11-30 23:27     ` Improved NPM importer with blacklist (Was: Re: NPM importer) swedebugia
2018-11-11 17:10 ` NPM importer Ludovic Courtès
2018-11-21 16:37   ` Giovanni Biscuolo
2018-11-21 17:15     ` Julien Lepiller
2018-11-22  9:29       ` Giovanni Biscuolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0cfa10d0f59225c3897d4fc004722ee2@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=guix-devel@gnu.org \
    --cc=swedebugia@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.