From 89413a11625dd6c548827dd0078ebe0191086597 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 19 Sep 2024 12:41:02 +0200 Subject: [PATCH] Revert "import: crate: Emit new-style package inputs." MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b8af6694b9bbea96e8b0d1c9aea64b7f8e690812, which led ‘guix import crate’ to produce invalid code (missing quasiquote) and triggered a failure of ‘tests/crate.scm’. Fixes . Reported-by: Aleksandr Vityazev Change-Id: If309caaa594f912788e20007bfa1f55b7d581a93 --- guix/import/crate.scm | 5 ++- tests/crate.scm | 77 ++++++++++++++++++++++++++++--------------- 2 files changed, 52 insertions(+), 30 deletions(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 263c2a8b16..84c178ea3e 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -3,7 +3,6 @@ ;;; Copyright © 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2019, 2020 Martin Becze ;;; Copyright © 2021 Nicolas Goaziou -;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2022 Hartmut Goebel ;;; Copyright © 2023 Simon Tournier ;;; Copyright © 2023, 2024 Efraim Flashner @@ -164,14 +163,14 @@ (define (maybe-cargo-inputs package-names) (() '()) ((package-inputs ...) - `(#:cargo-inputs (,'unquote (list ,@package-inputs)))))) + `(#:cargo-inputs ,package-inputs)))) (define (maybe-cargo-development-inputs package-names) (match (package-names->package-inputs package-names) (() '()) ((package-inputs ...) - `(#:cargo-development-inputs (,'unquote (list ,@package-inputs)))))) + `(#:cargo-development-inputs ,package-inputs)))) (define (maybe-arguments arguments) (match arguments diff --git a/tests/crate.scm b/tests/crate.scm index 63643c2728..5b4ad08c3c 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -3,7 +3,6 @@ ;;; Copyright © 2016 David Craven ;;; Copyright © 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2020 Martin Becze -;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2023 Efraim Flashner ;;; Copyright © 2023 David Elsing ;;; @@ -501,7 +500,7 @@ (define have-guile-semver? ('quasiquote (#:skip-build? #t #:cargo-inputs - ('unquote (list rust-leaf-alice-0.7))))) + (("rust-leaf-alice" ('unquote 'rust-leaf-alice-0.7)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -607,7 +606,7 @@ (define-public 'rust-leaf-alice-0.7 (string-append name "-" version ".tar.gz")) (sha256 (base32 - (? string? hash))))) + (? string? hash))))) (build-system cargo-build-system) (arguments ('quasiquote (#:skip-build? #t))) (home-page "http://example.com") @@ -650,7 +649,8 @@ (define-public 'rust-intermediate-b-1 (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - ('unquote (list rust-leaf-bob-3))))) + (("rust-leaf-bob" + ('unquote rust-leaf-bob-3)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -672,9 +672,12 @@ (define-public 'rust-intermediate-a-1 (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - ('unquote (list rust-intermediate-b-1 - rust-leaf-alice-0.7 - rust-leaf-bob-3))))) + (("rust-intermediate-b" + ('unquote rust-intermediate-b-1)) + ("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)) + ("rust-leaf-bob" + ('unquote rust-leaf-bob-3)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -695,12 +698,17 @@ (define-public 'rust-root-1 (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - ('unquote (list rust-intermediate-a-1 - rust-intermediate-b-1 - rust-leaf-alice-0.7 - rust-leaf-bob-3)) + (("rust-intermediate-a" + ('unquote rust-intermediate-a-1)) + ("rust-intermediate-b" + ('unquote rust-intermediate-b-1)) + ("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)) + ("rust-leaf-bob" + ('unquote rust-leaf-bob-3))) #:cargo-development-inputs - ('unquote (list rust-intermediate-c-1))))) + (("rust-intermediate-c" + ('unquote rust-intermediate-c-1)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -728,7 +736,8 @@ (define-public 'rust-root-1 (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-development-inputs - ('unquote (list rust-leaf-alice-0.7))))) + (("rust-leaf-alice" + ('unquote rust-leaf-alice-0.7)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -807,9 +816,12 @@ (define-public 'rust-intermediate-a-1 (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - ('unquote (list rust-intermediate-b-1 - rust-leaf-alice-0.7 - rust-leaf-bob-3))))) + (("rust-intermediate-b" + ('unquote rust-intermediate-b-1)) + ("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)) + ("rust-leaf-bob" + ('unquote rust-leaf-bob-3)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -830,12 +842,17 @@ (define-public 'rust-root-1 (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - ('unquote (list rust-intermediate-a-1 - rust-intermediate-b-1 - rust-leaf-alice-0.7 - rust-leaf-bob-3)) + (("rust-intermediate-a" + ('unquote rust-intermediate-a-1)) + ("rust-intermediate-b" + ('unquote rust-intermediate-b-1)) + ("rust-leaf-alice" + ('unquote 'rust-leaf-alice-0.7)) + ("rust-leaf-bob" + ('unquote rust-leaf-bob-3))) #:cargo-development-inputs - ('unquote (list rust-intermediate-c-1))))) + (("rust-intermediate-c" + ('unquote rust-intermediate-c-1)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -946,10 +963,13 @@ (define rust-leaf-bob-3.0.2-yanked (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - ('unquote (list rust-leaf-bob-3)) + (("rust-leaf-bob" + ('unquote 'rust-leaf-bob-3))) #:cargo-development-inputs - ('unquote (list rust-leaf-bob-3.0.2-yanked - rust-leaf-bob-4.0.0-yanked))))) + (("rust-leaf-bob" + ('unquote 'rust-leaf-bob-3.0.2-yanked)) + ("rust-leaf-bob" + ('unquote 'rust-leaf-bob-4.0.0-yanked)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.") @@ -1074,10 +1094,13 @@ (define-public 'rust-bar-1 (build-system cargo-build-system) (arguments ('quasiquote (#:cargo-inputs - ('unquote (list rust-leaf-bob-3)) + (("rust-leaf-bob" + ('unquote 'rust-leaf-bob-3))) #:cargo-development-inputs - ('unquote (list rust-leaf-bob-3.0.2-yanked - rust-leaf-bob-4.0.0-yanked))))) + (("rust-leaf-bob" + ('unquote 'rust-leaf-bob-3.0.2-yanked)) + ("rust-leaf-bob" + ('unquote 'rust-leaf-bob-4.0.0-yanked)))))) (home-page "http://example.com") (synopsis "summary") (description "This package provides summary.")