From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mLk1BchPDWRHWwEASxT56A (envelope-from ) for ; Sun, 12 Mar 2023 05:06:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id aG1DBchPDWQfZAAAauVa8A (envelope-from ) for ; Sun, 12 Mar 2023 05:06:32 +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 CBF7A22D41 for ; Sun, 12 Mar 2023 05:06:31 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbCyL-0007AO-Bv; Sat, 11 Mar 2023 23:06:13 -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 1pbCyA-00075q-Mj for guix-patches@gnu.org; Sat, 11 Mar 2023 23:06: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 1pbCyA-0001g8-E5 for guix-patches@gnu.org; Sat, 11 Mar 2023 23:06:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pbCyA-0001yS-9h for guix-patches@gnu.org; Sat, 11 Mar 2023 23:06:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60847] [PATCH] Enable cross-compilation for the pyproject-build-system. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Mar 2023 04:06: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= 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.16785939407553 (code B ref 60847); Sun, 12 Mar 2023 04:06:02 +0000 Received: (at 60847) by debbugs.gnu.org; 12 Mar 2023 04:05:40 +0000 Received: from localhost ([127.0.0.1]:58902 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbCxn-0001xk-Rd for submit@debbugs.gnu.org; Sat, 11 Mar 2023 23:05:40 -0500 Received: from mail-qt1-f181.google.com ([209.85.160.181]:39587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbCxl-0001xX-FA for 60847@debbugs.gnu.org; Sat, 11 Mar 2023 23:05:38 -0500 Received: by mail-qt1-f181.google.com with SMTP id w23so10083618qtn.6 for <60847@debbugs.gnu.org>; Sat, 11 Mar 2023 20:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678593932; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wapCJ+4WPMr3+oPYy9bGOlrHJkyHEl2M5LQvhGbBI5o=; b=LAfLjLO2Utr4NfGOGQOic6i0cUhVW8ZhJk9IGUznCVMBlYGAT6X0qPdJ7jm4yYad1R 96lwS8aJoxU7RbWm4LWTg6UiZipSMh5iNra1Hmh7+xh3CCwpFDvGg4fq0IGfVUSqHdGn ku8O8X8j7dwCrgkA8G5OtBu3I9qXTeX8CbAA88yPOY6zz9zbGgQxu5dSG+QcfOJOSoyW rAuDw++D5PYYMuumjMOLtvwAZj2vzd3VKFxhM9ysPdN4vBCqc/qOIWC8GuOZ/mMwXXwp apwqOsVpjqSAEjugp7nBpS4/6ekj6Iv/eFQUaS8ycQbKvVqxCKawalA/lt/qGRsy6ErH 7HIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678593932; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wapCJ+4WPMr3+oPYy9bGOlrHJkyHEl2M5LQvhGbBI5o=; b=bEFpMw1/kGlLCR8uBq8BeTZPMQDSghS7EeSSO8nyZjJWrCwA6szy7Bvg+g40DsJHji JdN71NFq5OYeekg7Uc4CNLXpN4RWE65g4O+aKeQC548LPTZSdgPXqIJ40UK5WiDRoe6v 06g1AFHLuV6Aw1EKygXk7I93tOKZWuNn706QoUduSuxPnFWtEnXkFh/vDA18PKxCSLXp IFr4QjVfSPSD5qodK8i3RIJjuNw/cWTfaQC2CcAvHDZsRnzEkMLXgFAHFRaYSxL4bzP2 FO0o/azi6eXKGsuHn5d2/F4C7sjLrcS3yz8fw7o8FTJbcWgiYOHw5SH2UWv6hhKadJgt MCiA== X-Gm-Message-State: AO0yUKW96ISdaBh0o1eOefK2w3gXGHJs+dH04RpHK+kDkppXVjEMmcpl 6y8uDPeDGo6PonAkzvTbMlA= X-Google-Smtp-Source: AK7set/+lFx7S9Xfct1ZAxEPH3PawBZ21peIvCtE82GMHp47ITVQYHAl1SLr3t6GKJBrnfiHzsGUKQ== X-Received: by 2002:ac8:7d86:0:b0:3bf:d993:f3aa with SMTP id c6-20020ac87d86000000b003bfd993f3aamr16773360qtd.35.1678593932041; Sat, 11 Mar 2023 20:05:32 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1000]) by smtp.gmail.com with ESMTPSA id g11-20020ac8580b000000b003b86b99690fsm3012957qtg.62.2023.03.11.20.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 20:05:31 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <87a60kh77y.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 10 Mar 2023 18:00:33 +0100") 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> <87a60kh77y.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Date: Sat, 11 Mar 2023 23:05:30 -0500 Message-ID: <87o7oypqb9.fsf@gmail.com> 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: 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-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=LAfLjLO2; 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=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678593991; a=rsa-sha256; cv=none; b=RetYAqdZfa7JBeFwNOAO7tX650J22hcO3qPQi/H7T6t8MXW0bJd3AB+mSFOflIzJbT6zeh cquZFTkBsZQHqdTPm2k3NI23v/+yL4j0Ip3lIgO6br2vtr0/2Wd4+Vqk/U46TN2/f2mvDq G/AlCsReRraA8BdRZio2CXEzi9iAknQh9XxqZxmqgNNGaS1/xKp/Aw3mr+QBg4WwVT7oUh kzIGQDgKlgLK8CqQIDLwdTwzKFdu8/SWpxkHe4Xz+flI4DeDqi5GZq6DU/d3IyGcMtOP/D nB6TljCHOP6u8qZZMZ87c2MJYrf/+pAEwXoKdnCFMIFLgfev3AnpLxDB5KryZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678593991; 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=wapCJ+4WPMr3+oPYy9bGOlrHJkyHEl2M5LQvhGbBI5o=; b=C5nCDieKViHA6v0bEs0MwMEn0CEMI325Fxy7ySq6W135EEW7N+U3/PUlodgw/aY9MfL9rc Qvu/wwOqSlYumMfHlRjQNNtcc2qNBwu8E3R5IZ4YD78bzo6+dYyUdNmhcONRershks/zyL MmJgPSTOq4roYKguzSnU98N6hWJ68gks7/751A+Q6Dh7PttcXGWhf6bBR74GeyQ3a46xbq /BIl1etH7roKrSF96iJVLx0d64EBXN80qvBL+jPky9q6zCRd6zB9w5nO8UIygZT2BOLsnu 24f5Xa1vYSn29AxO8QLeU2RaEz2HEvbDkNskhLAZ6MkHyUaO44umV26s7+2fiQ== X-Migadu-Spam-Score: 0.89 X-Spam-Score: 0.89 X-Migadu-Queue-Id: CBF7A22D41 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=LAfLjLO2; 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=gmail.com (policy=none) X-TUID: ocOn9pXYJqHL Hi, Ludovic Court=C3=A8s writes: > 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 f= ix 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 unt= il >>> >>> To make sure there=E2=80=99s no misunderstanding, I think that=E2=80=99= s not okay even >>> as a =E2=80=9Ctemporary kludge=E2=80=9D (I=E2=80=99m not against tempor= ary kludges in general, >>> I=E2=80=99ve done my share of that ;-), but this would be way too britt= le.) >> >> "way too brittle" is a strong warning :-). > > It is; I=E2=80=99m objecting to this change. OK. >> 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= mean > 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 t= he > expertise of each other and encounter each other halfway. When I don't understand something, I ask for an explanation. I'm happy (and greatly value) that my correspondent has 15 years of experience with Guile, but I'll still ask if something is unclear. I hope you don't mind. > [...] > >>> 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 i= ncludes >>> 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 h= ard 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 = you=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 di= scover. OK. I'll put this to the test, when I'm done with the current Ruby rabbit-hole I've been pursuing. Thanks for the feedback! --=20 Thanks, Maxim