From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id OKV8D3FiC2Q/5AAASxT56A (envelope-from ) for ; Fri, 10 Mar 2023 18:01:37 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id wO5zD3FiC2SwGQEA9RJhRA (envelope-from ) for ; Fri, 10 Mar 2023 18:01:37 +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 DB9D62C363 for ; Fri, 10 Mar 2023 18:01:36 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=a8WJwUNI; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678467697; 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: 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=kh6oOur036BbVM/4BN2ldIH/yNRDFvK/9MUNZDOG09k=; b=aIMWAGrNGjPKDFeylZDfV+85vn01gemUgJXeZk/xDXutEkUY1awYRQ5VWPxQ8Hdq9pZ7s9 BQwf9NkWRckuCQSRmEvLQ2FyhixEStQTYiSR76lhyeOf+ytzlpaBbJTMDrAn+VoTRRNXAh xeKiUAfmQmc+Lknod974PCZE17+s9WdySzNbG7fqe5gXbCEJc1TcdSudNCc5u2BipOqFwU B53K8tMXgF4Ms9OMYIXPXDNiBpd0bGVfdcyW327zKsRC1AOjUbLbiFvje6Q0tx9xXWRim7 Jv4T/Dzy71binZoNG1/VH5bTXjSHa/tl46j2evytOU2BlsHESY3ze72OUmwuaQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=a8WJwUNI; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678467697; a=rsa-sha256; cv=none; b=sLmklhitlqtfg0bEgRKptFZenf7MqeVaZizgDyXmTyyjT+ltdVLmQR4NLnvpli8IFyDBAi zYu6SupJJihPos5w2VnOsQmknQYocIVkUb5B6SID/O7JpClgWZCp0cAuZLEQC7ldehksO7 reAMJQ7pyraay9Ij9z65KKM94qYj4ve3B/8VwRSA+tM/CqdAw/DsGeAtePJz6b4cAxYTrW Bj4FqXNg+NoZfxHwK9F10GSsTBL/8hfzpHP0FcCBTJCWQVtBmooUyx1b5zXO6bASMA/Ap6 RbVYg9yqcC5cXIS2iylvl3sz5XtnFqzjNDOoye3IRsJ8z0TD4Mykmk5V1RaCDw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pag76-0000X1-8U; Fri, 10 Mar 2023 12:01: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 1pag74-0000Vz-Qg for guix-patches@gnu.org; Fri, 10 Mar 2023 12:01:03 -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 1pag74-000640-BV for guix-patches@gnu.org; Fri, 10 Mar 2023 12:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pag74-0002S9-6M for guix-patches@gnu.org; Fri, 10 Mar 2023 12:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60847] [PATCH] Enable cross-compilation for the pyproject-build-system. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 10 Mar 2023 17:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60847 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Josselin Poiret , Christopher Baines , Simon Tournier , Mathieu Othacehe , 60847@debbugs.gnu.org, Tobias Geerinckx-Rice , Lars-Dominik Braun , Ricardo Wurmus , jgart Received: via spool by 60847-submit@debbugs.gnu.org id=B60847.16784676499394 (code B ref 60847); Fri, 10 Mar 2023 17:01:02 +0000 Received: (at 60847) by debbugs.gnu.org; 10 Mar 2023 17:00:49 +0000 Received: from localhost ([127.0.0.1]:55687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pag6q-0002RP-Jp for submit@debbugs.gnu.org; Fri, 10 Mar 2023 12:00:49 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pag6o-0002R6-61 for 60847@debbugs.gnu.org; Fri, 10 Mar 2023 12:00:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pag6g-0005zi-FI; Fri, 10 Mar 2023 12:00:38 -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=kh6oOur036BbVM/4BN2ldIH/yNRDFvK/9MUNZDOG09k=; b=a8WJwUNIzprnti/lhiUr Hwj6fK6QWhaC0M7wqWFjW0gX3nnbuMK0zG7Vla3Jum4C+jz/On9s4F9yI6VKVw4f7JCtOojBxlY9J 7v0mOFthMTl+Ca6vanUFN4AmA5+bllMELylrvQ5TM9rmk7cm/BdVoVrIsajlkMyUaWtWLEanpKh+C +LAp01Zs8puuSOqOpPUeoDub8mSJAvpK5OIT3QcZP0bo1SSHebc6fgJ+1aR+Z7FweyFY6ZuHeoSl+ M694Xslduhh5hgzznoDW5iE2s3HVwbVWO+cX2YWLln3WLIkeT+C8+BwGnICZdSjzL1TpGdleLYDng nhTWRvnkJII+vg==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pag6f-0000pl-CB; Fri, 10 Mar 2023 12:00:37 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230123133217.318-1-maxim.cournoyer@gmail.com> <20230123133217.318-2-maxim.cournoyer@gmail.com> <87zg8p7qvw.fsf_-_@gnu.org> <87jzzsy7qt.fsf@gmail.com> <87o7p19e6w.fsf@gnu.org> <87v8j8r8jt.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?UTF-8?Q?D=C3=A9cadi?= 20 =?UTF-8?Q?Vent=C3=B4se?= an 231 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Cordeau X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 10 Mar 2023 18:00:33 +0100 In-Reply-To: <87v8j8r8jt.fsf@gmail.com> (Maxim Cournoyer's message of "Fri, 10 Mar 2023 09:21:42 -0500") Message-ID: <87a60kh77y.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: X-Migadu-Queue-Id: DB9D62C363 X-Spam-Score: -3.69 X-Migadu-Spam-Score: -3.69 X-Migadu-Scanner: scn0.migadu.com 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 X-TUID: nN9z8SxidLlS Hi Maxim, Maxim Cournoyer skribis: [...] >>>>> + (let ((builder-name (procedure-name (bag-build bag)))) >>>>> + (if (or (bag-target bag) >>>>> + (eq? 'pyproject-build builder-name)) >>>>> + (bag->cross-derivation bag) >>>> >>>> This one part is a showstopper to me, for two reasons: >>>> >>>> 1. We cannot rely on =E2=80=98procedure-name=E2=80=99 (it=E2=80=99s = a debugging aid and it=E2=80=99s >>>> not guaranteed to return something useful). >>>> >>>> 2. Special-casing build systems here is not okay: the bag and build >>>> system abstractions exist to maintain separation of concerns. >>>> >>>> I understand there=E2=80=99s an actual bug to fix and the desire to fi= x a more >>>> common issue, but I think this one approach is not the way forward. >>>> >>>> I hope that makes sense! >>> >>> I agree this is not "pretty", but it would be a "temporary" kludge until >> >> To make sure there=E2=80=99s no misunderstanding, I think that=E2=80=99s= not okay even >> as a =E2=80=9Ctemporary kludge=E2=80=9D (I=E2=80=99m not against tempora= ry kludges in general, >> I=E2=80=99ve done my share of that ;-), but this would be way too brittl= e.) > > "way too brittle" is a strong warning :-). It is; I=E2=80=99m objecting to this change. > I don't understand what is > so brittle about it? It's not like we change the build system names > often. I have little to add to what I wrote above: procedure names don=E2=80=99t m= ean anything, especially with higher-order functions, and separation of concerns is an important design principle. I=E2=80=99m speaking with 15+ years of experience with Guile; I don=E2=80= =99t mind being challenged, it=E2=80=99s healthy, but I think we also need to recognize the expertise of each other and encounter each other halfway. [...] >> Perhaps one suggestion would be: start the native-inputs/inputs change >> on a new branch, for all the build systems (or at least the main >> ones), and then try to build the =E2=80=98core=E2=80=99 subset (which in= cludes >> cross-compilation) to get an idea of the kind of code simplification >> opportunities as well as issues that arise. I feel like it=E2=80=99s ha= rd to >> anticipate the impact of such a change without actually trying. > > I can do this; the exercise would be similar to what I've done for > pyproject-build-system, where I was able to build complex packages (both > natively and cross-compiled) with the new same-bag representation > change, but to a larger scale. It's more work, which is why I would > have preferred to contain its scope to get started, but the changes were > easy, IIRC. Yes, I agree it=E2=80=99s more work, but it=E2=80=99s dissimilar in that yo= u=E2=80=99ll be confronted with tons of weird cases, some of which we can already anticipate, but probably others we=E2=80=99ll probably be surprised to disc= over. > Basically, it forces us to review all the (assoc-ref inputs > "package-name") or (search-input-file inputs "file") procedure calls and > remove the assumption that native-inputs are also inputs for native > builds (that'll fix multiple cross-compilation bugs at the same time, so > it's a good thing to do anyway). I do hope it=E2=80=99ll be this simple, but I just can=E2=80=99t tell. Thank you, Ludo=E2=80=99.