From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2HvQDRoHTmcxWAEA62LTzQ:P1 (envelope-from ) for ; Mon, 02 Dec 2024 19:14:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 2HvQDRoHTmcxWAEA62LTzQ (envelope-from ) for ; Mon, 02 Dec 2024 20:14:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="on/CTfCn"; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=XDaeutlq; 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-Seal: i=1; s=key1; d=yhetil.org; t=1733166873; a=rsa-sha256; cv=none; b=iRx8zKl07s9+kn1DvZbAt5Xoioh9G29DwTeOdWn7YN8YShHX6egV2d30QkVaZW/ZaY/J+D /jABgGly0XNVYfg92eYodaopOQrge1Gx8iI3OHqemLLoVTzo5Ffjw54KyWyFaxaNBYJXjf dAS8dGVMdaAhxY1krqsh2SIQiscJecp2kbHO2Jg+Qj+6M87R9h1YhrGqtGGvVl8rmjNHcQ /UZlS2eI4cnP27YDTaG6tY/vmf/6VSLPDqz8GEmSxjba/b9uoPiFiaip/ziJ/7AWjP4r3v n74nG65IbcpivaiYqkeyuN9fPPQOH16X6Ee72dcN1LY6hwLI98jCqFfM6aYJIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="on/CTfCn"; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=XDaeutlq; 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=1733166873; 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=/jKFV0J4G8tK/wN7zabK+Lg373yz2m4E4dq3Nu3zdFI=; b=VJqC2KjDN0NCL6Ec+WJjwUSoOdfksJHEOr3MbvfXauY5CQ9cNXX6UDkJTurQA5X46K86j0 m/JQFli+95+7Ze2+QZMfby12sEw5KEx3EnS3NonFGdvyzOmNixmvOwPYfKr8LiKUd97Yd+ K7ALz+20FQS3LaXhmumW7WkmF26/wFV1oAGOLVxAWGG6tyguwv4nCMfiDsNQtM0h/rCW+H Pq542dbXVbld8+GQDycYxEctVMtTyuY3EYMFTMhwg25VXLP2lOxrR4mRjZxEYE21d9178V FhZyi5iarvmgo55aBwiF6oT+k7520F3sIqQ4YiSIM1fYVRtbA3m2VAv5N1Fcog== 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 459C482D77 for ; Mon, 02 Dec 2024 20:14:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIBry-0002KD-8n; Mon, 02 Dec 2024 14:14: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 1tIBrw-0002Jz-Nd for guix-patches@gnu.org; Mon, 02 Dec 2024 14:14: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 1tIBru-0006j5-2W for guix-patches@gnu.org; Mon, 02 Dec 2024 14:14:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:MIME-Version:References:From:Date:To:Subject; bh=/jKFV0J4G8tK/wN7zabK+Lg373yz2m4E4dq3Nu3zdFI=; b=on/CTfCnoy0VaqrRWknS7nsqPgzXkTJspXGFxrjWLY8GPxYqQU/HMHOXkBHO7mA9iMqiHv6yV+zxkx1r3O9ccWmtgKy/NbFOfrOrElnociXVu1UXkP11IHz44WKY8wnB6zasNgVEa/slldaZNetkGMLgFdV/ntoGb5q5rWm/oiU65eVLoBO0S531Q9YSVGujcuyihtduHNRc7NXq2mjf+dDM2XX+HFFxw+7x1KXDJDuabZHAl0LhpVqVr2LE4B746RTdV3vY3KQTKrMZbo9m+GIJymUQ9KI5ndKT9L54ERdYFD50C32yOfhmVGQe62CGS1s2WB72AjXuvkIQ2A/W4Q==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIBrt-00027X-SP for guix-patches@gnu.org; Mon, 02 Dec 2024 14:14:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74654] [PATCH 3/5] build-system/cargo: Simplify =?UTF-8?Q?=E2=80=98crate-closure=E2=80=99.?= Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Dec 2024 19:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74654 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 74654@debbugs.gnu.org Received: via spool by 74654-submit@debbugs.gnu.org id=B74654.17331667838034 (code B ref 74654); Mon, 02 Dec 2024 19:14:01 +0000 Received: (at 74654) by debbugs.gnu.org; 2 Dec 2024 19:13:03 +0000 Received: from localhost ([127.0.0.1]:56596 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIBqw-00025V-Vu for submit@debbugs.gnu.org; Mon, 02 Dec 2024 14:13:03 -0500 Received: from mail-wr1-f49.google.com ([209.85.221.49]:43443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIBqu-000253-6A for 74654@debbugs.gnu.org; Mon, 02 Dec 2024 14:13:01 -0500 Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-385dbf79881so2231774f8f.1 for <74654@debbugs.gnu.org>; Mon, 02 Dec 2024 11:13:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733166719; x=1733771519; 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=/jKFV0J4G8tK/wN7zabK+Lg373yz2m4E4dq3Nu3zdFI=; b=XDaeutlqlwK+nYg2YXydhblDwPyAoWzMQE+1V3tBjlAshKWupcFjM+46Dhs1B6PRgp x4fKkckyrWb+DtRD0lr6Q+Ss/7ji6ahYIx86Af+fxXjpAvi7rJmJ7Jt+n9o8WaKzkqJP QKc8hhVqgkUq1q50NP+eHHwOC/Ql6PLJBl3sluIN3njFpxCXxlRGCidhrl2vDzU4F1mE Mfae8R7yeQbWf8wwgu2aytihXitUit+foHPBRVI2XyUgbg6sUG2uQDBllF95mSTWGhv8 2de4aU6sP+EfvU0gKDTPjf1+SP1EzIWVCnPndFtxTJlHFA1vQoYrZFstOJg8tXjBEMkp po3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733166719; x=1733771519; 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=/jKFV0J4G8tK/wN7zabK+Lg373yz2m4E4dq3Nu3zdFI=; b=uMq5xJrAMENYzZGW5xNjtaSC/EQt7DA1kur2fIBl6iLNiZmxO4syNaRgEhMEZJ2Dxt wHTc6BoWrBUH34FXbPFN/OD8qM5zC9rlpElMEDnEm6/OfkBC+2HCCfjAo4kwAuOFxRRX mPlZJd1mbtZPr4BZp+GPLCeNVR1eqYqjYmt2j3/b+iBJQtbNpsXgsxAAFVJ1NkMQrgE7 /EME7K1atSy3lauRETzOQFe7Belsx0s5UJ8JdfrUiBcf9JcBd/14bRuFgwXpdqEM9+AF u9xrDdoThShgKce23y1O2TLcM2ioa1Vp+v+mSRN/bPBtbiWCWPU7LuF34BHAHDCqdJeP YEcw== X-Gm-Message-State: AOJu0YzEGYRyZUtSQH+awYoUpnBz/LREK4PE+hwLM8up2LXHQWp64R1t 4BaEokMgDpl936qmKWvvgUuWZEoiz2btu48BQd89SwH2w0I75YnAWjdiMxMU X-Gm-Gg: ASbGncvygrq8jJe/mnVh9QxCU4VGxbsVkA5/uEDbf1dYT37RSMGikYHaty1/f2nkwtQ QkdxyRLfFUs9hlGbeDfkmQePfmrXvLonvKFIG7K30aYMFJeHp1Pq0v8UwlqxdB48fFu9lTVsQIT ca73+msQZH+lbgndDvkIcRzdWHPcvnooa6RNHcK2gI21i1Pf+tP8dB8DR4DjdobSBtWTRt9cOPB 4pe5eW33EB1CIsHjj7wqUVc4meA3aVUisWL0QN5XkQzN9Y= X-Google-Smtp-Source: AGHT+IHIFteXYm/E/J21dxFkw1SXioxx4IJI0pB5F0pT6P+6nnkYifEoRf4vj3N/vSKlSFhZ8YXVZw== X-Received: by 2002:a05:6000:1f81:b0:385:faf5:ebb8 with SMTP id ffacd0b85a97d-385faf5efd9mr1420351f8f.7.1733166718913; Mon, 02 Dec 2024 11:11:58 -0800 (PST) Received: from localhost ([141.226.9.46]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385ccd3a4bbsm13475018f8f.48.2024.12.02.11.11.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2024 11:11:58 -0800 (PST) Date: Mon, 2 Dec 2024 21:11:56 +0200 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 74654@debbugs.gnu.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="V4ezjDDxlqmO/zRC" Content-Disposition: inline In-Reply-To: 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-Queue-Id: 459C482D77 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -11.28 X-Spam-Score: -11.28 X-TUID: 1CRsiip2jObb --V4ezjDDxlqmO/zRC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I test applied this on master and then went to build my rusty-packages manifest. The time on './pre-inst-env guix build -m ... -n' went from 35 seconds to 20 seconds and the derivations didn't change. On Mon, Dec 02, 2024 at 05:53:28PM +0100, Ludovic Court=C3=A8s wrote: > * guix/build-system/cargo.scm (crate-closure): Remove =E2=80=98first?=E2= =80=99. >=20 > Change-Id: Ica1a661eb422a882ae3a1a54819b2dd7d68449de > --- > guix/build-system/cargo.scm | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) >=20 > diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm > index 658a2e525e..0e9a4b1d23 100644 > --- a/guix/build-system/cargo.scm > +++ b/guix/build-system/cargo.scm > @@ -1,5 +1,5 @@ > ;;; GNU Guix --- Functional package management for GNU > -;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2019, 2021 Ludovic Court=C3= =A8s > +;;; Copyright =C2=A9 2013-2016, 2019, 2021, 2024 Ludovic Court=C3=A8s > ;;; Copyright =C2=A9 2013 Andreas Enge > ;;; Copyright =C2=A9 2013 Nikita Karetnikov > ;;; Copyright =C2=A9 2016 David Craven > @@ -227,24 +227,22 @@ (define (crate-closure inputs) > (let loop ((inputs inputs) > (result '()) > (propagated '()) > - (first? #t) > (seen vlist-null)) > (match inputs > (() > (if (null? propagated) > (reverse result) > - (loop (reverse (concatenate propagated)) result '() #f seen))) > + (loop (reverse (concatenate propagated)) result '() seen))) > (((and input (label (? package? package))) rest ...) > - (if (and (not first?) (seen? seen package)) > - (loop rest result propagated first? seen) > + (if (seen? seen package) > + (loop rest result propagated seen) > (loop rest > (cons input result) > (cons (package-cargo-inputs package) > propagated) > - first? > (vhash-consq package package seen)))) > ((input rest ...) > - (loop rest (cons input result) propagated first? seen))))) > + (loop rest (cons input result) propagated seen))))) > =20 > (define (expand-crate-sources cargo-inputs cargo-development-inputs) > "Extract all transitive sources for CARGO-INPUTS and CARGO-DEVELOPMENT= -INPUTS > --=20 > 2.46.0 >=20 >=20 >=20 --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --V4ezjDDxlqmO/zRC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmdOBnwACgkQQarn3Mo9 g1FesQ//W9xNfHPV8BL2Fd7FfEghh8j/8HF7ex2+r3cTwvlqI7LqioeGJKDolGVv zISZmsm8MDLns9yZzfERjV0fskKIy/Q3JkahXkMIAGjjhu8J5nnPumbuckJZRcqo IZnMH4ht63I/F8+CRPjfhOHQKjvNTtOhXVucuUzQ3HtwwGVy3PPJ6hXcLeFkp+ut akvDhqFPnBr80Wuw9EsT5sNhFcvPDlQBAKEKNsEDH676bQ/5C+EFwxUBCBJGQ3lj EokKb3b80T5+jqQ0DOy01N/u18NhkXpeGr/KpKfDnG2Sh94a1xpaJawq1oCMDbVY zjrJ+P3Q4A+WDGQLK8fkF/szD/0EVvyn2c2Ivg0fXAwLLzNccLy1wjo7988p5bvy BDrHJ6+ErQrvIhJgc8UROB3zTnrHK2TPFHnGnuTbBdPxL3JqcWYCWNgwyG/RNcaL xkyvkKZVb8QQ5pRrHp7H3zZOCsRlRuPjcA649EAhFg2yUIn+Lppo3BK00pMmE0X0 FPl5LF19W8GQ6f2AIXEWsWtyJiFe4ZUIOHmXMpYQGKS9QAk1AEUNktj9AuSaKiP7 cLiQ707r5+bw61pvPSRG8BUulvbG49PJCu5vIzyg50/BRIa6SJMRaK6lZmxc766e Qg/1SQgqaNhBbSCHbEXAzf6bZ87aQfpFM6LGGYuRyjfzZq//b2A= =LVo0 -----END PGP SIGNATURE----- --V4ezjDDxlqmO/zRC--