[PATCH] gnu: rust-analyzer: Fix build of rust-analyzer.

  • Done
  • quality assurance status badge
Details
3 participants
  • Distopico
  • Liliana Marie Prikler
  • Ludovic Courtès
Owner
unassigned
Submitted by
Distopico
Severity
normal
D
D
Distopico wrote on 19 Jul 2023 04:26
(address . guix-patches@gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230719022804.19613-1-distopico@riseup.net
Fixes build of rust-analyzer version 2022-01-10 that requires pined version of
rust-notify which is `rust-notify-pre.13`.

I'm working to update `rust-analizer` to 2023-07-17 but it require add more
packages and update other, it's a WIP but for now this is just to fix the build.

* gnu/packages/crates-io.scm (rust-notify-5-pre.13): New variable.
* gnu/packages/rust-apps.scm
---
gnu/packages/crates-io.scm | 13 +++++++++++++
gnu/packages/rust-apps.scm | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)

Toggle diff (41 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index f9574e2797..5dd9e0d349 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -38927,6 +38927,19 @@ (define-public rust-notify-5
notification library.")
(license (list license:cc0 license:artistic2.0))))
+(define-public rust-notify-5-pre.13
+ (package
+ (inherit rust-notify-5)
+ (name "rust-notify")
+ (version "5.0.0-pre.13")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "notify" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0za8mpacxkr62fii5h7ny4h396y0m8myd3hf08njqdg2h21kap94"))))))
+
(define-public rust-notify-4
(package
(inherit rust-notify-5)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 8c29969712..0571af498c 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1775,7 +1775,7 @@ (define-public rust-analyzer
("rust-memmap2" ,rust-memmap2-0.5)
("rust-mimalloc" ,rust-mimalloc-0.1)
("rust-miow" ,rust-miow-0.4)
- ("rust-notify" ,rust-notify-5)
+ ("rust-notify" ,rust-notify-5-pre.13)
("rust-object" ,rust-object-0.28)
("rust-once-cell" ,rust-once-cell-1)
("rust-parking-lot" ,rust-parking-lot-0.11)

base-commit: 917a299831361f253ea664f009176b4bbe06900a
--
2.41.0
L
L
Liliana Marie Prikler wrote on 29 Jul 2023 20:44
712b78e8a1d4ca99fa1aa2efc5d0220907f19b96.camel@gmail.com
Am Dienstag, dem 18.07.2023 um 21:26 -0500 schrieb Distopico:
Toggle quote (1 lines)
> Fixes build of rust-analyzer version 2022-01-10 that requires pined
pinned
Toggle quote (4 lines)
> version of rust-notify which is `rust-notify-pre.13`.
>
> I'm working to update `rust-analizer` to 2023-07-17 but it require
> add more
Please stick to one spelling of rust-analyzer. Also, comments that
shouldn't end up in the commit messages go below the "---" line.
Toggle quote (5 lines)
> packages and update other, it's a WIP but for now this is just to fix
> the build.
>
> * gnu/packages/crates-io.scm (rust-notify-5-pre.13): New variable.
> * gnu/packages/rust-apps.scm
The ChangeLog here is incomplete. Also, I'm pretty sure this would be
a two-patch series.
Toggle quote (27 lines)
> ---
>  gnu/packages/crates-io.scm | 13 +++++++++++++
>  gnu/packages/rust-apps.scm |  2 +-
>  2 files changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
> index f9574e2797..5dd9e0d349 100644
> --- a/gnu/packages/crates-io.scm
> +++ b/gnu/packages/crates-io.scm
> @@ -38927,6 +38927,19 @@ (define-public rust-notify-5
>  notification library.")
>      (license (list license:cc0 license:artistic2.0))))
>  
> +(define-public rust-notify-5-pre.13
> +  (package
> +    (inherit rust-notify-5)
> +    (name "rust-notify")
> +    (version "5.0.0-pre.13")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (crate-uri "notify" version))
> +              (file-name (string-append name "-" version ".tar.gz"))
> +              (sha256
> +               (base32
> +               
> "0za8mpacxkr62fii5h7ny4h396y0m8myd3hf08njqdg2h21kap94"))))))
> +
LGTM, but idk anything about rust.
Toggle quote (16 lines)
>  (define-public rust-notify-4
>    (package
>      (inherit rust-notify-5)
> diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
> index 8c29969712..0571af498c 100644
> --- a/gnu/packages/rust-apps.scm
> +++ b/gnu/packages/rust-apps.scm
> @@ -1775,7 +1775,7 @@ (define-public rust-analyzer
>          ("rust-memmap2" ,rust-memmap2-0.5)
>          ("rust-mimalloc" ,rust-mimalloc-0.1)
>          ("rust-miow" ,rust-miow-0.4)
> -        ("rust-notify" ,rust-notify-5)
> +        ("rust-notify" ,rust-notify-5-pre.13)
>          ("rust-object" ,rust-object-0.28)
>          ("rust-once-cell" ,rust-once-cell-1)
>          ("rust-parking-lot" ,rust-parking-lot-0.11)
Same here.

Cheers
D
D
Distopico wrote on 5 Aug 2023 04:27
[PATCH 0/2] Fix build of rust-analyzer v2022-01-10.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230805023315.14971-1-distopico@riseup.net
Comments addressed, thank you for the feedback.

Distopico (2):
gnu: Add rust-notify-5-pre.13.
gnu: rust-analyzer: Fix build of version 2022-01-10.

gnu/packages/crates-io.scm | 13 +++++++++++++
gnu/packages/rust-apps.scm | 2 +-
2 files changed, 14 insertions(+), 1 deletion(-)


base-commit: 42ae42cf41e8f5e88422e30d801251a3427d7f3b
--
2.41.0
D
D
Distopico wrote on 5 Aug 2023 04:40
[PATCH 1/2] gnu: Add rust-notify-5-pre.13.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230805024139.21189-1-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-notify-5-pre.13): New variable.

This pinned version is required by `rust-analyzer` version `2022-01-10`.
---
* gnu/packages/crates-io.scm (rust-notify-5-pre.13): New variable.

This pinned version is required by `rust-analyzer` version `2022-01-10`.

gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index f9574e2797..5dd9e0d349 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -38927,6 +38927,19 @@ (define-public rust-notify-5
notification library.")
(license (list license:cc0 license:artistic2.0))))
+(define-public rust-notify-5-pre.13
+ (package
+ (inherit rust-notify-5)
+ (name "rust-notify")
+ (version "5.0.0-pre.13")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "notify" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0za8mpacxkr62fii5h7ny4h396y0m8myd3hf08njqdg2h21kap94"))))))
+
(define-public rust-notify-4
(package
(inherit rust-notify-5)
--
2.41.0
D
D
Distopico wrote on 5 Aug 2023 04:40
[PATCH 2/2] gnu: rust-analyzer: Fix build of version 2022-01-10.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230805024139.21189-2-distopico@riseup.net
* gnu/packages/rust-apps.scm (rust-analyzer): Update dependency rust-notify-5-pre.13.

This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned
version of `rust-notify` (`rust-notify-5-pre.13`) to compile.
---
* gnu/packages/rust-apps.scm (rust-analyzer): Update dependency rust-notify-5-pre.13.

This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned
version of `rust-notify` (`rust-notify-5-pre.13`) to compile.

gnu/packages/rust-apps.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 8c29969712..0571af498c 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1775,7 +1775,7 @@ (define-public rust-analyzer
("rust-memmap2" ,rust-memmap2-0.5)
("rust-mimalloc" ,rust-mimalloc-0.1)
("rust-miow" ,rust-miow-0.4)
- ("rust-notify" ,rust-notify-5)
+ ("rust-notify" ,rust-notify-5-pre.13)
("rust-object" ,rust-object-0.28)
("rust-once-cell" ,rust-once-cell-1)
("rust-parking-lot" ,rust-parking-lot-0.11)
--
2.41.0
L
L
Ludovic Courtès wrote on 16 Aug 2023 23:09
Re: bug#64720: [PATCH] gnu: rust-analyzer: Fix build of rust-analyzer.
(name . Distopico)(address . distopico@riseup.net)
87fs4i3d9f.fsf_-_@gnu.org
Hi,

Distopico <distopico@riseup.net> skribis:

Toggle quote (5 lines)
> * gnu/packages/rust-apps.scm (rust-analyzer): Update dependency rust-notify-5-pre.13.
>
> This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned
> version of `rust-notify` (`rust-notify-5-pre.13`) to compile.

When applied on top of 07dc3d024763f3768002e422e0d60aac0c1b94ac, I get
this on x86_64-linux:

Toggle snippet (20 lines)
test abis::abi_1_58::rustc_server::tests::test_rustc_server_literals ... ok
test abis::abi_1_58::rustc_server::tests::test_rustc_server_to_string ... ok
test abis::abi_1_54::rustc_server::tests::test_rustc_server_from_str ... ok
test tests::test_derive_error ... FAILED
test tests::test_attr_macro ... FAILED
test tests::test_derive_empty ... FAILED
test tests::test_fn_like_macro2 ... FAILED
test tests::test_fn_like_macro ... FAILED
memory allocation of 140737312524592 bytes failed
error: test failed, to rerun pass `-p proc_macro_srv --lib`

Caused by:
process didn't exit successfully: `/tmp/guix-build-rust-analyzer-2022-01-10.drv-0/source/target/release/deps/proc_macro_srv-ed08c83337741884 '--skip=tests::test_version_check' '--skip=tests::test_loading_rust_analyzer' '--skip=tests::sourcegen::sourcegen_assists_docs' '--skip=tests::sourcegen_ast::sourcegen_ast' '--skip=tidy::cargo_files_are_tidy' '--skip=tidy::check_licenses' '--skip=tidy::check_merge_commits' '--skip=tidy::check_code_formatting' '--skip=tidy::generate_grammar' '--skip=tidy::generate_assists_tests'` (signal: 6, SIGABRT: process abort signal)
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "cargo" arguments: ("test" "--release" "--" "--skip=tests::test_version_check" "--skip=tests::test_loading_rust_analyzer" "--skip=tests::sourcegen::sourcegen_assists_docs" "--skip=tests::sourcegen_ast::sourcegen_ast" "--skip=tidy::cargo_files_are_tidy" "--skip=tidy::check_licenses" "--skip=tidy::check_merge_commits" "--skip=tidy::check_code_formatting" "--skip=tidy::generate_grammar" "--skip=tidy::generate_assists_tests") exit-status: 101 term-signal: #f stop-signal: #f>
phase `check' failed after 164.4 seconds
command "cargo" "test" "--release" "--" "--skip=tests::test_version_check" "--skip=tests::test_loading_rust_analyzer" "--skip=tests::sourcegen::sourcegen_assists_docs" "--skip=tests::sourcegen_ast::sourcegen_ast" "--skip=tidy::cargo_files_are_tidy" "--skip=tidy::check_licenses" "--skip=tidy::check_merge_commits" "--skip=tidy::check_code_formatting" "--skip=tidy::generate_grammar" "--skip=tidy::generate_assists_tests" failed with status 101
builder for `/gnu/store/qjpz8f8g5x5wx3y1lviz5kyy9hza4msp-rust-analyzer-2022-01-10.drv' failed with exit code 1

Could you take a look?

Thanks,
Ludo’.
D
D
Distopico wrote on 30 Aug 2023 21:50
[PATCH 0/8] gnu: rust-analyzer: Fix build of rust-analyzer.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195027.12095-1-distopico@riseup.net
v1 -> v2: Set required rust version and pin additional dependencies to
required version

Also skip some test that required reust 1.60 but is not possible use that
version due seeveral packages has their dependencies required of
rust-serde-json-1 that was updateto use indexmap2 and need min rust 1.64.

Distopico (8):
gnu: Add rust-notify-5-pre.13.
gnu: rust-analyzer: Fix build of version 2022-01-10.
gnu: Add rust-either-1.6.0.
gnu: Add rust-proc-macro2-1.0.34.
gnu: Add rust-quote-1.0.10.
gnu: Add rust-serde-json-1.0.73.
gnu: Add rust-trybuild-1.0.19.
gnu: rust-analyzer: update required dependencies version

gnu/packages/crates-io.scm | 132 +++++++++++++++++++++++++++++++++++--
gnu/packages/rust-apps.scm | 34 ++++++----
gnu/packages/rust.scm | 6 +-
3 files changed, 149 insertions(+), 23 deletions(-)


base-commit: 74d72046bdc1ed6c859565570d0db58d20c9ddd7
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 1/8] gnu: Add rust-notify-5-pre.13.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-1-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-notify-5-pre.13): New variable.

This pinned version is required by `rust-analyzer` version `2022-01-10`.
---
* gnu/packages/crates-io.scm (rust-notify-5-pre.13): New variable.

This pinned version is required by `rust-analyzer` version `2022-01-10`.

gnu/packages/crates-io.scm | 13 +++++++++++++
1 file changed, 13 insertions(+)

Toggle diff (26 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 77a41a5116..b6e2ac4507 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -41724,6 +41724,19 @@ (define-public rust-notify-5
notification library.")
(license (list license:cc0 license:artistic2.0))))
+(define-public rust-notify-5-pre.13
+ (package
+ (inherit rust-notify-5)
+ (name "rust-notify")
+ (version "5.0.0-pre.13")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "notify" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0za8mpacxkr62fii5h7ny4h396y0m8myd3hf08njqdg2h21kap94"))))))
+
(define-public rust-notify-4
(package
(inherit rust-notify-5)
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 2/8] gnu: rust-analyzer: Fix build of version 2022-01-10.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-2-distopico@riseup.net
* gnu/packages/rust-apps.scm (rust-analyzer): Update dependency
rust-notify-5-pre.13.

This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned
version of `rust-notify` (`rust-notify-5-pre.13`) to compile and
rust >= 1.64.
---
* gnu/packages/rust-apps.scm (rust-analyzer): Update dependency
rust-notify-5-pre.13.

This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned
version of `rust-notify` (`rust-notify-5-pre.13`) to compile and
rust >= 1.64.

gnu/packages/rust-apps.scm | 22 +++++++++++++++-------
gnu/packages/rust.scm | 6 +++---
2 files changed, 18 insertions(+), 10 deletions(-)

Toggle diff (86 lines)
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index a291282325..8c7d8006cc 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1780,9 +1780,10 @@ (define-public rust-analyzer
"1ci85bp8xwqrk8nqr8sh6yj8njgd98nhgnhaks2g00c77wwyra41"))))
(build-system cargo-build-system)
(arguments
- `(#:install-source? #f ; virtual manifest
+ `(#:rust ,rust-1.64
+ #:install-source? #f ; virtual manifest
#:cargo-test-flags
- '("--release" "--"
+ '("--release" "--lib" "--tests" "--"
"--skip=tests::test_version_check" ;it need rustc's version
;; FIXME: Guix's rust does not install source in
;; %out/lib/rustlib/src/rust so "can't load standard library from
@@ -1793,12 +1794,19 @@ (define-public rust-analyzer
"--skip=tests::sourcegen::sourcegen_assists_docs" ;need rustfmt
"--skip=tests::sourcegen_ast::sourcegen_ast" ;same
- "--skip=tidy::cargo_files_are_tidy" ;not needed
"--skip=tidy::check_licenses" ;it runs cargo metadata
"--skip=tidy::check_merge_commits" ;it runs git rev-list
"--skip=tidy::check_code_formatting" ;need rustfmt as cargo fmt
- "--skip=tidy::generate_grammar" ;same
- "--skip=tidy::generate_assists_tests") ;same
+
+ ;; These tests require rust <= 1.60 and too many packages
+ ;; has as dependency rust-serde-json-1 that use indexmap2
+ ;; and it need rust >= 1.64
+ "--skip=tests::list_test_macros"
+ "--skip=tests::test_derive_empty"
+ "--skip=tests::test_attr_macro"
+ "--skip=tests::test_fn_like_macro"
+ "--skip=tests::test_fn_like_macro2"
+ "--skip=tests::test_derive_error")
#:cargo-development-inputs
(("rust-arbitrary" ,rust-arbitrary-1)
("rust-derive-arbitrary" ,rust-derive-arbitrary-1)
@@ -1845,7 +1853,7 @@ (define-public rust-analyzer
("rust-memmap2" ,rust-memmap2-0.5)
("rust-mimalloc" ,rust-mimalloc-0.1)
("rust-miow" ,rust-miow-0.4)
- ("rust-notify" ,rust-notify-5)
+ ("rust-notify" ,rust-notify-5-pre.13)
("rust-object" ,rust-object-0.28)
("rust-once-cell" ,rust-once-cell-1)
("rust-parking-lot" ,rust-parking-lot-0.11)
@@ -1927,7 +1935,7 @@ (define-public rust-analyzer
(chdir "../..")
(install-file "LICENSE-MIT" doc)
(install-file "LICENSE-APACHE" doc)))))))
- (native-inputs (list rust-src))
+ (native-inputs (list rust-src-1.64))
(home-page "https://rust-analyzer.github.io/")
(synopsis "Experimental Rust compiler front-end for IDEs")
(description "Rust-analyzer is a modular compiler frontend for the Rust
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 4ee5ded5de..5cfdeffa81 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -652,7 +652,7 @@ (define rust-1.63
(rust-bootstrapped-package
rust-1.62 "1.63.0" "1l4rrbzhxv88pnfq94nbyb9m6lfnjwixma3mwjkmvvs2aqlq158z"))
-(define rust-1.64
+(define-public rust-1.64
(let ((base-rust
(rust-bootstrapped-package
rust-1.63 "1.64.0" "018j720b2n12slp4xk64jc6shkncd46d621qdyzh2a8s3r49zkdk")))
@@ -891,10 +891,10 @@ (define-public rust
`("procps" ,procps)
(package-native-inputs base-rust))))))
-(define-public rust-src
+(define-public rust-src-1.64
(hidden-package
(package
- (inherit rust)
+ (inherit rust-1.64)
(name "rust-src")
(build-system copy-build-system)
(native-inputs '())
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 3/8] gnu: Add rust-either-1.6.0.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-3-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-either-1.6.0): New variable.
---

* gnu/packages/crates-io.scm (rust-either-1.6.0): New variable.

gnu/packages/crates-io.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (31 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index b6e2ac4507..6a0f4e187d 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -21557,6 +21557,24 @@ (define-public rust-either-1
@code{Right} is a general purpose sum type with two cases.")
(license (list license:expat license:asl2.0))))
+(define-public rust-either-1.6.0
+ (package
+ (inherit rust-either-1)
+ (name "rust-either")
+ (version "1.6.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "either" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0mwl9vngqf5jvrhmhn9x60kr5hivxyjxbmby2pybncxfqhf4z3g7"))))
+ (arguments
+ `(#:cargo-inputs (("rust-serde" ,rust-serde-1))
+ #:cargo-development-inputs (("rust-serde-json" ,rust-serde-json-1.0.73))))))
+
(define-public rust-elf-0.0.10
(package
(name "rust-elf")
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 4/8] gnu: Add rust-proc-macro2-1.0.34.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-4-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-proc-macro2-1.0.34): New variable.
---

* gnu/packages/crates-io.scm (rust-proc-macro2-1.0.34): New variable.

gnu/packages/crates-io.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6a0f4e187d..70918d16d0 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -49419,6 +49419,27 @@ (define-public rust-proc-macro2-1
in terms of the upstream unstable API.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-proc-macro2-1.0.34
+ (package
+ (inherit rust-proc-macro2-1)
+ (name "rust-proc-macro2")
+ (version "1.0.34")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "proc-macro2" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1c93jhwl8lv3hiqqvdhd2d2xhjryh5bqb9w5icr5i7bw1wnfk11g"))))
+ (arguments
+ `(#:cargo-test-flags '("--lib")
+ #:cargo-inputs
+ (("rust-unicode-ident" ,rust-unicode-ident-1))
+ #:cargo-development-inputs
+ (("rust-quote" ,rust-quote-1.0.10)
+ ("rust-rustversion" ,rust-rustversion-1))))))
+
(define-public rust-proc-macro2-0.4
(package
(inherit rust-proc-macro2-1)
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 5/8] gnu: Add rust-quote-1.0.10.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-5-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-quote-1.0.10): New variable.
---

* gnu/packages/crates-io.scm (rust-quote-1.0.10): New variable.

gnu/packages/crates-io.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 70918d16d0..d245b32959 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -51640,6 +51640,25 @@ (define-public rust-quote-1
(description "Quasi-quoting macro quote!(...)")
(license (list license:asl2.0 license:expat))))
+(define-public rust-quote-1.0.10
+ (package
+ (inherit rust-quote-1)
+ (name "rust-quote")
+ (version "1.0.10")
+ (source (origin
+ (method url-fetch)
+ (uri (crate-uri "quote" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "01ff7a76f871ggnby57iagw6499vci4bihcr11g6bqzjlp38rg1q"))))
+ (arguments
+ `(#:cargo-inputs
+ (("rust-proc-macro2" ,rust-proc-macro2-1.0.34))
+ #:cargo-development-inputs
+ (("rust-rustversion" ,rust-rustversion-1)
+ ("rust-trybuild" ,rust-trybuild-1.0.19))))))
+
(define-public rust-quote-0.6
(package
(inherit rust-quote-1)
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 6/8] gnu: Add rust-serde-json-1.0.73.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-6-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-serde-json-1.0.73): New variable.
---

* gnu/packages/crates-io.scm (rust-serde-json-1.0.73): New variable.

gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (39 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d245b32959..a89db5ba46 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -59866,6 +59866,32 @@ (define-public rust-serde-json-1
"This package provides a JSON serialization file format.")
(license (list license:expat license:asl2.0))))
+(define-public rust-serde-json-1.0.73
+ (package
+ (inherit rust-serde-json-1)
+ (name "rust-serde-json")
+ (version "1.0.73")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "serde-json" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "1xbwmzc5j6r1nz62a20w6l9bkwbhzd11vwbdqmzbqcv5pi207gdw"))))
+ (arguments
+ `(#:cargo-inputs
+ (("rust-indexmap" ,rust-indexmap-1.7)
+ ("rust-itoa" ,rust-itoa-1)
+ ("rust-ryu" ,rust-ryu-1)
+ ("rust-serde" ,rust-serde-1))
+ #:cargo-development-inputs
+ (("rust-automod" ,rust-automod-1)
+ ("rust-rustversion" ,rust-rustversion-1)
+ ("rust-serde-bytes" ,rust-serde-bytes-0.11)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-serde-stacker" ,rust-serde-stacker-0.1)
+ ("rust-trybuild" ,rust-trybuild-1))))))
+
(define-public rust-serde-json-0.9
(package
(inherit rust-serde-json-1)
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 7/8] gnu: Add rust-trybuild-1.0.19.
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-7-distopico@riseup.net
* gnu/packages/crates-io.scm (rust-trybuild-1.0.19): New variable.
---

* gnu/packages/crates-io.scm (rust-trybuild-1.0.19): New variable.

gnu/packages/crates-io.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index a89db5ba46..019afc010a 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -73245,6 +73245,29 @@ (define-public rust-trybuild-1
"Test harness for ui tests of compiler diagnostics.")
(license (list license:expat license:asl2.0))))
+(define-public rust-trybuild-1.0.19
+ (package
+ (inherit rust-trybuild-1)
+ (name "rust-trybuild")
+ (version "1.0.19")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "trybuild" version))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32 "0ab7ahdx563n6kbm14pm3qnxq4fp06pz42nh5ii4acvlzycnwdh4"))))
+ (arguments
+ `(#:cargo-inputs
+ (("rust-toml" ,rust-toml-0.5)
+ ("rust-dissimilar" ,rust-dissimilar-1)
+ ("rust-glob" ,rust-glob-0.3)
+ ("rust-lazy-static" ,rust-lazy-static-1)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1.0.73)
+ ("rust-termcolor" ,rust-termcolor-1))
+ #:cargo-development-inputs (("rust-automod" ,rust-automod-1))))))
+
(define-public rust-trybuild2-1
(package
(name "rust-trybuild2")
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 21:58
[PATCH v2 8/8] gnu: rust-analyzer: update required dependencies version
(address . 64720@debbugs.gnu.org)(name . Distopico)(address . distopico@riseup.net)
20230830195955.16158-8-distopico@riseup.net
use pinned versions of different dependencies required by
rust-analyzer@2022-01-10
---
use pinned versions of different dependencies required by
rust-analyzer@2022-01-10

gnu/packages/crates-io.scm | 12 ++++++------
gnu/packages/rust-apps.scm | 12 +++++-------
2 files changed, 11 insertions(+), 13 deletions(-)

Toggle diff (102 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 019afc010a..3c83563c45 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -57560,7 +57560,7 @@ (define-public rust-salsa-0.17
#:cargo-inputs
(("rust-crossbeam-utils"
,rust-crossbeam-utils-0.8)
- ("rust-indexmap" ,rust-indexmap-1)
+ ("rust-indexmap" ,rust-indexmap-1.7)
("rust-lock-api" ,rust-lock-api-0.4)
("rust-log" ,rust-log-0.4)
("rust-oorandom" ,rust-oorandom-11.1)
@@ -59960,7 +59960,7 @@ (define-public rust-serde-path-to-error-0.1
(("rust-serde" ,rust-serde-1))
#:cargo-development-inputs
(("rust-serde-derive" ,rust-serde-derive-1)
- ("rust-serde-json" ,rust-serde-json-1))))
+ ("rust-serde-json" ,rust-serde-json-1.0.73))))
(home-page
"https://github.com/dtolnay/path-to-error")
(synopsis
@@ -60018,14 +60018,14 @@ (define-public rust-serde-repr-0.1
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
- (("rust-proc-macro2" ,rust-proc-macro2-1)
- ("rust-quote" ,rust-quote-1)
+ (("rust-proc-macro2" ,rust-proc-macro2-1.0.34)
+ ("rust-quote" ,rust-quote-1.0.10)
("rust-syn" ,rust-syn-1))
#:cargo-development-inputs
(("rust-rustversion" ,rust-rustversion-1)
("rust-serde" ,rust-serde-1)
- ("rust-serde-json" ,rust-serde-json-1)
- ("rust-trybuild" ,rust-trybuild-1))))
+ ("rust-serde-json" ,rust-serde-json-1.0.73)
+ ("rust-trybuild" ,rust-trybuild-1.0.19))))
(home-page "https://github.com/dtolnay/serde-repr")
(synopsis "Serialize and deserialize C-like enum as underlying repr")
(description
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm
index 8c7d8006cc..76d48e55f1 100644
--- a/gnu/packages/rust-apps.scm
+++ b/gnu/packages/rust-apps.scm
@@ -1812,7 +1812,7 @@ (define-public rust-analyzer
("rust-derive-arbitrary" ,rust-derive-arbitrary-1)
("rust-expect-test" ,rust-expect-test-1)
("rust-oorandom" ,rust-oorandom-11.1)
- ("rust-quote" ,rust-quote-1)
+ ("rust-quote" ,rust-quote-1.0.10)
("rust-rayon" ,rust-rayon-1)
("rust-tracing" ,rust-tracing-0.1)
("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3)
@@ -1823,7 +1823,6 @@ (define-public rust-analyzer
("rust-anyhow" ,rust-anyhow-1)
("rust-anymap" ,rust-anymap-0.12)
("rust-arrayvec" ,rust-arrayvec-0.7)
- ("rust-backtrace" ,rust-backtrace-0.3)
("rust-cargo-metadata" ,rust-cargo-metadata-0.14)
("rust-cfg-if" ,rust-cfg-if-1)
("rust-chalk-ir" ,rust-chalk-ir-0.75)
@@ -1832,17 +1831,16 @@ (define-public rust-analyzer
("rust-countme" ,rust-countme-3)
("rust-cov-mark" ,rust-cov-mark-2)
("rust-crossbeam-channel" ,rust-crossbeam-channel-0.5)
- ("rust-dashmap" ,rust-dashmap-4)
("rust-dissimilar" ,rust-dissimilar-1)
("rust-dot" ,rust-dot-0.1)
("rust-drop-bomb" ,rust-drop-bomb-0.1)
- ("rust-either" ,rust-either-1)
+ ("rust-either" ,rust-either-1.6.0)
("rust-ena" ,rust-ena-0.14)
("rust-env-logger" ,rust-env-logger-0.8)
("rust-flate2" ,rust-flate2-1)
("rust-fst" ,rust-fst-0.4)
("rust-home" ,rust-home-0.5)
- ("rust-indexmap" ,rust-indexmap-1)
+ ("rust-indexmap" ,rust-indexmap-1.7)
("rust-itertools" ,rust-itertools-0.10)
("rust-jod-thread" ,rust-jod-thread-0.1)
("rust-libc" ,rust-libc-0.2)
@@ -1858,7 +1856,7 @@ (define-public rust-analyzer
("rust-once-cell" ,rust-once-cell-1)
("rust-parking-lot" ,rust-parking-lot-0.11)
("rust-perf-event" ,rust-perf-event-0.4)
- ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-proc-macro2" ,rust-proc-macro2-1.0.34)
("rust-pulldown-cmark" ,rust-pulldown-cmark-0.8)
("rust-pulldown-cmark-to-cmark" ,rust-pulldown-cmark-to-cmark-7)
("rust-rowan" ,rust-rowan-0.15)
@@ -1867,7 +1865,7 @@ (define-public rust-analyzer
("rust-salsa" ,rust-salsa-0.17)
("rust-scoped-tls" ,rust-scoped-tls-1)
("rust-serde" ,rust-serde-1)
- ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-serde-json" ,rust-serde-json-1.0.73)
("rust-serde-path-to-error" ,rust-serde-path-to-error-0.1)
("rust-typed-arena" ,rust-typed-arena-2)
("rust-smallvec" ,rust-smallvec-1)
--
2.41.0
D
D
Distopico wrote on 30 Aug 2023 22:34
Re: bug#64720: [PATCH] gnu: rust-analyzer: Fix build of rust-analyzer.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87edjki7zo.fsf@riseup.net
Hi Ludo

On 2023-08-16, Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (38 lines)
> Hi,
>
> Distopico <distopico@riseup.net> skribis:
>
>> * gnu/packages/rust-apps.scm (rust-analyzer): Update dependency rust-notify-5-pre.13.
>>
>> This fixes the build of `rust-analyzer@2022-01-10`, which required a pinned
>> version of `rust-notify` (`rust-notify-5-pre.13`) to compile.
>
> When applied on top of 07dc3d024763f3768002e422e0d60aac0c1b94ac, I get
> this on x86_64-linux:
>
> --8<---------------cut here---------------start------------->8---
> test abis::abi_1_58::rustc_server::tests::test_rustc_server_literals ... ok
> test abis::abi_1_58::rustc_server::tests::test_rustc_server_to_string ... ok
> test abis::abi_1_54::rustc_server::tests::test_rustc_server_from_str ... ok
> test tests::test_derive_error ... FAILED
> test tests::test_attr_macro ... FAILED
> test tests::test_derive_empty ... FAILED
> test tests::test_fn_like_macro2 ... FAILED
> test tests::test_fn_like_macro ... FAILED
> memory allocation of 140737312524592 bytes failed
> error: test failed, to rerun pass `-p proc_macro_srv --lib`
>
> Caused by:
> process didn't exit successfully: `/tmp/guix-build-rust-analyzer-2022-01-10.drv-0/source/target/release/deps/proc_macro_srv-ed08c83337741884 '--skip=tests::test_version_check' '--skip=tests::test_loading_rust_analyzer' '--skip=tests::sourcegen::sourcegen_assists_docs' '--skip=tests::sourcegen_ast::sourcegen_ast' '--skip=tidy::cargo_files_are_tidy' '--skip=tidy::check_licenses' '--skip=tidy::check_merge_commits' '--skip=tidy::check_code_formatting' '--skip=tidy::generate_grammar' '--skip=tidy::generate_assists_tests'` (signal: 6, SIGABRT: process abort signal)
> error: in phase 'check': uncaught exception:
> %exception #<&invoke-error program: "cargo" arguments: ("test" "--release" "--" "--skip=tests::test_version_check" "--skip=tests::test_loading_rust_analyzer" "--skip=tests::sourcegen::sourcegen_assists_docs" "--skip=tests::sourcegen_ast::sourcegen_ast" "--skip=tidy::cargo_files_are_tidy" "--skip=tidy::check_licenses" "--skip=tidy::check_merge_commits" "--skip=tidy::check_code_formatting" "--skip=tidy::generate_grammar" "--skip=tidy::generate_assists_tests") exit-status: 101 term-signal: #f stop-signal: #f>
> phase `check' failed after 164.4 seconds
> command "cargo" "test" "--release" "--" "--skip=tests::test_version_check" "--skip=tests::test_loading_rust_analyzer" "--skip=tests::sourcegen::sourcegen_assists_docs" "--skip=tests::sourcegen_ast::sourcegen_ast" "--skip=tidy::cargo_files_are_tidy" "--skip=tidy::check_licenses" "--skip=tidy::check_merge_commits" "--skip=tidy::check_code_formatting" "--skip=tidy::generate_grammar" "--skip=tidy::generate_assists_tests" failed with status 101
> builder for `/gnu/store/qjpz8f8g5x5wx3y1lviz5kyy9hza4msp-rust-analyzer-2022-01-10.drv' failed with exit code 1
> --8<---------------cut here---------------end--------------->8---
>
> Could you take a look?
>
> Thanks,
> Ludo’.

Fixed, thank you
-----BEGIN PGP SIGNATURE-----

iQFJBAEBCAAzFiEEvYwofabWO6y953lVmAk6gHJUa/MFAmTvqAwVHGRpc3RvcGlj
b0ByaXNldXAubmV0AAoJEJgJOoByVGvztdQH/1jlufJIUZBFVGG4zVMxnnc9akB/
6ykNblPaf/dsvR1Vm6IMmk3YJ9jUmh1kJMyJNWEethSxuZf/3Sxf60X5CypgzEfg
TdtuUvohcjtaeRpkMXvb1PCY3BtB7bkEJTUZzZ32aPLX6285wppYPz8sje4oiGtZ
AY//7p2Q0GQB/8ZIZcrQ5MBOB6vZa2QFy+rAPxsBWjFjyC6D4RbXm5CEJBJfyaHq
IR5RI+QtwVIisPCidKsjW2Fo9QRYQK+3m0cnW7Y7zn7mkAx5yr6aCzMK45HsF5vC
uLGF8XqJj3gokPKzcdy3D03p3OyQfgwIxw5WiihDonBKuUEUkzbGhX4JUFU=
=ZXZ2
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 9 Sep 2023 15:31
(name . Distopico)(address . distopico@riseup.net)
87sf7nxykw.fsf_-_@gnu.org
Hi Distopico,

Finally applied this whole series, thanks!

For the record, https://qa.guix.gnu.org/issue/64720 reported 3
additional successful builds and 1 new failure on x86_64-linux:

Ludo’.
Closed
?