From unknown Thu Aug 14 21:44:35 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77212 <77212@debbugs.gnu.org> To: bug#77212 <77212@debbugs.gnu.org> Subject: Status: [PATCH] gnu: rust: install stdlib manifest with original checksums Reply-To: bug#77212 <77212@debbugs.gnu.org> Date: Fri, 15 Aug 2025 04:44:35 +0000 retitle 77212 [PATCH] gnu: rust: install stdlib manifest with original chec= ksums reassign 77212 guix-patches submitter 77212 Brennan Vincent severity 77212 normal tag 77212 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 23 13:41:51 2025 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 ) id 1twPKZ-0006E8-Ce for submit@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 ) id 1twPKW-0006Dl-A7 for submit@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 ) id 1twPKJ-0002dc-0D for guix-patches@gnu.org; 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 ) id 1twPKF-0003WP-Oy for guix-patches@gnu.org; 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@gnu.org X-Fes-Received-From: From: Brennan Vincent To: guix-patches@gnu.org, efraim@flashner.co.il Subject: [PATCH] gnu: rust: install stdlib manifest with original checksums X-Envelope-From: d0948f56eb1c8adde91008a23e408d9fde88278a Mon Sep 17 00:00:00 2001 Date: Sun, 23 Mar 2025 10:41:23 -0700 Message-ID: <87msdbhcfw.fsf@eugene.mail-host-address-is-not-set> 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@umanwizard.com; 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-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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::::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 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 25 09:35:51 2025 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 ) id 1tx4Rb-0003xI-5M for submit@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 ) id 1tx4RX-0003ww-IW for 77212@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@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 To: Brennan Vincent Subject: Re: [PATCH] gnu: rust: install stdlib manifest with original checksums Message-ID: Mail-Followup-To: Efraim Flashner , Brennan Vincent , 77212@debbugs.gnu.org, divya@subvertising.org, steve@futurile.net References: <87msdbhcfw.fsf@eugene.mail-host-address-is-not-set> 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@eugene.mail-host-address-is-not-set> 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-Debbugs-Envelope-To: 77212 Cc: 77212@debbugs.gnu.org, steve@futurile.net, divya@subvertising.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" 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::::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 =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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 26 14:48:02 2025 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 ) id 1txVnF-0006fe-VU for submit@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 ) id 1txVnC-0006fG-Dp for 77212@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@debbugs.gnu.org X-Fes-Received-From: From: "Brennan Vincent" To: Efraim Flashner Subject: Re: [PATCH] gnu: rust: install stdlib manifest with original checksums In-Reply-To: References: <87msdbhcfw.fsf@eugene.mail-host-address-is-not-set> Date: Wed, 26 Mar 2025 11:47:37 -0700 Message-ID: <87msd7633q.fsf@eugene.mail-host-address-is-not-set> 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-Debbugs-Envelope-To: 77212 Cc: 77212@debbugs.gnu.org, steve@futurile.net, divya@subvertising.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Efraim Flashner 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::::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 =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 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 04 15:26:05 2025 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 ) id 1u0mg0-0007to-L7 for submit@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 ) id 1u0mfx-0007tA-Rs for 77212@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@debbugs.gnu.org X-Fes-Received-From: From: "Brennan Vincent" To: Efraim Flashner Subject: Re: [bug#77212] [PATCH] gnu: rust: install stdlib manifest with original checksums In-Reply-To: <87msd7633q.fsf@eugene.mail-host-address-is-not-set> References: <87msdbhcfw.fsf@eugene.mail-host-address-is-not-set> <87msd7633q.fsf@eugene.mail-host-address-is-not-set> Date: Fri, 04 Apr 2025 12:25:50 -0700 Message-ID: <87y0wfhgox.fsf@eugene.mail-host-address-is-not-set> 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-Debbugs-Envelope-To: 77212 Cc: 77212@debbugs.gnu.org, divya@subvertising.org, steve@futurile.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ping. Efraim, any thoughts on this? "Brennan Vincent" writes: > Efraim Flashner 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::::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 =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 From debbugs-submit-bounces@debbugs.gnu.org Mon May 05 02:03:28 2025 Received: (at 77212-done) by debbugs.gnu.org; 5 May 2025 06:03:28 +0000 Received: from localhost ([127.0.0.1]:37742 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uBovI-0002I8-EV for submit@debbugs.gnu.org; Mon, 05 May 2025 02:03:28 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:45079) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1uBovG-0002Hm-2Z for 77212-done@debbugs.gnu.org; Mon, 05 May 2025 02:03:26 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-43cfebc343dso24982795e9.2 for <77212-done@debbugs.gnu.org>; Sun, 04 May 2025 23:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746425000; x=1747029800; 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=bV/BcGOPkj1WBweQehmtye0OEk92wJPstvTl0I9dZI8=; b=QVgjDLSFRS8Z0a9wq71VSo7DIT8dTf2nu0g/3YI0C2lt5iawPEIaxqcsRBif0ShPI/ AYFbE9fxwQhOdotPDTodmVmHmSM8Zk0K607C1QfY1X5uYHKLb7Y+uTXSw1MubiKDqgPF IGCqZjY88FD9n8sxpiVOGkJBnRovdbCHxl7bj6Xpg3lkVjWIni/OvyEoUSX+OGAJy4y5 2g3FshJxu8lxw4jy9L91wvXhlg2VPCDpIYhK957F7mV9ygABwDJdFgVg2gxu88yPSrgT fTZS3qhamxeSj8K5GyxUzpFLmPwQ4zGWKItGhUkOA/ZTHFr27/rMNvtvbt1YtHG0Ol2B DIeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746425000; x=1747029800; 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=bV/BcGOPkj1WBweQehmtye0OEk92wJPstvTl0I9dZI8=; b=ijOt6ToJUpvA7znqmaZb5rie29+NraJPnrYwAGFxMXKHxwzWxQktXFBktoTLIpyKPR tKv0fXIoq1rXpGZmn28BDQ841IFh0+PwjtBRM/yfsxVDg1uI2Ilt8hoqmVGTdF83qR5Q Q7oCqR2XKZWzIfjPE17jQxHtN+Ve4Dvze9z+MiUa78xG0ai60k+idJ0YAeOOUbFm1njk 2kpjHN9/FzUCFlAB7LqKFKkzkn50L0dTNVP6hFqLsERQvF1/SRdpHg2mbv5XvqX4uvwH j8Kig5edlyxjNul2VV1nzk8NASX3CvtN/Sd4hCicpLgn3fAOGYk1kCPHo6Ip79eMKRgU 1q7g== X-Gm-Message-State: AOJu0YzgPEvh3O854pVFcGdzsfnyM4zS5vKZm+jjF0q8WyR3l1SX3GyS Lee32b1z2v09O2OWnqwsYRokRn2qCLv9UEi45OZPYxIDXWzlwrAT X-Gm-Gg: ASbGnctEpgtw+BDARLavz6lUHhVVIkslbkA+XT50H8B/ShBbW9LYTCbieJTTgnATbwq aX0pN0dX7DllEd3aRcCpHys9A0l2oh3k2JVA7nsH8NULwk1rOswzItshHz1G1jqAUK/r8USF7II KQxW43VvVI5yk3vrrCzRzfoNes13KpzV6rM5CNCBITf/yAkCpHzLWC3xEt9I5pbf+JGaZC8SZbc pr+SFvEZP9WvcelpLgyeRRbSMXK6AmoMVXQK7SkP54Q6opoPMmaTSZ1vaLYQ5XHhAA224vdbMKR qUl7gGsmhizSuK2Lrobpb6QpOgrmgzue8svwjpM6HA== X-Google-Smtp-Source: AGHT+IEJDdpGLRNj7DxPw6Hr1Tc0Qy897Q0HP0Tzzwu7AZ58imHJ1a4wGf9GwIraCP/BgVhKboDAZA== X-Received: by 2002:a05:600c:3b18:b0:43d:fa58:81d3 with SMTP id 5b1f17b1804b1-441bbf3d2f1mr77617535e9.32.1746424999381; Sun, 04 May 2025 23:03:19 -0700 (PDT) Received: from localhost ([188.120.128.159]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-441b8a31695sm122896735e9.40.2025.05.04.23.03.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 May 2025 23:03:18 -0700 (PDT) Date: Mon, 5 May 2025 09:03:16 +0300 From: Efraim Flashner To: Brennan Vincent Subject: Re: [bug#77212] [PATCH] gnu: rust: install stdlib manifest with original checksums Message-ID: Mail-Followup-To: Efraim Flashner , Brennan Vincent , 77212-done@debbugs.gnu.org, steve@futurile.net, divya@subvertising.org References: <87msdbhcfw.fsf@eugene.mail-host-address-is-not-set> <87msd7633q.fsf@eugene.mail-host-address-is-not-set> <87y0wfhgox.fsf@eugene.mail-host-address-is-not-set> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Hgj2EfCnLOu5chId" Content-Disposition: inline In-Reply-To: <87y0wfhgox.fsf@eugene.mail-host-address-is-not-set> 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-Debbugs-Envelope-To: 77212-done Cc: 77212-done@debbugs.gnu.org, divya@subvertising.org, steve@futurile.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Hgj2EfCnLOu5chId Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 04, 2025 at 12:25:50PM -0700, Brennan Vincent wrote: > Ping. >=20 > Efraim, any thoughts on this? >=20 Sorry, I was away visiting family for most of April and just recently got back. Patch pushed to the rust-team branch. Hopefully it makes Doing Rust Things=E2=84=A2 better for everyone. --=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 --Hgj2EfCnLOu5chId Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmgYVKQACgkQQarn3Mo9 g1H9Yg/+IrgsFkZAYQ+JcSBeFHZ7ECMyduIubUCBIsabDqVy3glpWgiYxWkKGw2x uFYXR9OEiczPpHpmBCcCu3De6LMgt5MRaf4IWfwci/Lx7QQuGaItKijKagQhFp6z qmVkHq/hhMItSRXe1cc/fxsrgjuXe2xiBK7cNk/C9n2opJ5lY+agK33dnO+LyZLX M2B1Igtq6AXGCDEfJM4OltzBusxuo1lMx/Ecd5Ys2irjz39BKaEmn9QdRJt7jVAJ dhaND2GHg4wsaCzpa8VNogurtjJH1uSXVwgZwA57Bqy06es5li4por3+OeN+Jzl4 bnN0DO+ruzV7FCPg8vlGJ/f5wF7wn5N3GGdMfVI7n/d+6hHLjv3PJsEunLQ1aTDN YoVCEBGQvWX39/IqyHtOKvDC3RlN4N9inoStf5AWLZ1DjIGvhdaH/Bn9s7LmU/7f ZnFno3J+j8re/kD2RMYe8vG79tmybqzRZtTWuoy+yWHW5Kfl4NtOk/mJkIJ5rfPB Pt075SEbjl42UK+G4s/XqctE3qa5CbQtqQubz7iEyrHBO28a6q6VcUohzjQ4/LC4 pLTxgRX2SWarAR/1/h2u7gsOveTX6CQeaAuAntmIDVjubeZ8L+W3xWVx95NSZry0 /yyh184zOYU6DXXt57zhWt6pcFwunGIduqFeIRX03ouhI+X6IKc= =iADm -----END PGP SIGNATURE----- --Hgj2EfCnLOu5chId-- From unknown Thu Aug 14 21:44:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 02 Jun 2025 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator