From unknown Tue Jun 17 22:30:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52588: A linter & styler for %outputs -> #$output:...? Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Dec 2021 21:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 52588 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 52588@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16397779116554 (code B ref -1); Fri, 17 Dec 2021 21:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2021 21:51:51 +0000 Received: from localhost ([127.0.0.1]:40768 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myL8p-0001hd-1j for submit@debbugs.gnu.org; Fri, 17 Dec 2021 16:51:51 -0500 Received: from lists.gnu.org ([209.51.188.17]:52392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myL8n-0001hU-1V for submit@debbugs.gnu.org; Fri, 17 Dec 2021 16:51:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32862) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myL8m-0001rP-Gc for bug-guix@gnu.org; Fri, 17 Dec 2021 16:51:48 -0500 Received: from [2a02:1800:110:4::f00:d] (port=47860 helo=leibniz.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myL8k-0005hv-CZ for bug-guix@gnu.org; Fri, 17 Dec 2021 16:51:48 -0500 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4JG2kS3bQSzMqdcQ for ; Fri, 17 Dec 2021 22:51:44 +0100 (CET) Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id XZrc2600a4UW6Th01ZrdGo; Fri, 17 Dec 2021 22:51:37 +0100 Message-ID: <8cabcf6564d54ba2925663222a932aa8b6bdabe4.camel@telenet.be> From: Maxime Devos Date: Fri, 17 Dec 2021 21:51:36 +0000 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1639777897; bh=hzM3X8ohiMe6Gyk27pu4CM+OcpQMjewIzGheJZTmz04=; h=Subject:From:To:Date; b=krY3Thc6SJPfUJ49MWSj4YJMV+4nYF90xDnE62jv3XH0lT5r04K+CHA+Ui/LFnrND y4h2k0G2KS80P199JtVViIcKO26Qz1zidgG99fh4k4z9vGVW/i2aLHsuOUDurrR6LY 3iktEIQIBmH1hN8hIWIc66QQ5w8kZ5ESxnpY6xJYaJF0Uk+9J2OAfUZkgYWM2xIBI4 2jACvsqyIKgkldAu/7+Sb59mQcDoFn5uxCzFOM/0j1FeZVzwz2geeh9uFGqDTbl7n8 SruFlXbmtkHm8l1e//VgaXOWakl7JAqBhV3xF0Xr3RLu5NIpdgpRMTYDqqKvr+7Y5B P7fCkFybqfWag== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:110:4::f00:d (failed) Received-SPF: pass client-ip=2a02:1800:110:4::f00:d; envelope-from=maximedevos@telenet.be; helo=leibniz.telenet-ops.be X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi guix, With the core-updates-frozen merge, some (i.e., so far one) bug reports about cross-compilation failing due to %outputs not being defined have been appearing: https://issues.guix.gnu.org/52574. (That particular bug was actually introduced in core-updates-frozen!) To find out how prevalent these issues are, and to prevent them from being introduced, a linter detecting (assoc-ref %outputs ...) in sexps and gexps and suggesting to use #$output:... could be useful. This should be doable with 'gexp->approximate-sexp'. Also, maybe "guix style" could even be teached to G-expify most S-exps. Long term, we might want to eliminate %outputs entirely, to make the wrong thing impossible to do instead of making it easy to break cross- compilation. Alternatively, %outputs (& friends?) could be re-introduced, albeit with #$output and #$(this-package-input ...) being strongly preferred above %outputs & %build-inputs & friends. Reintroducing %build-inputs/%build-target-inputs/... could help with the ‘how do I refer to implicit build inputs from #:configure-flags’ issues that have been cropping up. Greetings, Maxime. From unknown Tue Jun 17 22:30:30 2025 X-Loop: help-debbugs@gnu.org Subject: bug#52588: A linter & styler for %outputs -> #$output:...? Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 19 Dec 2021 22:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52588 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Cc: 52588@debbugs.gnu.org Received: via spool by 52588-submit@debbugs.gnu.org id=B52588.1639952190813 (code B ref 52588); Sun, 19 Dec 2021 22:17:02 +0000 Received: (at 52588) by debbugs.gnu.org; 19 Dec 2021 22:16:30 +0000 Received: from localhost ([127.0.0.1]:48415 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mz4Tm-0000D3-HT for submit@debbugs.gnu.org; Sun, 19 Dec 2021 17:16:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mz4Tl-0000Cq-Bp for 52588@debbugs.gnu.org; Sun, 19 Dec 2021 17:16:29 -0500 Received: from [2001:470:142:3::e] (port=47334 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mz4Tg-0006u8-6H; Sun, 19 Dec 2021 17:16:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=p0pbcgQmGRKeDqDUsWu7Bm96dKgtgO+e2HqJO/Phu0M=; b=SjKAoiHWeg8Mhircj94U dLF3La7ZZAbLPHYRloMV5gx6NVYWJ3xt44lJvSymQ4YwFMaxha+k+3bzwmZZr4kyKmqbRZhpFbTeQ iJ8jKNvR/hd3hUWAyrbF7NTXHjLb/CL/jH9dDDfg0YYdycXFE/0msl5Gnh0u2vms5cz6ZxkXDbPOO C4Uvz4oB5WUuBPTFWxeuiqB/YRnF0s0Y3V/HSL3C6ATTSmclzWQiUeOAoRIJYXKoRVEDLrjvUcjz5 CK6hgZQG9RyFa9TvVYhymHGXb8QTdEZQJOP12dN6BVgOr8LRScF7kHQvVaOjamHOIWhlpFf0Pcbsz mIVcBTJWHvq2Dw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:52723 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mz4Tg-00020f-6b; Sun, 19 Dec 2021 17:16:24 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8cabcf6564d54ba2925663222a932aa8b6bdabe4.camel@telenet.be> Date: Sun, 19 Dec 2021 23:16:21 +0100 In-Reply-To: <8cabcf6564d54ba2925663222a932aa8b6bdabe4.camel@telenet.be> (Maxime Devos's message of "Fri, 17 Dec 2021 21:51:36 +0000") Message-ID: <87o85cmea2.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Maxime Devos skribis: > Alternatively, %outputs (& friends?) could be re-introduced, > albeit with #$output and #$(this-package-input ...) being strongly > preferred above %outputs & %build-inputs & friends. > > Reintroducing %build-inputs/%build-target-inputs/... could help with > the =E2=80=98how do I refer to implicit build inputs from #:configure-fla= gs=E2=80=99 > issues that have been cropping up. Yes, the intent was to still provide =E2=80=98%build-inputs=E2=80=99 & co. = for backward compatibility. There are a few build systems where these variables seemed to be mostly unused already, so I didn=E2=80=99t bother reintroducing them; that=E2=80= =99s the case of =E2=80=98qt-build-system=E2=80=99 and =E2=80=98julia-build-system=E2=80= =99, for instance. But these are the exception. In the case of meson cross-compilation, it was an oversight. Ludo=E2=80=99.