GNU logs - #77212, boring messages


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#77212] [PATCH] gnu: rust: install stdlib manifest with original checksums
Resent-From: Brennan Vincent <brennan@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Sun, 23 Mar 2025 17:42:01 +0000
Resent-Message-ID: <handler.77212.B.174275171123944 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 77212
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 77212 <at> debbugs.gnu.org, efraim@HIDDEN
X-Debbugs-Original-To: guix-patches@HIDDEN, efraim@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.174275171123944
          (code B ref -1); Sun, 23 Mar 2025 17:42:01 +0000
Received: (at submit) by debbugs.gnu.org; 23 Mar 2025 17:41:51 +0000
Received: from localhost ([127.0.0.1]:52455 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1twPKZ-0006E8-Ce
	for submit <at> debbugs.gnu.org; Sun, 23 Mar 2025 13:41:51 -0400
Received: from lists.gnu.org ([2001:470:142::17]:58122)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <brennan@HIDDEN>)
 id 1twPKW-0006Dl-A7
 for submit <at> debbugs.gnu.org; Sun, 23 Mar 2025 13:41:48 -0400
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 <brennan@HIDDEN>)
 id 1twPKJ-0002dc-0D
 for guix-patches@HIDDEN; Sun, 23 Mar 2025 13:41:35 -0400
Received: from smtp.umanwizard.com ([54.203.248.109])
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <brennan@HIDDEN>) id 1twPKF-0003WP-Oy
 for guix-patches@HIDDEN; Sun, 23 Mar 2025 13:41:33 -0400
Received: from localhost ([89.100.58.90]) by smtp.umanwizard.com ;
 23 Mar 2025 17:41:28 +0000
X-Fes-Received-For: guix-patches@HIDDEN
X-Fes-Received-From: <brennan@HIDDEN>
From: Brennan Vincent <brennan@HIDDEN>
X-Envelope-From: d0948f56eb1c8adde91008a23e408d9fde88278a Mon Sep 17
 00:00:00 2001
Date: Sun, 23 Mar 2025 10:41:23 -0700
Message-ID: <87msdbhcfw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Fes-Encrypted: true
X-Fes-Ehlo-Domain: localhost
Received-SPF: pass client-ip=54.203.248.109;
 envelope-from=brennan@HIDDEN; helo=smtp.umanwizard.com
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

* gnu/packages/rust.scm (rust): install stdlib manifest with original checksums

Change-Id: I1100ffe4ff67c8e2026e802fc3902ec218e2efee
---
 gnu/packages/rust.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 3fd7fc3433..04d88f6a82 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -1476,12 +1476,28 @@ (define-public rust
                  (invoke "./x.py" "install" "clippy")
                  (invoke "./x.py" "install" "rust-analyzer")
                  (invoke "./x.py" "install" "rustfmt")))
+             (add-before 'patch-cargo-checksums 'save-old-library-manifest
+               (lambda _
+                 (copy-file "library/Cargo.lock" ".old-library-manifest")))
              (add-after 'install 'install-rust-src
                (lambda* (#:key outputs #:allow-other-keys)
                  (let ((out (assoc-ref outputs "rust-src"))
                        (dest "/lib/rustlib/src/rust"))
                    (mkdir-p (string-append out dest))
                    (copy-recursively "library" (string-append out dest "/library"))
+                   ;; rust-analyzer needs the original checksums; otherwise,
+                   ;; it fails to cargo manifest in the stdlib, and then
+                   ;; analysis/inference involving stdlib structs doesn't work.
+                   ;;
+                   ;; For example, in the following trivial program:
+                   ;; 
+                   ;; fn main() {
+                   ;;     let x = Vec::<usize>::new();
+                   ;; }
+                   ;;
+                   ;; rust-analyzer since versino 1.82
+                   ;; can't infer the type of x unless the following line is present.
+                   (copy-file ".old-library-manifest" (string-append out dest "/library/Cargo.lock"))
                    (copy-recursively "src" (string-append out dest "/src")))))
              (add-before 'install 'remove-uninstall-script
                (lambda _

base-commit: b54a9ca849f013300c633fb79d80bc754f6b28a2
prerequisite-patch-id: 2b36f42a4b79ce79d12ce58a03de81902054f2a1
-- 
2.49.0






Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Brennan Vincent <brennan@HIDDEN>
Subject: bug#77212: Acknowledgement ([PATCH] gnu: rust: install stdlib
 manifest with original checksums)
Message-ID: <handler.77212.B.174275171123944.ack <at> debbugs.gnu.org>
References: <87msdbhcfw.fsf@HIDDEN>
X-Gnu-PR-Message: ack 77212
X-Gnu-PR-Package: guix-patches
X-Gnu-PR-Keywords: patch
Reply-To: 77212 <at> debbugs.gnu.org
Date: Sun, 23 Mar 2025 17:42:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 guix-patches@HIDDEN

If you wish to submit further information on this problem, please
send it to 77212 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
77212: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77212
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#77212] [PATCH] gnu: rust: install stdlib manifest with original checksums
Resent-From: Efraim Flashner <efraim@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Tue, 25 Mar 2025 13:36:02 +0000
Resent-Message-ID: <handler.77212.B77212.174290975115212 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77212
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Brennan Vincent <brennan@HIDDEN>
Cc: 77212 <at> debbugs.gnu.org, steve@HIDDEN, divya@HIDDEN
Received: via spool by 77212-submit <at> debbugs.gnu.org id=B77212.174290975115212
          (code B ref 77212); Tue, 25 Mar 2025 13:36:02 +0000
Received: (at 77212) by debbugs.gnu.org; 25 Mar 2025 13:35:51 +0000
Received: from localhost ([127.0.0.1]:36933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tx4Rb-0003xI-5M
	for submit <at> debbugs.gnu.org; Tue, 25 Mar 2025 09:35:51 -0400
Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:46319)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <efraim.flashner@HIDDEN>)
 id 1tx4RX-0003ww-IW
 for 77212 <at> debbugs.gnu.org; Tue, 25 Mar 2025 09:35:48 -0400
Received: by mail-wr1-x42e.google.com with SMTP id
 ffacd0b85a97d-39141ffa9fcso4765874f8f.0
 for <77212 <at> debbugs.gnu.org>; Tue, 25 Mar 2025 06:35:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1742909741; x=1743514541; 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=I68sadDANVG/GMBEoHe5GlVekQ/CL8eSC0d0isqT11U=;
 b=J4+Vm79F3pXuTA1PBlix3V2Umafhdepo5wRDCTGBbsgDNtzuZZcE9aXgltyaXIFABz
 /VM/0Cq3oBSU98qSTtDL02tIoXbLygdrlkP5eKr2Epq/ZD8hTuwyfr0l0bbap8TGgT6X
 5dk5HrTO+uUxorLDV6BWdPQVQg1V2651uPoGFqeccLcUGGrdLOiFSRRKxu2KuGPGF3xF
 xHouCRi1PmtsvqfTau67sv2CWlE/25tNwuv1xFgGOkoeKVwkDTlY8/S9mEw4DVW6rMLQ
 EKE2feh6o7bklLIhMcMbN5qQvu0P5IfXbeCLigoErBMxoGkviNQ/2MXuiSFkIYp7XTLw
 pXQg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1742909741; x=1743514541;
 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=I68sadDANVG/GMBEoHe5GlVekQ/CL8eSC0d0isqT11U=;
 b=s6vv4OLvosCIMZUrOOZ560frG7G8Ka4UA2qBAQ/IY03DY2l3EK6m9KqKtdCqPkEJAK
 XMhb7fil1nTnrR5x3T499UOzgg/gfAd62JmAbt/ye0G0mC3TQOYoXWw6h05ag0aeZfsY
 G6L3M1tVFvdsW07ex0jlBe8cJx5CRc3FLVABd+xiRzDvxpzZpylwjr83fX465nQ0sCXp
 wKx4BSTj8v1HJRJ+/VpOvKkgLNVu5hObczCfeMPy8dd0UNsM/vBYsuyJOLQE3MAMxUbO
 dNIW/nmtqi4HhPsrsPOS1q+e1tOQb+/s7iT63HiCqnLluYSSx0vuAqF+1YVM+HBOjDbm
 yK2Q==
X-Gm-Message-State: AOJu0YwJbNYavkXADRaIuxmWwO+hSqCmcOTnCWuNOCXB6jw7FuwZF4hR
 uLcxTCGmHUZ9gNlseUF93tDbNGEbW0SsQRjOdBW90c4YnzxSC6tTXif9tE0Q
X-Gm-Gg: ASbGncugoVvpGu15IJx0Qw3fFwtQmg2RuozaILatfJOhoItnBo0SKoQ6NrqQG980zRM
 ZfNsrnsGdGWV6V9nKsZ0qZDEid7H9QN9fLCStixF/r0S3/l90mCpsr42dj9hHOfuVU2Oy9oh+QA
 lgzxWZz/cevCBpZjbRCwoYQidMIw7TjXDLChMmIqdwSc2Uq0sQuYBCpI4FzCKBk29BSb0prWdSn
 Zuvem1eaOgTSSUAF133GsZuc6LAuYRlAScsQtjB1eQz2L204ErK/gtSsOT8Y/CaddpwPMAm9dM4
 tCpd26K18RWEJP+puFAIBb/73LBOLauQE06lKtbhTKrs+Z1DR8Fiig==
X-Google-Smtp-Source: AGHT+IHg9oVa/scz6FfoKxgxN6LkPyC/nGJ9kNA5byvIJyVwWR0yLkXAlKTA2jUVh8p6doVVuhMmDQ==
X-Received: by 2002:a5d:5886:0:b0:391:1213:9475 with SMTP id
 ffacd0b85a97d-3997f90a9a1mr14144280f8f.24.1742909740885; 
 Tue, 25 Mar 2025 06:35:40 -0700 (PDT)
Received: from localhost ([141.226.15.94]) by smtp.gmail.com with ESMTPSA id
 5b1f17b1804b1-43d4fcea6ecsm151957325e9.5.2025.03.25.06.35.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 25 Mar 2025 06:35:39 -0700 (PDT)
Date: Tue, 25 Mar 2025 15:35:38 +0200
From: Efraim Flashner <efraim@HIDDEN>
Message-ID: <Z-KxKiSLXnj9aH9L@3900XT>
Mail-Followup-To: Efraim Flashner <efraim@HIDDEN>,
 Brennan Vincent <brennan@HIDDEN>, 77212 <at> debbugs.gnu.org,
 divya@HIDDEN, steve@HIDDEN
References: <87msdbhcfw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature"; boundary="7n0GDPqJbAVnpUAu"
Content-Disposition: inline
In-Reply-To: <87msdbhcfw.fsf@HIDDEN>
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-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--7n0GDPqJbAVnpUAu
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Does it have to be the original checksums or will correct checksums
work?  Currently to save time we set all the checksums to
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (an
empty file).

What changed in rust-analyzer 1.82 that made it change? Or was that part
of the error message?

On Sun, Mar 23, 2025 at 10:41:23AM -0700, Brennan Vincent wrote:
> * gnu/packages/rust.scm (rust): install stdlib manifest with original che=
cksums
>=20
> Change-Id: I1100ffe4ff67c8e2026e802fc3902ec218e2efee
> ---
>  gnu/packages/rust.scm | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>=20
> diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
> index 3fd7fc3433..04d88f6a82 100644
> --- a/gnu/packages/rust.scm
> +++ b/gnu/packages/rust.scm
> @@ -1476,12 +1476,28 @@ (define-public rust
>                   (invoke "./x.py" "install" "clippy")
>                   (invoke "./x.py" "install" "rust-analyzer")
>                   (invoke "./x.py" "install" "rustfmt")))
> +             (add-before 'patch-cargo-checksums 'save-old-library-manife=
st
> +               (lambda _
> +                 (copy-file "library/Cargo.lock" ".old-library-manifest"=
)))
>               (add-after 'install 'install-rust-src
>                 (lambda* (#:key outputs #:allow-other-keys)
>                   (let ((out (assoc-ref outputs "rust-src"))
>                         (dest "/lib/rustlib/src/rust"))
>                     (mkdir-p (string-append out dest))
>                     (copy-recursively "library" (string-append out dest "=
/library"))
> +                   ;; rust-analyzer needs the original checksums; otherw=
ise,
> +                   ;; it fails to cargo manifest in the stdlib, and then
> +                   ;; analysis/inference involving stdlib structs doesn'=
t work.
> +                   ;;
> +                   ;; For example, in the following trivial program:
> +                   ;;=20
> +                   ;; fn main() {
> +                   ;;     let x =3D Vec::<usize>::new();
> +                   ;; }
> +                   ;;
> +                   ;; rust-analyzer since versino 1.82
> +                   ;; can't infer the type of x unless the following lin=
e is present.
> +                   (copy-file ".old-library-manifest" (string-append out=
 dest "/library/Cargo.lock"))
>                     (copy-recursively "src" (string-append out dest "/src=
")))))
>               (add-before 'install 'remove-uninstall-script
>                 (lambda _
>=20
> base-commit: b54a9ca849f013300c633fb79d80bc754f6b28a2
> prerequisite-patch-id: 2b36f42a4b79ce79d12ce58a03de81902054f2a1
> --=20
> 2.49.0
>=20
>=20

--=20
Efraim Flashner   <efraim@HIDDEN>   =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

--7n0GDPqJbAVnpUAu
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmfisSYACgkQQarn3Mo9
g1GWjw/+PQ9oembgemmN3sIRhFbpuY96JU0H/Wtkj3fr0FmC3gS49AN/qydNUDOK
Ao18qDeOCI8rBx21hPQKK6JZRdaNUEkdSbcfIzk1yJCSmu/rhP7wirVn3uzVHvr9
VM/5wHe0Ka8gx+tTPkMnhC6IUb8gpT/aG96TeA7POY2k1Mf1G4P4LGOUebNEM6Im
dth0cV+oWC4Q9JPun8GZAThdanuhXxc+fgUPuc0gp8JQ/+adZN4pTKIy6gaPdjUq
uSjyPuOWbnB8BFGbd/GDxATO/y/G16h5A2xHCshptJ7S3OdvxfpY/aX2MpHXaE/I
uo4+GVRM/nUifiVx/C6Y4iZsYP9J92CJsT7XoUK9XHCM9FsHrsGkZrxLjqxSykGj
bclIrSZcdsMszRcySoudL6N2P0OARHKTWmMyGXl9upfEGLuKT3RtAP4IaLxB0SVd
6fTV/u2EqOv4n0J1zDrMLgBJnRDUfCYMqyr/ahRuzZJ5yJlm2AUcUmijInT5cAHK
TltlShXI2qlaSNw6p57b1eOl+TrBR4Zl8lgOEu7l0jIyh93tRkYtCZtl/QojMrSC
Mwp7ts362q39BiWfKKUtO7+TsYcFJraFFUwV4+2c5RBNAHNn+0WeMvb1CshV30Ki
KcUe56MLkmg2b33jLkjFWk0DgBokXd8VN/pWr1ANAHwHmvAWnnQ=
=mO2x
-----END PGP SIGNATURE-----

--7n0GDPqJbAVnpUAu--




Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#77212] [PATCH] gnu: rust: install stdlib manifest with original checksums
Resent-From: "Brennan Vincent" <brennan@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Wed, 26 Mar 2025 18:49:02 +0000
Resent-Message-ID: <handler.77212.B77212.174301488225660 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77212
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Efraim Flashner <efraim@HIDDEN>
Cc: 77212 <at> debbugs.gnu.org, steve@HIDDEN, divya@HIDDEN
Received: via spool by 77212-submit <at> debbugs.gnu.org id=B77212.174301488225660
          (code B ref 77212); Wed, 26 Mar 2025 18:49:02 +0000
Received: (at 77212) by debbugs.gnu.org; 26 Mar 2025 18:48:02 +0000
Received: from localhost ([127.0.0.1]:44378 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1txVnF-0006fe-VU
	for submit <at> debbugs.gnu.org; Wed, 26 Mar 2025 14:48:02 -0400
Received: from smtp.umanwizard.com ([54.203.248.109]:59357)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <brennan@HIDDEN>) id 1txVnC-0006fG-Dp
 for 77212 <at> debbugs.gnu.org; Wed, 26 Mar 2025 14:47:59 -0400
Received: from localhost ([184.191.16.215]) by smtp.umanwizard.com ;
 26 Mar 2025 18:47:40 +0000
X-Fes-Received-For: 77212 <at> debbugs.gnu.org
X-Fes-Received-From: <brennan@HIDDEN>
From: "Brennan Vincent" <brennan@HIDDEN>
In-Reply-To: <Z-KxKiSLXnj9aH9L@3900XT>
References: <87msdbhcfw.fsf@HIDDEN>
 <Z-KxKiSLXnj9aH9L@3900XT>
Date: Wed, 26 Mar 2025 11:47:37 -0700
Message-ID: <87msd7633q.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Fes-Encrypted: true
X-Fes-Ehlo-Domain: localhost
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Efraim Flashner <efraim@HIDDEN> writes:

> Does it have to be the original checksums or will correct checksums
> work?  Currently to save time we set all the checksums to
> e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (an
> empty file).

Yes, sorry for being imprecise -- it needs to be the correct checksums,
which in the case of the stdlib seems to be the same as the original
checksums. I suppose if that ever changes we would need to change this
to actually apply re-checksum everything.

>
> What changed in rust-analyzer 1.82 that made it change? Or was that part
> of the error message?

Before 1.82, rust-analyzer analyzed the stdlib in a different way, which
didn't require it to run `cargo metadata`, which is the step that fails
here (because cargo bails out with an error if the checksums are wrong).

>
> On Sun, Mar 23, 2025 at 10:41:23AM -0700, Brennan Vincent wrote:
>> * gnu/packages/rust.scm (rust): install stdlib manifest with original ch=
ecksums
>>=20
>> Change-Id: I1100ffe4ff67c8e2026e802fc3902ec218e2efee
>> ---
>>  gnu/packages/rust.scm | 16 ++++++++++++++++
>>  1 file changed, 16 insertions(+)
>>=20
>> diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
>> index 3fd7fc3433..04d88f6a82 100644
>> --- a/gnu/packages/rust.scm
>> +++ b/gnu/packages/rust.scm
>> @@ -1476,12 +1476,28 @@ (define-public rust
>>                   (invoke "./x.py" "install" "clippy")
>>                   (invoke "./x.py" "install" "rust-analyzer")
>>                   (invoke "./x.py" "install" "rustfmt")))
>> +             (add-before 'patch-cargo-checksums 'save-old-library-manif=
est
>> +               (lambda _
>> +                 (copy-file "library/Cargo.lock" ".old-library-manifest=
")))
>>               (add-after 'install 'install-rust-src
>>                 (lambda* (#:key outputs #:allow-other-keys)
>>                   (let ((out (assoc-ref outputs "rust-src"))
>>                         (dest "/lib/rustlib/src/rust"))
>>                     (mkdir-p (string-append out dest))
>>                     (copy-recursively "library" (string-append out dest =
"/library"))
>> +                   ;; rust-analyzer needs the original checksums; other=
wise,
>> +                   ;; it fails to cargo manifest in the stdlib, and then
>> +                   ;; analysis/inference involving stdlib structs doesn=
't work.
>> +                   ;;
>> +                   ;; For example, in the following trivial program:
>> +                   ;;=20
>> +                   ;; fn main() {
>> +                   ;;     let x =3D Vec::<usize>::new();
>> +                   ;; }
>> +                   ;;
>> +                   ;; rust-analyzer since versino 1.82
>> +                   ;; can't infer the type of x unless the following li=
ne is present.
>> +                   (copy-file ".old-library-manifest" (string-append ou=
t dest "/library/Cargo.lock"))
>>                     (copy-recursively "src" (string-append out dest "/sr=
c")))))
>>               (add-before 'install 'remove-uninstall-script
>>                 (lambda _
>>=20
>> base-commit: b54a9ca849f013300c633fb79d80bc754f6b28a2
>> prerequisite-patch-id: 2b36f42a4b79ce79d12ce58a03de81902054f2a1
>> --=20
>> 2.49.0
>>=20
>>=20
>
> --=20
> Efraim Flashner   <efraim@HIDDEN>   =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 unencrypt=
ed





Message sent to guix-patches@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: [bug#77212] [PATCH] gnu: rust: install stdlib manifest with original checksums
Resent-From: "Brennan Vincent" <brennan@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: guix-patches@HIDDEN
Resent-Date: Fri, 04 Apr 2025 19:27:02 +0000
Resent-Message-ID: <handler.77212.B77212.174379476530373 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 77212
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: Efraim Flashner <efraim@HIDDEN>
Cc: 77212 <at> debbugs.gnu.org, divya@HIDDEN, steve@HIDDEN
Received: via spool by 77212-submit <at> debbugs.gnu.org id=B77212.174379476530373
          (code B ref 77212); Fri, 04 Apr 2025 19:27:02 +0000
Received: (at 77212) by debbugs.gnu.org; 4 Apr 2025 19:26:05 +0000
Received: from localhost ([127.0.0.1]:40185 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0mg0-0007to-L7
	for submit <at> debbugs.gnu.org; Fri, 04 Apr 2025 15:26:05 -0400
Received: from smtp.umanwizard.com ([54.203.248.109]:12005)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <brennan@HIDDEN>) id 1u0mfx-0007tA-Rs
 for 77212 <at> debbugs.gnu.org; Fri, 04 Apr 2025 15:26:02 -0400
Received: from localhost ([184.191.16.215]) by smtp.umanwizard.com ;
 4 Apr 2025 19:25:53 +0000
X-Fes-Received-For: 77212 <at> debbugs.gnu.org
X-Fes-Received-From: <brennan@HIDDEN>
From: "Brennan Vincent" <brennan@HIDDEN>
In-Reply-To: <87msd7633q.fsf@HIDDEN>
References: <87msdbhcfw.fsf@HIDDEN>
 <Z-KxKiSLXnj9aH9L@3900XT>
 <87msd7633q.fsf@HIDDEN>
Date: Fri, 04 Apr 2025 12:25:50 -0700
Message-ID: <87y0wfhgox.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Fes-Encrypted: true
X-Fes-Ehlo-Domain: localhost
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ping.

Efraim, any thoughts on this?

"Brennan Vincent" <brennan@HIDDEN> writes:

> Efraim Flashner <efraim@HIDDEN> writes:
>
>> Does it have to be the original checksums or will correct checksums
>> work?  Currently to save time we set all the checksums to
>> e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (an
>> empty file).
>
> Yes, sorry for being imprecise -- it needs to be the correct checksums,
> which in the case of the stdlib seems to be the same as the original
> checksums. I suppose if that ever changes we would need to change this
> to actually apply re-checksum everything.
>
>>
>> What changed in rust-analyzer 1.82 that made it change? Or was that part
>> of the error message?
>
> Before 1.82, rust-analyzer analyzed the stdlib in a different way, which
> didn't require it to run `cargo metadata`, which is the step that fails
> here (because cargo bails out with an error if the checksums are wrong).
>
>>
>> On Sun, Mar 23, 2025 at 10:41:23AM -0700, Brennan Vincent wrote:
>>> * gnu/packages/rust.scm (rust): install stdlib manifest with original c=
hecksums
>>>=20
>>> Change-Id: I1100ffe4ff67c8e2026e802fc3902ec218e2efee
>>> ---
>>>  gnu/packages/rust.scm | 16 ++++++++++++++++
>>>  1 file changed, 16 insertions(+)
>>>=20
>>> diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
>>> index 3fd7fc3433..04d88f6a82 100644
>>> --- a/gnu/packages/rust.scm
>>> +++ b/gnu/packages/rust.scm
>>> @@ -1476,12 +1476,28 @@ (define-public rust
>>>                   (invoke "./x.py" "install" "clippy")
>>>                   (invoke "./x.py" "install" "rust-analyzer")
>>>                   (invoke "./x.py" "install" "rustfmt")))
>>> +             (add-before 'patch-cargo-checksums 'save-old-library-mani=
fest
>>> +               (lambda _
>>> +                 (copy-file "library/Cargo.lock" ".old-library-manifes=
t")))
>>>               (add-after 'install 'install-rust-src
>>>                 (lambda* (#:key outputs #:allow-other-keys)
>>>                   (let ((out (assoc-ref outputs "rust-src"))
>>>                         (dest "/lib/rustlib/src/rust"))
>>>                     (mkdir-p (string-append out dest))
>>>                     (copy-recursively "library" (string-append out dest=
 "/library"))
>>> +                   ;; rust-analyzer needs the original checksums; othe=
rwise,
>>> +                   ;; it fails to cargo manifest in the stdlib, and th=
en
>>> +                   ;; analysis/inference involving stdlib structs does=
n't work.
>>> +                   ;;
>>> +                   ;; For example, in the following trivial program:
>>> +                   ;;=20
>>> +                   ;; fn main() {
>>> +                   ;;     let x =3D Vec::<usize>::new();
>>> +                   ;; }
>>> +                   ;;
>>> +                   ;; rust-analyzer since versino 1.82
>>> +                   ;; can't infer the type of x unless the following l=
ine is present.
>>> +                   (copy-file ".old-library-manifest" (string-append o=
ut dest "/library/Cargo.lock"))
>>>                     (copy-recursively "src" (string-append out dest "/s=
rc")))))
>>>               (add-before 'install 'remove-uninstall-script
>>>                 (lambda _
>>>=20
>>> base-commit: b54a9ca849f013300c633fb79d80bc754f6b28a2
>>> prerequisite-patch-id: 2b36f42a4b79ce79d12ce58a03de81902054f2a1
>>> --=20
>>> 2.49.0
>>>=20
>>>=20
>>
>> --=20
>> Efraim Flashner   <efraim@HIDDEN>   =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 unencryp=
ted






Last modified: Fri, 4 Apr 2025 19:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.