From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id mHoNA6LMtmMrRQEAbAwnHQ (envelope-from ) for ; Thu, 05 Jan 2023 14:12:02 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kHQwAqLMtmMmSAEAG6o9tA (envelope-from ) for ; Thu, 05 Jan 2023 14:12:02 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5ED17173C9 for ; Thu, 5 Jan 2023 14:12:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDQ1Q-00016e-Ca; Thu, 05 Jan 2023 08:11:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDQ1O-00011O-Nf for guix-patches@gnu.org; Thu, 05 Jan 2023 08:11:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pDQ1O-0005Bs-FX for guix-patches@gnu.org; Thu, 05 Jan 2023 08:11:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pDQ1N-0006Xm-UX for guix-patches@gnu.org; Thu, 05 Jan 2023 08:11:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59188] [PATCH 0/4] gnu: node-lts: Update to 18.12.1. Resent-From: Jelle Licht Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Jan 2023 13:11:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59188 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Hilton Chain Cc: Mekeor Melire , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , 59188@debbugs.gnu.org Received: via spool by 59188-submit@debbugs.gnu.org id=B59188.167292425325139 (code B ref 59188); Thu, 05 Jan 2023 13:11:01 +0000 Received: (at 59188) by debbugs.gnu.org; 5 Jan 2023 13:10:53 +0000 Received: from localhost ([127.0.0.1]:50503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDQ1E-0006XP-9b for submit@debbugs.gnu.org; Thu, 05 Jan 2023 08:10:52 -0500 Received: from mail1.fsfe.org ([217.69.89.151]:47682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pDQ1C-0006XG-8V for 59188@debbugs.gnu.org; Thu, 05 Jan 2023 08:10:51 -0500 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1672924247; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JSYLIOUYlE7DgOdakw/WAQdsNreGXI5jyTizBpbe1iY=; b=YgKvuuX3QR/d2EaTew0A8JOSEF5Wahze69tK7qRzslRv6NSNkzSQmyi8lpNGIgGAuhLDAq DnE/RP07N6wpUOzZN8Sg6HlKHRvc5Kkm9S11/N31E2DL7CdccrUKdaoa/hgxjMq7r/LEVt hIZKarmH/5AIA+W8vDowqV0Og/xW5bM= References: <87zgcq79ml.fsf@posteo.de> <87bkp4bbd1.fsf_-_@gnu.org> Date: Thu, 05 Jan 2023 14:10:45 +0100 In-Reply-To: (Hilton Chain's message of "Sat, 19 Nov 2022 13:17:51 +0800") Message-ID: <87bknd2kkq.fsf_-_@fsfe.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672924321; a=rsa-sha256; cv=none; b=ul1uUTFljzyiK2SbuEHOV3Frc1Xou5+w7pPAZZk7A4MRhLruXTqNmYa7GVzzD1xnQ6K1Zj ldUnQXnJp0YW5TGQDX4op2C3WYj/Ia8rILxp1bicpESJSWGAfkQXIB6qH+daiy+1sdElrK kT+q8T29MxXbR7tog1R6X/ySqqjs3VF6cAQx1hS6fYuFZZrmn5qWDl2YsS1ab0ysCXnh16 27s2s6Oh+T1uOG5ZJLTkGrtXiCL1GhElA3VET5t5KLbcfVQsO3Y7aq0YBlFyPSP2tWiuck +H/x8BnWouH2tF9XfbKg2qpyZPkTZ0IBalciZs8BXKJuMabrFxMtUTn4WWbNYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=YgKvuuX3; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672924321; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=JSYLIOUYlE7DgOdakw/WAQdsNreGXI5jyTizBpbe1iY=; b=dCHixq5digNZCydrlqDJkBU79H6B4lPKUu5dht1RRFG+UNWrwfC0H9AXHydaeJ8psoNODL Wl8s4SzmDbgt/xF1yLiwYxoByt/QEBg972am2I2qDH8o2XYqVWaAfDXTA1BMTzRgispPRE Kt0BgxQlanSdDSFUnqnhtzq69DxT+zcY9xpP114FSqOvoIAKVQLEyo6FKblqPo4NW0EoS6 cM3PVOD2mp5ujy64APt69ZbOgQL4oTZoj12o/ZzryEEn81QeOFqwWLZoQ8X+XGbBXnRlMT JNBvrHv2o8C+oK4dRfmp0zKwUBYC4iM0VrPbgGQcIatjGNiZRXZ+6VGjJZL3VA== X-Spam-Score: -0.76 X-Migadu-Queue-Id: 5ED17173C9 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=fsfe.org header.s=2021100501 header.b=YgKvuuX3; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fsfe.org (policy=none) X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -0.76 X-TUID: FQUNwj5LadbW Hello Hilton, other folks, Hilton Chain writes: > node-acorn fails in check phase. > #+RESULTS: > : starting phase `check' > : npm ERR! Missing script: "test" > : npm ERR! > : npm ERR! To see a list of scripts, run: > : npm ERR! npm run > This is due to a change in how npm treats the 'test' command; before, having no "scripts.test" entry in package.json lead to a placeholder of "echo 'Error: no test specified'" (with a status code of 0). More recently, npm was changed to make `npm test' like any other `npm run XYZ' command. This means that all of the packages that fail like this due to upgrading node/npm should be get a `#:tests? #f'. > Then node-uglify-js > #+RESULTS: > : starting phase `configure' > : npm ERR! code 254 > : npm ERR! path /gnu/store/969597ncg311d3kd8vbhdlniwqg4mr2k-node-acorn-8.4.1/lib/node_modules/acorn > : npm ERR! command failed > : npm ERR! command sh -c -- cd ..; npm run build:main && npm run build:bin > This is due to the fact that the `prepare' scripts is being run for our installed node-acorn. Apparently, the fact that it previously did not happen was a bug that was fixed somewhere between node 14 and 18 [1][2]. I do not know what the best approach is here. Consider patching the "scripts.prepare" entry in node-acorn, and if we find we need to do this often, we can introduce a convenience function similar to `delete-dependencies' to streamline this. > One test failed after deleting node-uglify-js's configure phase. > #+RESULTS: > : 1 test(s) failed! > : > : test/reduce.js > : 1) Should reduce test case which differs only in Error.message > : AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: > : + actual - expected > : > : + `try{null[function(){}]}catch(e){console.log(e)}\n// output: TypeError: Cannot read properties of null (reading 'function(){}')\n// \n// minify: TypeError: Cannot read properties of null (reading 'function() {}')\n// \n// options: {\n// "compress": false,\n// "mangle": false,\n// "output": {\n// "beautify": true\n// }\n// }` > : - `try{null[function(){}]}catch(e){console.log(e)}\n// output: TypeError: Cannot read property 'function(){}' of null\n// \n// minify: TypeError: Cannot read property 'function() {}' of null\n// \n// options: {\n// "compress": false,\n// "mangle": false,\n// "output": {\n// "beautify": true\n// }\n// }` > : at Function. (/tmp/guix-build-node-uglify-js-3.13.9.drv-0/source/test/mocha/reduce.js:285:16) > : at run (/tmp/guix-build-node-uglify-js-3.13.9.drv-0/source/test/mocha.js:79:18) > : at process.processTicksAndRejections (node:internal/process/task_queues:77:11) > : error: in phase 'check': uncaught exception: > : %exception #<&invoke-error program: "/gnu/store/l32l0i53ik9ja3fircdd89bgq6b1v6y5-node-18.12.1/bin/npm" arguments: ("test") exit-status: 1 term-signal: #f stop-signal: #f> > : phase `check' failed after 264.2 seconds > : command "/gnu/store/l32l0i53ik9ja3fircdd89bgq6b1v6y5-node-18.12.1/bin/npm" "test" failed with status 1 > > Then node-string-decoder fails to install, I have no idea how to continue... > #+RESULTS: > : starting phase `install' > : npm info using npm@8.19.2 > : npm info using node@v18.12.1 > : npm timing npm:load:whichnode Completed in 0ms > : npm timing config:load:defaults Completed in 1ms > : npm timing config:load:file:/gnu/store/l32l0i53ik9ja3fircdd89bgq6b1v6y5-node-18.12.1/lib/node_modules/npm/npmrc Completed in 2ms > : npm timing config:load:builtin Completed in 3ms > : npm WARN config production Use `--omit=dev` instead. > : npm timing config:load:cli Completed in 1ms > : npm timing config:load:env Completed in 1ms > : npm timing config:load:project Completed in 0ms > : npm timing config:load:file:/tmp/guix-build-node-string-decoder-1.3.0.drv-0/npm-home-0/.npmrc Completed in 0ms > : npm timing config:load:user Completed in 0ms > : npm timing config:load:file:/gnu/store/ansccgk9y8vzd5rwsx4iz7j2n0gp8ig8-node-string-decoder-1.3.0/etc/npmrc Completed in 2ms > : npm timing config:load:global Completed in 2ms > : npm timing config:load:validate Completed in 0ms > : npm timing config:load:credentials Completed in 1ms > : npm timing config:load:setEnvs Completed in 0ms > : npm timing config:load Completed in 9ms > : npm timing npm:load:configload Completed in 9ms > : npm timing npm:load:mkdirpcache Completed in 1ms > : npm timing npm:load:mkdirplogs Completed in 1ms > : npm timing npm:load:setTitle Completed in 0ms > : npm timing config:load:flatten Completed in 1ms > : npm timing npm:load:display Completed in 4ms > : npm timing npm:load:logFile Completed in 3ms > : npm timing npm:load:timers Completed in 0ms > : npm timing npm:load:configScope Completed in 0ms > : npm timing npm:load Completed in 19ms > : npm timing arborist:ctor Completed in 0ms > : npm timing idealTree:init Completed in 4ms > : npm timing idealTree:userRequests Completed in 30ms > : npm timing idealTree:#root Completed in 16ms > : npm timing idealTree:node_modules/string_decoder Completed in 3ms > : npm timing idealTree:node_modules/string_decoder/node_modules/safe-buffer Completed in 0ms > : npm timing idealTree:buildDeps Completed in 20ms > : npm timing idealTree:fixDepFlags Completed in 0ms > : npm timing idealTree Completed in 56ms > : npm timing reify:loadTrees Completed in 57ms > : npm timing reify:diffTrees Completed in 1ms > : npm timing reify:retireShallow Completed in 1ms > : npm timing reify:createSparse Completed in 0ms > : npm timing reify:trashOmits Completed in 0ms > : npm timing reify:loadBundles Completed in 0ms > : npm timing reify:audit Completed in 0ms > : npm timing reifyNode:node_modules/string_decoder/node_modules/safe-buffer Completed in 5ms > : npm timing reifyNode:node_modules/string_decoder Completed in 12ms > : npm timing reify:unpack Completed in 13ms > : npm timing reify:unretire Completed in 0ms > : npm timing build:queue Completed in 1ms > : npm timing build:deps Completed in 1ms > : npm timing build:queue Completed in 1ms > : npm timing build:links Completed in 1ms > : npm timing build Completed in 2ms > : npm timing reify:build Completed in 2ms > : npm timing reify:trash Completed in 0ms > : npm timing command:install Completed in 83ms > : npm ERR! Cannot set properties of null (setting 'dev') This is due to either a newly introducded bug, or perhaps more likely, an unfortunate sequence of interactions in arborist. I've done some bisecting, and got things to work with a hack. Relevants parts of arborist were rewritten in version 6, whereas we are stuck with 5.4.XYZ, making a proper backport highly unlikely. --8<---------------cut here---------------start------------->8--- + ;; TODO: Work around issue in that is fixed in arborist@6.0.0/npm@9.0.0/node@19+ + (add-after 'patch-hardcoded-program-references + 'patch-broken-arborist + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "deps/npm/node_modules/@npmcli/arborist/lib/calc-dep-flags.js" + (("if \\(node\\.isLink\\)") + "if (node.isLink && node.target)")))) --8<---------------cut here---------------end--------------->8--- In addition it some of the packages in node-xyz.scm that involve replacing the 'configure phase are also failing. For some reason, this updated version of npm seems to want to have access to either some cached metadata or the actual npm packages for each of the specified devDependencies[3]. This can be worked around by introducing a 'patch-dependencies phase for impacted packages, and patching out all devDependencies. AFAICS this applies for (at least) these packages: - node-buffer-crc32 - node-crx3 - node-minimist - node-pbf - node-protocol-buffers-schema - node-protobuf-schema - node-ieee754 - node-yazl HTH You have my gratitude for working on this Hilton! - Jelle [1]: https://github.com/npm/cli/issues/459 [2]: https://docs.npmjs.com/cli/v9/commands/npm-install [3]: My guess: npm wants to be able to construct a 'proper' package-lock.json, for which it needs some metadata from the npm registry. I've already checked if adding '--no-package-lock' fixes the issue, but while it indeed ensures no package-lock.json is generated, it sadly doesn't address the issue. IWBN if there were some magical invocation(s) for npm that allow these packages to actually be packaged by distributions...