From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iFZbKqC3omVMTgEA62LTzQ:P1 (envelope-from ) for ; Sat, 13 Jan 2024 17:17:36 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id iFZbKqC3omVMTgEA62LTzQ (envelope-from ) for ; Sat, 13 Jan 2024 17:17:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=D3u4xj2a; dmarc=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=1705162656; 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: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=BSyg6JIW/yI/NlLj1Be8R8KGKgFRZNZJfBSmLfJkVg0=; b=gVLY4dmdhCLIN61f46IfGtH+ATOHEtPs5rsQb08xXOEI/FA6glOYpLeH9aCDDvl/HqSy9r 4gyd3WB5V3FC+hBDa2hNOa6McnUcdPye65nBqboSDUlzSZsif1lYGzdO/mDP3tF4kRXGxu 1ow3HoFB9j6zbd0K939PV7XsRP7uKuLuY5oWAG7f0nIn6E/OcdqYuUZ0llgp+2SQS28/tl c5ov1D2h7ukZQUF++bKt61+d7CYq5nddWBm6mHBE8MRbBPHADPZslTplrMLl5B4mq/Ao/n coz/r1CKl96aZCEPcL+9WQwR6iKHDwT5MDNfNkWZky75cIJWB0mv6ynCji7DPg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1705162656; a=rsa-sha256; cv=none; b=OBE5zaWVzYWnsycEWLN/kOLWHv106DQphiKq98Adh2o2NVwxSofE2yM6AkDgvkWq6K/JMM R8TPQQptgi82v1ekqg9LOhzfjZ+upVFIlPvMbcY68ogwvF+JL8fTQGv9XmTSw3QafjeKq1 6Wdqa1ZZF7czE763Y2DbJer2chf9X9hNZlu0hU7xs9WeV0c4BC5/Ray32kZ9vx45nJ7CIt ZUxPW8gZ087p2qOD8lhOqlRqcRCbb+TtsjykUgj33o/vWHQVk/rUyeoBFvcM30CpoRJOJ1 gBWLnTwYtOJXcuNs1daGcp9e0JLXr1CCdBX2wU8lQQ30e3iKdPgBRqKl0TLQQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=D3u4xj2a; dmarc=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" 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 8144977B92 for ; Sat, 13 Jan 2024 17:17:36 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rOgh8-0007Hj-Oh; Sat, 13 Jan 2024 11:17:14 -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 1rOggy-0007HK-1A for guix-patches@gnu.org; Sat, 13 Jan 2024 11:17:12 -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 1rOggx-0001DZ-Kp for guix-patches@gnu.org; Sat, 13 Jan 2024 11:17:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rOggw-0008ET-7z for guix-patches@gnu.org; Sat, 13 Jan 2024 11:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68266] [PATCH 7/7] packages: rust: Memoize make-rust-sysroot results. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 13 Jan 2024 16:17:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= , 68266@debbugs.gnu.org Received: via spool by 68266-submit@debbugs.gnu.org id=B68266.170516256228455 (code B ref 68266); Sat, 13 Jan 2024 16:17:02 +0000 Received: (at 68266) by debbugs.gnu.org; 13 Jan 2024 16:16:02 +0000 Received: from localhost ([127.0.0.1]:40884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOgfx-0007Nx-6L for submit@debbugs.gnu.org; Sat, 13 Jan 2024 11:16:02 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:55430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rOgft-0007AQ-Vu for 68266@debbugs.gnu.org; Sat, 13 Jan 2024 11:15:59 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40e68d836bcso11810215e9.2 for <68266@debbugs.gnu.org>; Sat, 13 Jan 2024 08:15:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705162553; x=1705767353; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=BSyg6JIW/yI/NlLj1Be8R8KGKgFRZNZJfBSmLfJkVg0=; b=D3u4xj2a+q2AvHm6m7TMWk60jXcmKMsZgqy528JDpMhRdh+r+/qq5OFJO3lfjbDV23 nFfahQNcUkCIWD4QwKrA5gpNpVX1tMtc5n6/kBV+NGKJI18+DWg2B6Yrb0hOYR1+mgto Co70iSn4N/rwMaLKP55zlRANVm/hexF0mCHSiAI3uGDrTXhaZodwsqTdLbvcCLFYPilG kZ18L+oJF/y6xKJxdccx1vXJcaP4MvVYHb+YR7vKv8Kq+sJyku3tsJiom/DUDNZJ6E4a FjxkACvgmEEckxog2m9bQVrHBJ8njJspMfSRiaoIYvpcEUzMHK4+eT7HUZ08w+bBN9k0 Oftg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705162553; x=1705767353; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BSyg6JIW/yI/NlLj1Be8R8KGKgFRZNZJfBSmLfJkVg0=; b=hK1Qnhna/uwH+IKByAC2I9UIyZjw0DXPLSS6eN9+zM0dq1c2iKC91ZBMgh4/sOmldk zYYcp8TFTVb8B6YzrEPhuKcZAfQc0zgKliHhtg2P95tT++RvNtnd2AqU7DmlFAQZzLQY oTEvSGQfXAyc0Y+kiIQFqOsR7GfAqXMnDET5jjobRGVgmT+IjtYQQ+wudbDJxZeXf8Il O4nVWaRwu8UnzuUU7pCPgkv4KIkR7soDtzWXPK+V3AXtGaV0xH/ztrGu9T5cC0szV7ST mC7da9A3p+zBoAaEYdJjwtLV1807hxgVhj+DAWT6tIXyJREY4tdyv80pq5Dv8LUy+MCf 7ebA== X-Gm-Message-State: AOJu0Yz+t025sFZSz5rsS0Tl/GHPpvo+4SYVQiRkoABmHbEjeTmIr1E9 I1eO8/W8ah45o1XETKOWMBk= X-Google-Smtp-Source: AGHT+IHEhx7gPMhe/DewVPJeVymTbPqd7VAX/XGsqxogcw7BY68UEUWUgwZMxs+ZotgEXPyPNYiVtw== X-Received: by 2002:a1c:7c0f:0:b0:40c:6e8:610a with SMTP id x15-20020a1c7c0f000000b0040c06e8610amr1616592wmc.56.1705162552747; Sat, 13 Jan 2024 08:15:52 -0800 (PST) Received: from localhost ([141.226.15.142]) by smtp.gmail.com with ESMTPSA id j8-20020a05600c190800b0040d7b340e07sm9794239wmq.45.2024.01.13.08.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Jan 2024 08:15:51 -0800 (PST) Date: Sat, 13 Jan 2024 18:15:49 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Christopher Baines , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 68266@debbugs.gnu.org References: <13f83a0db585e81572240e35dfef473aa73fe996.1704472849.git.mail@cbaines.net> <878r4uk5c7.fsf@gnu.org> <87zfxafmxq.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BE+dJDenWrZcLOkR" Content-Disposition: inline In-Reply-To: <87zfxafmxq.fsf@cbaines.net> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 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-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.30 X-Spam-Score: -4.30 X-Migadu-Queue-Id: 8144977B92 X-TUID: VfAzrm/Cnc+2 --BE+dJDenWrZcLOkR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 12, 2024 at 05:57:26PM +0000, Christopher Baines wrote: >=20 > Ludovic Court=C3=A8s writes: >=20 > > Christopher Baines skribis: > > > >> To ensure that it just returns a single package record for some given > >> arguments, as this helps to avoid poor performance of the store connec= tion > >> object cache. > >> > >> * gnu/packages/rust.scm (make-rust-sysroot): Move code to > >> make-rust-sysroot/implementation. > >> (make-rust-sysroot/implementation): New variable. > >> > >> Change-Id: Ibb30c7398328c87c032bb8828635a34ada935167 > > > > [...] > > > >> (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 typical= ly > > 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): >=20 > ... >=20 > > WDYT? >=20 > Yeah, that does look good. I pushed my earlier version of this patch > this morning though. >=20 > 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, > but doesn't use it. Maybe once that's figured out, we can move the > memoization there and switch to just using the target as the key. >=20 > Unfortunately I'm still waiting to see what effect this has on the data > service processing revisions. I'm pretty sure it's going to help, but > I'm concerned it's not going to help enough to make processing revisions > for patches feasible again. I looked at the build system a bit and I think it was a combination of cargo-culting the other cross build implementations that took a target argument for the cross-compilers and I figured that rust-sysroot would also need one. The other bit was I think I had in mind the possibility of choosing seemingly arbitrary targets which were supported by rust but not known to Guix and having it possible to cross-compile to those. Given that rust, like go, IIRC doesn't actually need a cross-compiled compiler to build cross-compiled packages, could it be that parts of that logic can be rewritten/simplified? --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --BE+dJDenWrZcLOkR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmWitzQACgkQQarn3Mo9 g1FMIQ/+NzP0ymT2u5O3czdn7MfaPqy2QawC2fb4SwAr2agAdeViu+BvcmpZ+uqM n57fviPK0YiLfReQdtHT40GtUCJkXtSZgtViJrwXUKprqe9uWQmzNZ3LWygMTfuc OJTI7Q6ssgVyLRrqPQ7wQd5MlCnIgCC+DPq692Dr41BBxL1bY3SNH7/NWtqCCmR/ rqt+pKjtUGPDunjkDwkEMINHz4O6306LuVvdlMq0m7V9+lHzCuHPW9OVZBIIfa3e FGhQEMWwWqB1x7Sq29iZfYehIUECD6bcnjX53dhugp8zSCTQPdbVXKsh4x3Uc9Hm WF/VWkytBJw4SUncemElECWz/zGB5s9AkQJwAjRfs3mPP0QxxmkoTxycC+zMxIGV RCnDowmI0LS/3p87uuUsgCeMzS+DTsyYKJirfeoivwfUGwutO91W6uoE5RymqICb 3rB3eG/fUDhzFNw3k5Pn2PW3wFJiELMcmRBRUTds6njlRcBkMStu7DmMUTNihz3/ SXJ1zvQHDItWgk1/kh1+RaW2+vBgTCa5c/1HXq9cbFPPUE1kO38EWPBoyPvrUzZP gTcRDELw7x6ma3cebp4l3ZPLZKY/4QYuW636l9+wa5xYXE3+X9mypwiwdmHoEf8b CH/5EV7Dk1+Yf8pDLnbltip4Vr90u/mOppjwedxb+oahSrOPxnY= =LY7H -----END PGP SIGNATURE----- --BE+dJDenWrZcLOkR--