GNU bug report logs - #46058
[PATCH] gnu: Test rust-juniper-codegen.

Previous Next

Package: guix-patches;

Reported by: Matthew Kraai <kraai <at> ftbfs.org>

Date: Sat, 23 Jan 2021 21:32:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 46058 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#46058; Package guix-patches. (Sat, 23 Jan 2021 21:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matthew Kraai <kraai <at> ftbfs.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 23 Jan 2021 21:32:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matthew Kraai <kraai <at> ftbfs.org>
To: guix-patches <at> gnu.org
Cc: Matthew Kraai <kraai <at> ftbfs.org>
Subject: [PATCH] gnu: Test rust-juniper-codegen.
Date: Sat, 23 Jan 2021 13:30:47 -0800
* gnu/packages/patches/rust-juniper-codegen-use-__private.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/crates-io.scm (rust-juniper-codegen-0.14)[source]: Use it.
  [arguments]: Do not set #:tests? to #false.
---
 gnu/local.mk                                        |  2 ++
 gnu/packages/crates-io.scm                          |  7 ++++---
 .../rust-juniper-codegen-use-__private.patch        | 13 +++++++++++++
 3 files changed, 19 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/rust-juniper-codegen-use-__private.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0553c12f28..2a51d913dd 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -40,6 +40,7 @@
 # Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes <at> gmail.com>
 # Copyright © 2020 Vinicius Monego <monego <at> posteo.net>
 # Copyright © 2021 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
+# Copyright © 2021 Matthew Kraai <kraai <at> ftbfs.org>
 #
 # This file is part of GNU Guix.
 #
@@ -1604,6 +1605,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/rust-1.48-linker-locale.patch		\
   %D%/packages/patches/rust-bootstrap-stage0-test.patch		\
   %D%/packages/patches/rust-coresimd-doctest.patch		\
+  %D%/packages/patches/rust-juniper-codegen-use-__private.patch \
   %D%/packages/patches/rust-ndarray-remove-blas-src-dep.patch	\
   %D%/packages/patches/rust-nettle-disable-vendor.patch		 \
   %D%/packages/patches/rust-nettle-sys-disable-vendor.patch	 \
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 6d0115e820..9a379e4d8a 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -12,6 +12,7 @@
 ;;; Copyright © 2020 André Batista <nandre <at> riseup.net>
 ;;; Copyright © 2020 Arun Isaac <arunisaac <at> systemreboot.net>
 ;;; Copyright © 2020 Antoine Côté <antoine.cote <at> posteo.net>
+;;; Copyright © 2021 Matthew Kraai <kraai <at> ftbfs.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -16873,11 +16874,11 @@ friction with idiomatic Rust structs to ease interopability.")
        (uri (crate-uri "juniper_codegen" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "06ym8568k9p75kvnfc4ywqbkzaa4ib6gngx9vpbsjwg9v0sg42nl"))))
+        (base32 "06ym8568k9p75kvnfc4ywqbkzaa4ib6gngx9vpbsjwg9v0sg42nl"))
+       (patches (search-patches "rust-juniper-codegen-use-__private.patch"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:tests? #false                  ;FIXME: fail due to unresolved import
-       #:cargo-inputs
+     `(#:cargo-inputs
        (("rust-proc-macro2" ,rust-proc-macro2-1)
         ("rust-quote" ,rust-quote-1)
         ("rust-syn" ,rust-syn-1))
diff --git a/gnu/packages/patches/rust-juniper-codegen-use-__private.patch b/gnu/packages/patches/rust-juniper-codegen-use-__private.patch
new file mode 100644
index 0000000000..79b03e6cfc
--- /dev/null
+++ b/gnu/packages/patches/rust-juniper-codegen-use-__private.patch
@@ -0,0 +1,13 @@
+diff --git a/src/util.rs b/src/util.rs
+index 4df1b295..711aced1 100644
+--- a/src/util.rs
++++ b/src/util.rs
+@@ -840,7 +840,7 @@ impl GraphQLTypeDefiniton {
+ #[cfg(test)]
+ mod test {
+     use super::*;
+-    use quote::__rt::*;
++    use quote::__private::*;
+     use syn::{Ident, LitStr};
+ 
+     fn strs_to_strings(source: Vec<&str>) -> Vec<String> {
-- 
2.30.0





Information forwarded to guix-patches <at> gnu.org:
bug#46058; Package guix-patches. (Sun, 24 Jan 2021 09:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 46058 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Matthew Kraai <kraai <at> ftbfs.org>
Cc: 46058 <at> debbugs.gnu.org
Subject: Re: [bug#46058] [PATCH] gnu: Test rust-juniper-codegen.
Date: Sun, 24 Jan 2021 10:20:21 +0100
Hello,

Matthew Kraai <kraai <at> ftbfs.org> writes:

> * gnu/packages/patches/rust-juniper-codegen-use-__private.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add it.
> * gnu/packages/crates-io.scm (rust-juniper-codegen-0.14)[source]: Use it.
>   [arguments]: Do not set #:tests? to #false.

Thank you for fixing my FIXME. :)

However, I ponder if this is going in the right direction. IIUC, the
goal for Rust packaging is to automatically fetch and build inputs and
development inputs, using the importer, i.e., maybe writing something like

     #:cargo-inputs (("instant" "0.1")
                     ("lock-api" "0.4")
                     ("parking-lot-core" "0.8"))

and let the crate importer deal with it without providing the packages
ourselves.

In this case, why bother, since any non-leaf package will be expected to
#:skip-build anyway. What about doing it here, too?

WDYT?

Regards,
-- 
Nicolas Goaziou




Information forwarded to guix-patches <at> gnu.org:
bug#46058; Package guix-patches. (Sun, 24 Jan 2021 13:07:01 GMT) Full text and rfc822 format available.

Message #11 received at 46058 <at> debbugs.gnu.org (full text, mbox):

From: Matthew Kraai <kraai <at> ftbfs.org>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 46058 <at> debbugs.gnu.org
Subject: Re: [bug#46058] [PATCH] gnu: Test rust-juniper-codegen.
Date: Sun, 24 Jan 2021 05:06:22 -0800
Hi Nicolas,

On 1/24/21 1:20 AM, Nicolas Goaziou wrote:
> Hello,
>
> Matthew Kraai <kraai <at> ftbfs.org> writes:
>
>> * gnu/packages/patches/rust-juniper-codegen-use-__private.patch: New file.
>> * gnu/local.mk (dist_patch_DATA): Add it.
>> * gnu/packages/crates-io.scm (rust-juniper-codegen-0.14)[source]: Use it.
>>    [arguments]: Do not set #:tests? to #false.
> Thank you for fixing my FIXME. :)
>
> However, I ponder if this is going in the right direction. IIUC, the
> goal for Rust packaging is to automatically fetch and build inputs and
> development inputs, using the importer, i.e., maybe writing something like
>
>       #:cargo-inputs (("instant" "0.1")
>                       ("lock-api" "0.4")
>                       ("parking-lot-core" "0.8"))
>
> and let the crate importer deal with it without providing the packages
> ourselves.
>
> In this case, why bother, since any non-leaf package will be expected to
> #:skip-build anyway. What about doing it here, too?
>
> WDYT?
>
> Regards,

I don't know enough about the long-term goals to know what's best.  Feel 
free to close this bug if you think that's a better approach.

-- 
Matthew Kraai





This bug report was last modified 3 years and 64 days ago.

Previous Next


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