From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id iOJ7BXMxmGVqogAAkFu2QA (envelope-from ) for ; Fri, 05 Jan 2024 17:42:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 0C3KAHMxmGXFGQAA62LTzQ (envelope-from ) for ; Fri, 05 Jan 2024 17:42:27 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1704472946; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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; bh=sDaUCRgvTKcMlun08I+KBT1vXshN+QxctdvNSfyrWBM=; b=TrNWCfX3si9eskEx0Ub/iTiMYBXBYhhs+7M4OcnOOegExBoQzAiAV7aO4BgtT+nk9Nq30y v1mL5kQpDfH7SJ0d348zNWfvL12f1HABKISvNWPIpvCd8mf6TePejzutMqevIHQ3hFHZHi vb1JnCx8a61Kf+tW2vCrbKpP8t0K64FkOpq+Kvfa4ODeZFbpMRNjw+RJoqVCf7aR8kPeXC E5efP7wrrfqYW1H5ETJlBAMc+H52mbwogbw9EGJdyQUmplUqGHyuFDNPRvYifr78lTEqxP T6St1mwIPXUTOS3jzpOrm1b1J39DydE7eDWCIc+4j/5wWS4LnmiyfcJVp02VYw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1704472946; a=rsa-sha256; cv=none; b=K9M751tdoS2VpbKbK6GnLaYtFr1Gd0mPi0EpXRMQb/dFzrQOefV0V3oic2nKJBQWmJr5tQ Y5HLbfvEuoSEUw57eXdbV613vby22zpAvh4VFrzz6wLbFXcvv/6ywbKbQoLvNP6Pz7qluL znsJBjuXtrY9L0bEf/fm8cNyEP4naxtBfoRUcVydMsByuhEDmP84q7ZEgRCgoZOA64fKc/ a6OTr1X7B2FwxxbTBWVUJSNDJ2lFNSo+ll2LYQ0rVew5yraDeMWxM2p9BA8HjkUnbDmF3U Y+Hg4ph4UOPzuW4D6E/P7UUBDxhrKdQwZnClpFVuRdw/8ebDijytzi23xH6F4g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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"; dmarc=none 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 B74FD5F0D6 for ; Fri, 5 Jan 2024 17:42:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLnGu-00089w-QE; Fri, 05 Jan 2024 11:42:12 -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 1rLnGi-00082F-Gr for guix-patches@gnu.org; Fri, 05 Jan 2024 11:42:03 -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 1rLnGg-00036T-6O for guix-patches@gnu.org; Fri, 05 Jan 2024 11:42:00 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLnGk-0003vg-GU; Fri, 05 Jan 2024 11:42:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68266] [PATCH 7/7] packages: rust: Memoize make-rust-sysroot results. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Fri, 05 Jan 2024 16:42: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: 68266@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by 68266-submit@debbugs.gnu.org id=B68266.170447286315008 (code B ref 68266); Fri, 05 Jan 2024 16:42:02 +0000 Received: (at 68266) by debbugs.gnu.org; 5 Jan 2024 16:41:03 +0000 Received: from localhost ([127.0.0.1]:57734 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLnFn-0003tk-3H for submit@debbugs.gnu.org; Fri, 05 Jan 2024 11:41:03 -0500 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]:55299) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLnFh-0003s9-Rb for 68266@debbugs.gnu.org; Fri, 05 Jan 2024 11:40:59 -0500 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 7D6CA27BBEE for <68266@debbugs.gnu.org>; Fri, 5 Jan 2024 16:40:52 +0000 (GMT) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id d075a7ef for <68266@debbugs.gnu.org>; Fri, 5 Jan 2024 16:40:51 +0000 (UTC) From: Christopher Baines Date: Fri, 5 Jan 2024 16:40:49 +0000 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: <13f83a0db585e81572240e35dfef473aa73fe996.1704472849.git.mail@cbaines.net> References: <13f83a0db585e81572240e35dfef473aa73fe996.1704472849.git.mail@cbaines.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: -4.77 X-Spam-Score: -4.77 X-Migadu-Queue-Id: B74FD5F0D6 X-Migadu-Scanner: mx11.migadu.com X-TUID: eNXbiANCVY09 To ensure that it just returns a single package record for some given arguments, as this helps to avoid poor performance of the store connection 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 --- gnu/packages/rust.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index ea95d27476..64cde7ea14 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -60,6 +60,7 @@ (define-module (gnu packages rust) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (guix download) + #:use-module (guix memoization) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -1057,7 +1058,10 @@ (define-public rust (package-native-inputs base-rust)))))) (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)) -- 2.41.0