GNU bug report logs - #74958
[PATCH rust-team 0/5] build/cargo.scm: Remove '--release' from default cargo-test-flags.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 19 Dec 2024 01:44:01 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: 74958 <at> debbugs.gnu.org
Subject: [bug#74958] [PATCH rust-team 1/5] build/cargo.scm: Remove '--release' from default cargo-test-flags.
Date: Thu, 19 Dec 2024 10:09:06 +0200
[Message part 1 (text/plain, inline)]
IIRC we chose to use '--release' for cargo-test-flags to minimize the
amount of rebuilding we did with each package.  If the tests are
expected to be run not in release mode then I guess we should change it.

I'll apply the patch to rust-team and then go through and see about
removing the cargo-test-flags from various packages.

On Thu, Dec 19, 2024 at 10:46:18AM +0900, Maxim Cournoyer wrote:
> The default behavior for 'cargo test' is to build in debug mode, and many test
> suites expect support for things provided in this mode such as debug
> assertions (see for example:
> <https://github.com/google/zerocopy/issues/2143>).
> 
> * guix/build-system/cargo.scm (cargo-build): Remove '--release' from
>  #:cargo-test-flags.
> * guix/build/cargo-build-system.scm (check): Likewise.
> 
> Change-Id: I8a659c25bd33bc1bdfd88e440bd00bad09a5fc01
> ---
>  guix/build-system/cargo.scm       | 4 ++--
>  guix/build/cargo-build-system.scm | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
> index 9850969156..452f7f78d0 100644
> --- a/guix/build-system/cargo.scm
> +++ b/guix/build-system/cargo.scm
> @@ -93,7 +93,7 @@ (define* (cargo-build name inputs
>                        (test-target #f)
>                        (vendor-dir "guix-vendor")
>                        (cargo-build-flags ''("--release"))
> -                      (cargo-test-flags ''("--release"))
> +                      (cargo-test-flags ''())
>                        (cargo-package-flags ''("--no-metadata" "--no-verify"))
>                        (features ''())
>                        (skip-build? #f)
> @@ -153,7 +153,7 @@ (define* (cargo-cross-build name
>                              (test-target #f)
>                              (vendor-dir "guix-vendor")
>                              (cargo-build-flags ''("--release"))
> -                            (cargo-test-flags ''("--release"))
> +                            (cargo-test-flags ''())
>                              (cargo-package-flags ''("--no-metadata" "--no-verify"))
>                              (cargo-target (cargo-triplet (or target system)))
>                              (features ''())
> diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm
> index 453d759470..480134402f 100644
> --- a/guix/build/cargo-build-system.scm
> +++ b/guix/build/cargo-build-system.scm
> @@ -252,7 +252,7 @@ (define* (check #:key
>                  parallel-build?
>                  parallel-tests?
>                  tests?
> -                (cargo-test-flags '("--release"))
> +                (cargo-test-flags '())
>                  #:allow-other-keys)
>    "Run tests for a given Cargo package."
>    (when tests?
> -- 
> 2.46.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)]

This bug report was last modified 154 days ago.

Previous Next


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