From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 qPJEAsZPDWSHJQAASxT56A (envelope-from ) for ; Sun, 12 Mar 2023 05:06:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QGhWAcZPDWSWGAEAG6o9tA (envelope-from ) for ; Sun, 12 Mar 2023 05:06:30 +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 7F74322E93 for ; Sun, 12 Mar 2023 05:06:29 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=fEeQWMP9; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1678593989; 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=HtTxvmSySP0qnfjh327f1ESqnTvBM7/FNo6dlkj5vwkaN07W2rk+FEsBnevYOeBCKLhRGl v8/ulsanqYuN+3xLi4UCfDsyy1BxbT4xDJFuyCWh8Vdv5Ewwd4sKiX8aSk9hLno7jTRatM 1f1GFIvuKIZJkIDk8mIEfZwjij0XxYz7GWeUToTAtcCN6hYL7D40/MYdgaIxog2kUwmqdN neSZ7Q2qrmeUVbG5IuIZKTGIEU/zJGW7naIjJqXIAqDQn5xR6IL7f/OtmChl1Rs4jYbCrX +fDfhTuZ2cs/a5Bz41/fdsystBFVWRzrV/B4RwK+rLGFO7Ld4DBr56mN54+6Ng== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=fEeQWMP9; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1678593989; a=rsa-sha256; cv=none; b=fpj3KSO5Tux1+FUT4BbzXaw0obPeD09bKBuAyP3zeWeTNodqMTYDweOQgduA1TEVcxqFFa UezLKFs1eX+lUi/2itq7HIciS8RK1erOJudB44yStb5NiJzFtMBO/DHDTlixNdPx5QV2Vf oXxlT3gWgoRncPcQsL/lOfkneolEQ5RIj8shXz7G7GLGe318QWwIdaSjHUj8r/iiIjYXNN L4sRpgKXqjJcQELXjwST5s/8yHjN5KxQ6hjXB3o32y+TWieWTyaFb5kET1IAr63qSMG2YV GeRPERbV8XojUPXOwI3C7pWPFkoDwF49FA+ulvAAS+MsdqXgfxxK1/kty56FhA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pbCyH-00079q-G5; Sat, 11 Mar 2023 23:06:11 -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-00075k-Iy 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-0001g0-Ap 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 1pbCy9-0001yL-UF for guix-patches@gnu.org; Sat, 11 Mar 2023 23:06:01 -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:01 +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.16785939257525 (code B ref 60847); Sun, 12 Mar 2023 04:06:01 +0000 Received: (at 60847) by debbugs.gnu.org; 12 Mar 2023 04:05:25 +0000 Received: from localhost ([127.0.0.1]:58898 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbCxZ-0001xJ-BE for submit@debbugs.gnu.org; Sat, 11 Mar 2023 23:05:25 -0500 Received: from mail-qt1-f177.google.com ([209.85.160.177]:33731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbCxX-0001x3-66 for 60847@debbugs.gnu.org; Sat, 11 Mar 2023 23:05:23 -0500 Received: by mail-qt1-f177.google.com with SMTP id z6so10159861qtv.0 for <60847@debbugs.gnu.org>; Sat, 11 Mar 2023 20:05:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678593917; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wapCJ+4WPMr3+oPYy9bGOlrHJkyHEl2M5LQvhGbBI5o=; b=fEeQWMP9HIrZ4IqJGN2KMlzvTos3J1m+mWaEidZMwVPTXgUyJ3N9dMLhr3hC7W1n7R 51C4X7kt90e6+UD6E4ZQOi3Uf1RmVB5ddT3yNvSi7QGx53R9UkcaJ3nMgGeHCrJ2yW0S wyAUZCG+aNx2rrrSWz55SOdI7EXDTKZDSgemFSPfD7SH9YfMeXD37dEjwPFF2IVKXYlX 8Ziyqqb2xE4Cvh0rsl1VfBdjI2mDL4liKmHeetPanvATdxF+VGKGuYK/tqPIlvcmtb+B XFuhr5m2mvM2PozX4kqZ1Sq2PrxEsnK0y4ysZZmJ1IML1E84P8BT3PfuDPM9U7Tf++tD L9Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678593917; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=wapCJ+4WPMr3+oPYy9bGOlrHJkyHEl2M5LQvhGbBI5o=; b=OIlWPZeMr/e+rvsaUDPgHrgDpm3l/ztPsv9KVuqBGFAMVbwy9qC5miUdFfUieeK1a2 FKVFrJBT8fA1DTkzjj6EJakwoNXM+cZjC6bMoJF/TY4gzjZGbOeQ5OQWasyq3pZ1cejW chmfcVFgXq7rXhE8Iie+AwlbqOI7ACnggc6kj36+/9gegcmlYWEGS06+Ioodot+dSU8g EUt3oPq/1aRIXqfwSZjf6e5IPVkwR4W5jnGe1JiB+YSW01X1jun3ACrsRO5n0dsVJFj5 t1f5KyPM8WDJArA13V6bdMdV1JaFx8ueoyKG07KtCfI/xP7KCbsaLuhteS6oZZUwZQjW tkbg== X-Gm-Message-State: AO0yUKXxFl0YPEH/IlvrWxbYhN1P1WS3ODhV33sg9/sYWB0R9KvhzcAe GkSYFssj1/XO6IBOV+n04oo= X-Google-Smtp-Source: AK7set/559ZJOYj3gqopvG0JnLR5yC8vwFFuqR89Tp4D6KC6//jeqVJQpes7bLzLf4VFqncP/xT4PQ== X-Received: by 2002:a05:622a:50e:b0:3bf:c9d1:4276 with SMTP id l14-20020a05622a050e00b003bfc9d14276mr17188503qtx.5.1678593917671; Sat, 11 Mar 2023 20:05:17 -0800 (PST) Received: from hurd ([2607:fad8:4:3::1000]) by smtp.gmail.com with ESMTPSA id y5-20020ac87045000000b003b2957fb45bsm3038341qtm.8.2023.03.11.20.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 20:05:17 -0800 (PST) From: Maxim Cournoyer 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> Date: Sat, 11 Mar 2023 23:05:15 -0500 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") Message-ID: <87pm9epqbo.fsf@gmail.com> 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: 7F74322E93 X-Spam-Score: 0.09 X-Migadu-Spam-Score: 0.09 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: OPZek5cSSeBp 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