From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kDyRJKhZmWEpTgEAgWs5BA (envelope-from ) for ; Sat, 20 Nov 2021 21:25:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oMxZIKhZmWEDLQAA1q6Kng (envelope-from ) for ; Sat, 20 Nov 2021 20:25:12 +0000 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 1532349A4 for ; Sat, 20 Nov 2021 21:25:12 +0100 (CET) Received: from localhost ([::1]:56238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1moWv8-0001Om-RR for larch@yhetil.org; Sat, 20 Nov 2021 15:25:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moWv0-0001OY-SJ for guix-patches@gnu.org; Sat, 20 Nov 2021 15:25:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:60422) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1moWv0-0006ds-Jf for guix-patches@gnu.org; Sat, 20 Nov 2021 15:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1moWv0-0005z8-Bx for guix-patches@gnu.org; Sat, 20 Nov 2021 15:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51838] [PATCH v2 05/26] guix: node-build-system: Add #:absent-dependencies argument. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Nov 2021 20:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51838 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Philip McGrath , 51838@debbugs.gnu.org Received: via spool by 51838-submit@debbugs.gnu.org id=B51838.163743989522988 (code B ref 51838); Sat, 20 Nov 2021 20:25:02 +0000 Received: (at 51838) by debbugs.gnu.org; 20 Nov 2021 20:24:55 +0000 Received: from localhost ([127.0.0.1]:43735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moWut-0005yi-EF for submit@debbugs.gnu.org; Sat, 20 Nov 2021 15:24:55 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40523) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moWuq-0005yT-Pa for 51838@debbugs.gnu.org; Sat, 20 Nov 2021 15:24:53 -0500 Received: by mail-wr1-f65.google.com with SMTP id r8so24526021wra.7 for <51838@debbugs.gnu.org>; Sat, 20 Nov 2021 12:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=LMCl0VbOSdMz37jfugUvbbfC6nb8ZgdE89pH2x9C/BA=; b=Tk06Y9gKxBP3Me5tmKGPhmqI6/4V5EGbCQZNNfrd7TGRdlbWuS4tbRocrfECkszsC7 Ihl7DNyRcA9qkM5r6inbHebMTToUfir4PeKYIbHokmBNUGId8ngVV8aSYbUHkK88cEUd /GZArcUYTc1//EwR7OHqsotyN+xusXPLyNJNMDzCAQnCw+UmCzAZAY1MPtAmMEt4lxUd F73XuUanLSekuHc0Y1CB9NvIuVB5ORQ+zjoo2yR3OwBWP0wdFRKy4N5gDsJbpiShOQsZ UWl4LoYIp+Mi6D+A1kDYgp2gYfWMYcEXdwlu/pH1Drr34E1Ny0Hc+RB6GhmA1lzohp+g U6gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=LMCl0VbOSdMz37jfugUvbbfC6nb8ZgdE89pH2x9C/BA=; b=gxEXCwWGr70pSs/AWT5RHjplRuoxKm+0l+VUCxXdjw5HGXQ1q/0ihP5WQ8fREO7AOy Pb5UK4rezcSqOCtPKu8P3PIFSiedPZORqONil9AJDrmsSy+lwD3u3rlrHdYBDzv8pcb1 1NJVWRR3iBD4wqdK3BdStjfZWzqANAfdDZl2kZwEepxmQQJV1RqwxM1XJtgrqbYKGxGr GEdpI+xFPOfiVTq33FeNbSozFtqBiqJ3SsZrVUYKteYrwXwpYxDXigu56yeyBiGKrYfO 3CbTcip+gQ90mzi3nUyUkM/3gtYRCPtM+HQrJOmZ27KpC1pPDNusVkxl05uFzsxWsyog fQbQ== X-Gm-Message-State: AOAM531t1A0JFCAN1xyoT2PYgtaPvwggNfEr/gWM1qkrZwpP2P9zU/bL CLKPYvFU53Dcai/ZFt2yma4= X-Google-Smtp-Source: ABdhPJz3A+3n4RrV2iQZLuqtmeTAtVPR2iBoiabz2YxgEKDsLk68RYTIXgh6nXxKDzIo51daHkIVdg== X-Received: by 2002:adf:efc6:: with SMTP id i6mr21655526wrp.428.1637439886793; Sat, 20 Nov 2021 12:24:46 -0800 (PST) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id d7sm3566513wrw.87.2021.11.20.12.24.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Nov 2021 12:24:46 -0800 (PST) Message-ID: <62e2afb290ae88cc8bb42ccc26683f9d9435bbf5.camel@gmail.com> From: Liliana Marie Prikler Date: Sat, 20 Nov 2021 21:24:44 +0100 In-Reply-To: <37768a63-5a4a-b604-2542-e8890fd68a16@philipmcgrath.com> References: <5a04aa92-e80d-e11b-235c-b7f5e3a92d00@philipmcgrath.com> <20211120043406.952350-1-philip@philipmcgrath.com> <20211120043406.952350-5-philip@philipmcgrath.com> <8c07272b588fc059f3c445fe1f33c63cce8f31f1.camel@gmail.com> <37768a63-5a4a-b604-2542-e8890fd68a16@philipmcgrath.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637439912; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=LMCl0VbOSdMz37jfugUvbbfC6nb8ZgdE89pH2x9C/BA=; b=hgBBsp0so81pxVyV2+AqBc+whq+BLKsFFByj/zB9qqAF57iq2KN/AenQRmB78jZnZ4PA8R v5ROZRpPnWa59j7lls+9wfQ//L3xSSlyzn1RQwaJs/nxUeIFIZDwJ0V0OO/HQ/TqcCMjcq LoHwhrr/yL8fh/xa1251anFb7HnOF9NVbmD4n8QhcZS0aYWc1+49qkcEPzuciitMp8R1B/ Cids+WXNnbxKNt+2g1THWT1XnmDIJBUiM4KS6V8otEvLcawOdvdllGCEYyfxc1P+GJ1y70 C/txwvZ9GFt9IqP271ngkeheVAwV3TqiAvuaP2dkiKPEYoejvepW9Mo4wpfjvw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637439912; a=rsa-sha256; cv=none; b=QwCZ1UqS+MHXQtR4W2be39IBWeVxjsnM2qElf3CdDH0tiCeKUXS1N1AWGZfpQpkC92mkY+ UYj7Jb0zPEyGAS3mSiewTOdmYC2YVYMlkKau/b4kx3wzgKkJU3JviAFUeuieB+aEETX5N6 KvxvE/mqCb8w859vzuNOyjA2ihbLQf96h3D91hn7COho6cqfkr2FdUfxxdx+j4oRvctDzc IAWYIZ6pYUXOt/rOY0seMlhj+BOZUf4qlaYVuMy9qHxNUsj4zY4Jvo/JSt3BHwXtuKkrK3 OF3Xm7W0omYRcZABC52rCPTYmCKrcZFNXOfP8Z2BcrU+HTdG0Q6nlc1Mxmc/yQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Tk06Y9gK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: -1.77 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Tk06Y9gK; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Queue-Id: 1532349A4 X-Spam-Score: -1.77 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5GkXU5CtsEqd Hi, Am Samstag, den 20.11.2021, 12:04 -0500 schrieb Philip McGrath: > To the best of my understanding, npm doesn't inspect the js files at > all by default, so no. (A package.json file might define a build > script that does more checks.) I think a missing and undeclared > dependency manifests itself as a runtime error when the require() > function is evaluated. Sheesh. > > In the resolve-dependencies subprocedure, we could check whether we > > have a matching input somewhere and only include the dependency if > > we do. WDYT? > > I thought about this, but it seems to me there are two problems. > First, I'm very unsure about this, but, in the last few days, I've > gotten the impression there may be some "package.json" packages that > don't correspond directly to Guix packages. I don't really understand > how that works, but I think it may have something to do with npm > packages that can run either on Node.js or on the web and need to use > some functionality that's part of the Node.js core but not the web > platform (or vice versa?). I could be wrong about that, but I've > tried, especially in v2, to only have the build-side code do things > I'm confident are correct in all cases. What does "not directly correspond to Guix packages" mean here? At the very least Node must have a way of finding them, probably somewhere in lib/, no? While I did say we may want to rewrite these dependencies in ‘configure’, perhaps we can find a middle ground in which we only do so when a given argument is there. ant-build-system does that for instance, so as to cope with packages that actually have no ant build spec. WDYT? > The other issue is that deleting packages with no matching input by > default would replicate some of the drawbacks of the current > `(delete 'configure)` approach. I think it's better to have an > explicit list of dependencies that Guix is deleting. If eventually we > package all of the missing dependencies for Guix, it would be much > easier to find the packages that ought to use it. And, in the highly > dynamic JavaScript world, I'm reluctant to give up one of the few > static checks we have. If a missing package that really was required > were automatically deleted from "package.json", it seems the failure > mode would by a mysterious runtime error, potentially many steps down > a dependency chain. I get where you're coming from, but OTOH if you were to change parts of the package to suit your own needs – like adding or omitting some inputs, you now have two places to change, and they're in a tricky relationship with another. I think this is setting up some very error- prone boilerplate. I hope that in most cases the test suite will cover the important use cases, but that's not always possible (e.g. with flaky tests, networking, missing test inputs...) Furthermore, for better or for worse, stack traces did become the gold standard of debugging long ago, so even packages missing "deep down" would probably soon be dug out if they lead to hard errors. Soft errors in Javascript though...