[PATCH] guix: node-build-system: Delete from peerDependencies too.

  • Done
  • quality assurance status badge
Details
2 participants
  • Jelle Licht
  • Lars-Dominik Braun
Owner
unassigned
Submitted by
Lars-Dominik Braun
Severity
normal

Debbugs page

Lars-Dominik Braun wrote 2 years ago
(address . guix-patches@gnu.org)
6bc6fc29681881be3ce767c51a7dd8886b97c169.1687336553.git.lars@6xq.net
* guix/build/node-build-system.scm (delete-dependencies): Remove supplied
dependencies from peerDependencies field too.
---

Hi,

this is required to build a new RStudio. I’m also validating it does

Cheers,
Lars

guix/build/node-build-system.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/guix/build/node-build-system.scm b/guix/build/node-build-system.scm
index 93f7efbb2b..fb23894bc1 100644
--- a/guix/build/node-build-system.scm
+++ b/guix/build/node-build-system.scm
@@ -208,7 +208,8 @@ (define (delete-dependencies absent)
(jsobject-update*
pkg-meta
`("devDependencies" ,delete-from-jsobject (@))
- `("dependencies" ,delete-from-jsobject (@))))))
+ `("dependencies" ,delete-from-jsobject (@))
+ `("peerDependencies" ,delete-from-jsobject (@))))))
(define* (delete-lockfiles #:key inputs #:allow-other-keys)
"Delete 'package-lock.json', 'yarn.lock', and 'npm-shrinkwrap.json', if they

base-commit: 1a0ff5cd83d3257efcab64740a1322de51fbc4a1
--
2.39.3
Jelle Licht wrote 2 years ago
875y7f7sl1.fsf@fsfe.org
Lars-Dominik Braun <lars@6xq.net> writes:

Toggle quote (9 lines)
> * guix/build/node-build-system.scm (delete-dependencies): Remove supplied
> dependencies from peerDependencies field too.
> ---
>
> Hi,
>
> this is required to build a new RStudio. I’m also validating it does
> not break anything here: https://ci.guix.gnu.org/jobset/node-peerdeps

LGTM. You can consider adding a note to the commit message that thix
needed due to a change in how more recent npm versions deal with
peerDependencies.

Cheers,
- Jelle
Lars-Dominik Braun wrote 2 years ago
(name . Jelle Licht)(address . jlicht@fsfe.org)(address . 64203@debbugs.gnu.org)
ZJQc-bJAjr5nYmMK@noor.fritz.box
Hi,

Toggle quote (4 lines)
> LGTM. You can consider adding a note to the commit message that thix
> needed due to a change in how more recent npm versions deal with
> peerDependencies.

I don’t know anything about that change in npm unfortunately – this
is purely based on observations of failed builds. Do you have further
information on this?

Thanks,
Lars
Jelle Licht wrote 2 years ago
(name . Lars-Dominik Braun)(address . lars@6xq.net)(address . 64203@debbugs.gnu.org)
87zg4r6bii.fsf@fsfe.org
Lars-Dominik Braun <lars@6xq.net> writes:

Toggle quote (10 lines)
> Hi,
>
>> LGTM. You can consider adding a note to the commit message that thix
>> needed due to a change in how more recent npm versions deal with
>> peerDependencies.
>
> I don’t know anything about that change in npm unfortunately – this
> is purely based on observations of failed builds. Do you have further
> information on this?

The previous version of node we had packaged guix was v14, which came
with npm v6. The most recent version of node we have packaged in guix is
v18, which comes with npm v9.

From [1]: "In npm versions 3 through 6, peerDependencies were not
automatically installed, and would raise a warning if an invalid version
of the peer dependency was found in the tree. As of npm v7,
peerDependencies are installed by default."

HTH!
- Jelle

Lars-Dominik Braun wrote 2 years ago
(name . Jelle Licht)(address . jlicht@fsfe.org)(address . 64203-done@debbugs.gnu.org)
ZJQqvLgAomtTph1j@noor.fritz.box
Hi,

Toggle quote (9 lines)
> The previous version of node we had packaged guix was v14, which came
> with npm v6. The most recent version of node we have packaged in guix is
> v18, which comes with npm v9.
>
> From [1]: "In npm versions 3 through 6, peerDependencies were not
> automatically installed, and would raise a warning if an invalid version
> of the peer dependency was found in the tree. As of npm v7,
> peerDependencies are installed by default."

thanks! Pushed to master as 37c2e94cec6cb8b5e0e93e7b6c712c3b187ca5db.

Cheers,
Lars
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 64203@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 64203
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help