GNU bug report logs - #40710
node-build-system should not install tests

Previous Next

Package: guix;

Reported by: goodoldpaul <at> autistici.org

Date: Sun, 19 Apr 2020 09:13:01 UTC

Severity: normal

To reply to this bug, email your comments to 40710 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#40710; Package guix. (Sun, 19 Apr 2020 09:13:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to goodoldpaul <at> autistici.org:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 19 Apr 2020 09:13:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: goodoldpaul <at> autistici.org
To: bug-guix <at> gnu.org
Subject: node-build-system should not install tests
Date: Sun, 19 Apr 2020 09:12:20 +0000
As discussed here [0], node-build-system right now installs all the 
contents of a package's root node_modules directory, including i.e. 
tests.
We should investigate how exactly npm decides what to install and try to 
replicate that inside node-build-system. It seems likely that it uses 
the "files" array from the package.json file (see [1-2]).

[0]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36599
[1]: https://github.com/colorjs/color-name/blob/master/package.json#L6
[2]: https://github.com/npm/node-semver/blob/master/package.json#L21




Information forwarded to bug-guix <at> gnu.org:
bug#40710; Package guix. (Wed, 29 Apr 2020 14:56:01 GMT) Full text and rfc822 format available.

Message #8 received at 40710 <at> debbugs.gnu.org (full text, mbox):

From: goodoldpaul <at> autistici.org
To: 40710 <at> debbugs.gnu.org
Subject: WIP solution
Date: Wed, 29 Apr 2020 14:55:13 +0000
[Message part 1 (text/plain, inline)]
Hello everybody,
I'm attempting to implement the discussed changes. I think these patches 
come pretty close but being my first contribution to Guix's core I would 
like to ask some feedback before submitting these patches with some 
trivial mistake. I tried to base my implementation on [0].

The first patch adds "globstar" support to (guix glob), namely the 
ability of recursively matching subdirectories in a glob pattern (i.e. 
"foo/**/bar.scm" matches both "foo/bar.scm" and "foo/baz/bar.scm").

The second patch adds (guix glob) to the imported modules of 
node-build-system and uses that to parse glob patterns in the "files" 
array of a package.json and then install all the matching files.

I tested the patches by verifying that

./pre-inst-env guix build -K node-semver node-util-deprecate 
node-statsd-parser node-stack-trace node-oop node-mersenne 
node-long-stack-traces node-far node-env-variable node-color-name

runs without error and by running make check TESTS="tests/glob.scm" .

Do you have any feedback/advice?

Thanks,

Giacomo

[0]: https://docs.npmjs.com/files/package.json#files
[0001-guix-Add-globstar-support.patch (text/x-diff, attachment)]
[0002-guix-Enforce-package.json-files-directive.patch (text/x-diff, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#40710; Package guix. (Tue, 26 Oct 2021 21:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 40710 <at> debbugs.gnu.org (full text, mbox):

From: paul <goodoldpaul <at> autistici.org>
To: 40710 <at> debbugs.gnu.org
Subject: Re: node-build-system should not install tests
Date: Tue, 26 Oct 2021 23:04:03 +0200
close 40710





This bug report was last modified 2 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.