GNU bug report logs -
#77212
[PATCH] gnu: rust: install stdlib manifest with original checksums
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77212 in the body.
You can then email your comments to 77212 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#77212
; Package
guix-patches
.
(Sun, 23 Mar 2025 17:42:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Brennan Vincent <brennan <at> umanwizard.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sun, 23 Mar 2025 17:42:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* 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
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77212
; Package
guix-patches
.
(Tue, 25 Mar 2025 13:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77212 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 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
>
>
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77212
; Package
guix-patches
.
(Wed, 26 Mar 2025 18:49:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 77212 <at> debbugs.gnu.org (full text, mbox):
Efraim Flashner <efraim <at> flashner.co.il> 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 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
>>
>>
>
> --
> Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
> Confidentiality cannot be guaranteed on emails sent or received unencrypted
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77212
; Package
guix-patches
.
(Fri, 04 Apr 2025 19:27:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 77212 <at> debbugs.gnu.org (full text, mbox):
Ping.
Efraim, any thoughts on this?
"Brennan Vincent" <brennan <at> umanwizard.com> writes:
> Efraim Flashner <efraim <at> flashner.co.il> 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 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
>>>
>>>
>>
>> --
>> Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
>> GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
>> Confidentiality cannot be guaranteed on emails sent or received unencrypted
Reply sent
to
Efraim Flashner <efraim <at> flashner.co.il>
:
You have taken responsibility.
(Mon, 05 May 2025 06:04:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Brennan Vincent <brennan <at> umanwizard.com>
:
bug acknowledged by developer.
(Mon, 05 May 2025 06:04:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 77212-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Apr 04, 2025 at 12:25:50PM -0700, Brennan Vincent wrote:
> Ping.
>
> Efraim, any thoughts on this?
>
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™ better for everyone.
--
Efraim Flashner <efraim <at> flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 02 Jun 2025 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.