From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IJHCBIpjpWV6ZwAAe85BDQ:P1 (envelope-from ) for ; Mon, 15 Jan 2024 17:55:38 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id IJHCBIpjpWV6ZwAAe85BDQ (envelope-from ) for ; Mon, 15 Jan 2024 17:55:38 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=jVWlk83F; 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=1705337738; 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=q7eLEK7fynHI7ZUMTKTx3pwC2B9iOxTSc5QbHLBPuog=; b=K/53YGxSubwaBKxoMxvvd1RnrPnoxm6WiXEzg3aQzJACkEy9TUiFBgj8yCmVlsFLpn+WPk LfLQF2SlbnKDoKFnD9mAwraYtke97ewEexAEgrojUHproKZMSnFcKyIJKuNFhUVBEWbYZR pGWie6Ka3eBjrzAM8uy2hhhtD9SQ74sTTkYZ4Hw+5fcl4Ftfx4ngZPKjnLPBb3bRgxdSsW mnxdZxu021isFtPi5PngRGHMtskDrm5MczMaxqS5f1pRlUUs95q8iHrx0h41W6Y/t9RBty QBRkOnXb/KaFOh/V8xZDs2p2jv7Q3OSx8O65N2yrc2IeI4D2OFoRwm1lGHpZXA== 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=jVWlk83F; 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=1705337738; a=rsa-sha256; cv=none; b=FHiDDKgvPxK6OYYmxLFbDAdy+EVcVy70WZTmnJnl+1/2PrNKCW8CSrKXXjsIJNL5aPB+Nt XxnjUsg6xYkxnFGeOZg4J8jidANUgbj0wlYeRyO4EVRQC/HXh75HvbeXy6gjpjZ5ydp97B rogeDL20+9q2JPcb7N32JRgE6iZZox9fWwfotrt1j5laKGgwtFWnHmcR1GEYsJ1qDZL1Bp 3vXY+/eYXutBcZSskMxk/Wp885Ar/41e7mQTgr3ziQsKFmzdiM2zh/xPmKWrHQGSPyl3+G fTOPWLS6ipp8vcayiIwaG1+IOnE0UGMY7pvMCwv6YD9GVh95gNTXrq+yuB/Wfw== 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 CDE083277A for ; Mon, 15 Jan 2024 17:55:37 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rPQEs-0005zg-Mq; Mon, 15 Jan 2024 11:55:06 -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 1rPQEq-0005zH-KC for guix-patches@gnu.org; Mon, 15 Jan 2024 11:55:04 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rPQEp-0001ED-Fg for guix-patches@gnu.org; Mon, 15 Jan 2024 11:55:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rPQEp-0001Ad-A7 for guix-patches@gnu.org; Mon, 15 Jan 2024 11:55:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68266] [PATCH 7/7] packages: rust: Memoize make-rust-sysroot results. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Jan 2024 16:55:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68266 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Christopher Baines Cc: Efraim Flashner , 68266@debbugs.gnu.org Received: via spool by 68266-submit@debbugs.gnu.org id=B68266.17053376744420 (code B ref 68266); Mon, 15 Jan 2024 16:55:03 +0000 Received: (at 68266) by debbugs.gnu.org; 15 Jan 2024 16:54:34 +0000 Received: from localhost ([127.0.0.1]:46759 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPQEL-00019E-Vr for submit@debbugs.gnu.org; Mon, 15 Jan 2024 11:54:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rPQEJ-000191-OZ for 68266@debbugs.gnu.org; Mon, 15 Jan 2024 11:54:32 -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 1rPQED-0000zl-K6; Mon, 15 Jan 2024 11:54:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=q7eLEK7fynHI7ZUMTKTx3pwC2B9iOxTSc5QbHLBPuog=; b=jVWlk83FzpNu90i5imEE HVTwelQ0yNi3eG+SOnWklw/ehwzj7wgegT1WzOfz9bqdnXzy6B0oLaBnP0IpUXUTeAgbLYMQ/vurc VE7Y61V0jIN8SdseTs5vxDPYsoN+U8MnlqgerxM8Sc3RhmrPsXzaIpmaLUNV8FcdZ5+A9wYwLQmbI 621hcYvGQkGEYbdw3yBAQGl7tcqnR/ix36xNv+wp/T3oFbLqRvcGd2hIgwdByzG1bTTXeVDB1WC+k UpU1YtypykPwYPmZJy+ZXLvaNFfC46H9lUveC2ozt79YgKpjWYpOU/JhJNZ591OorVKDPfy4TJZkt pfevdctQXXWhvA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87zfxafmxq.fsf@cbaines.net> (Christopher Baines's message of "Fri, 12 Jan 2024 17:57:26 +0000") References: <13f83a0db585e81572240e35dfef473aa73fe996.1704472849.git.mail@cbaines.net> <878r4uk5c7.fsf@gnu.org> <87zfxafmxq.fsf@cbaines.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Sextidi 26 =?UTF-8?Q?Niv=C3=B4se?= an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour de =?UTF-8?Q?l'=C3=89tain?= 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: Mon, 15 Jan 2024 17:54:22 +0100 Message-ID: <87h6jeilkx.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.39 X-Spam-Score: -7.39 X-Migadu-Queue-Id: CDE083277A X-Migadu-Scanner: mx12.migadu.com X-TUID: U0iYOxHrPDF7 Hello, Christopher Baines skribis: > Ludovic Court=C3=A8s writes: > >> Christopher Baines skribis: [...] >>> (define*-public (make-rust-sysroot target) >>> - (let ((base-rust rust)) >>> + (make-rust-sysroot/implementation target rust)) >>> + >>> +(define make-rust-sysroot/implementation >>> + (mlambda (target base-rust) >>> (package >>> (inherit base-rust) >>> (name (string-append "rust-sysroot-for-" target)) >> >> We should avoid using =E2=80=98mlambda=E2=80=99 (without =E2=80=98q=E2= =80=99) with packages as it leads >> to deep object comparisons. That=E2=80=99s why for packages we typically >> always have one-argument (mlambdaq (package) =E2=80=A6). >> >> But since =E2=80=98base-rust=E2=80=99 wasn=E2=80=99t a parameter before,= let=E2=80=99s keep it simple >> (=E2=80=98diff --ignore-space-change=E2=80=99): > > ... > >> WDYT? > > Yeah, that does look good. I pushed my earlier version of this patch > this morning though. > > I did have a look at trying to adapt the changes to fit in (guix > build-system cargo) instead, as I noticed that seemed to be a pattern > elsewhere, but I think there's something weird going on with the use of > make-rust-sysroot there since default-rust-sysroot takes an argument, What matters is that =E2=80=98make-rust-sysroot=E2=80=99 takes a single arg= ument, =E2=80=98target=E2=80=99, so we can safely write: (define make-rust-sysroot (mlambda (target) =E2=80=A6)) I think it=E2=80=99s important to not bring a deep comparison bec= ause this kind of cost is then hard to pinpoint. Perhaps you can adjust =E2=80=98make-rust-sysroot=E2=80=99 along these line= s? Thanks, Ludo=E2=80=99.