From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 23 16:31:02 2021 Received: (at submit) by debbugs.gnu.org; 23 Jan 2021 21:31:02 +0000 Received: from localhost ([127.0.0.1]:35403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3QUh-0001pa-KD for submit@debbugs.gnu.org; Sat, 23 Jan 2021 16:31:02 -0500 Received: from lists.gnu.org ([209.51.188.17]:38948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3QUf-0001pT-RW for submit@debbugs.gnu.org; Sat, 23 Jan 2021 16:30:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3QUf-0002OP-LS for guix-patches@gnu.org; Sat, 23 Jan 2021 16:30:53 -0500 Received: from mail.ftbfs.org ([52.8.68.13]:38710 helo=aws.ftbfs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3QUd-0003iT-O2 for guix-patches@gnu.org; Sat, 23 Jan 2021 16:30:53 -0500 Received: from ip68-5-94-190.oc.oc.cox.net ([68.5.94.190] helo=localhost.localdomain) by aws.ftbfs.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l3QUb-0006me-H4; Sat, 23 Jan 2021 21:30:50 +0000 From: Matthew Kraai To: guix-patches@gnu.org Subject: [PATCH] gnu: Test rust-juniper-codegen. Date: Sat, 23 Jan 2021 13:30:47 -0800 Message-Id: <20210123213047.31750-1-kraai@ftbfs.org> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No (score -1.0): ALL_TRUSTED=-1 Received-SPF: pass client-ip=52.8.68.13; envelope-from=kraai@ftbfs.org; helo=aws.ftbfs.org 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Matthew Kraai 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/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 # Copyright © 2020 Vinicius Monego # Copyright © 2021 Björn Höfling +# Copyright © 2021 Matthew Kraai # # 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 ;;; Copyright © 2020 Arun Isaac ;;; Copyright © 2020 Antoine Côté +;;; Copyright © 2021 Matthew Kraai ;;; ;;; 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 { -- 2.30.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 24 04:20:32 2021 Received: (at 46058) by debbugs.gnu.org; 24 Jan 2021 09:20:32 +0000 Received: from localhost ([127.0.0.1]:35823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3bZQ-0006Qy-4C for submit@debbugs.gnu.org; Sun, 24 Jan 2021 04:20:32 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:52577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3bZN-0006Qj-Sp for 46058@debbugs.gnu.org; Sun, 24 Jan 2021 04:20:30 -0500 Received: from localhost (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id AB70B240002; Sun, 24 Jan 2021 09:20:22 +0000 (UTC) From: Nicolas Goaziou To: Matthew Kraai Subject: Re: [bug#46058] [PATCH] gnu: Test rust-juniper-codegen. References: <20210123213047.31750-1-kraai@ftbfs.org> Date: Sun, 24 Jan 2021 10:20:21 +0100 In-Reply-To: <20210123213047.31750-1-kraai@ftbfs.org> (Matthew Kraai's message of "Sat, 23 Jan 2021 13:30:47 -0800") Message-ID: <877do2elnu.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 46058 Cc: 46058@debbugs.gnu.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.7 (-) Hello, Matthew Kraai 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 24 08:06:31 2021 Received: (at 46058) by debbugs.gnu.org; 24 Jan 2021 13:06:31 +0000 Received: from localhost ([127.0.0.1]:36044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3f67-0005XV-Jx for submit@debbugs.gnu.org; Sun, 24 Jan 2021 08:06:31 -0500 Received: from mail.ftbfs.org ([52.8.68.13]:34120 helo=aws.ftbfs.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l3f65-0005XI-2v for 46058@debbugs.gnu.org; Sun, 24 Jan 2021 08:06:30 -0500 Received: from ip68-5-94-190.oc.oc.cox.net ([68.5.94.190] helo=[192.168.1.12]) by aws.ftbfs.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1l3f5y-0001ff-N9; Sun, 24 Jan 2021 13:06:22 +0000 Subject: Re: [bug#46058] [PATCH] gnu: Test rust-juniper-codegen. To: Nicolas Goaziou References: <20210123213047.31750-1-kraai@ftbfs.org> <877do2elnu.fsf@nicolasgoaziou.fr> From: Matthew Kraai Message-ID: <1f46424f-0e99-95e7-6411-fcddf0fc822b@ftbfs.org> Date: Sun, 24 Jan 2021 05:06:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Icedove/78.6.1 MIME-Version: 1.0 In-Reply-To: <877do2elnu.fsf@nicolasgoaziou.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No (score -1.0): ALL_TRUSTED=-1 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 46058 Cc: 46058@debbugs.gnu.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 (-) Hi Nicolas, On 1/24/21 1:20 AM, Nicolas Goaziou wrote: > Hello, > > Matthew Kraai 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