unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andreas Rottmann <mail@r0tty.org>
To: guix-devel@gnu.org
Subject: Re: (not) testing Rust packages?!
Date: Wed, 29 Jan 2020 20:01:27 +0100	[thread overview]
Message-ID: <87eevixf20.fsf@londo.h.r0tty.org> (raw)
In-Reply-To: CAKf5CqXv5o-1n-ZE8wScpnF1Y6ikM696Yfm4EPmyLEgNiMmuhg@mail.gmail.com

John Soo <jsoo1@asu.edu> writes:

> Hey Andreas,
>
>> `cargo test` will always build the crate a second time, even if `cargo
>> build` already ran. This is due to the config attribute `test` being set
>> (similar a to C preprocessor #define), and thus the actual code being
>> compiled may be different.
>
> Just to make sure, does that mean we can safely run tests without
> having unwanted store outputs?
>
I'm a new to Guix, and am not sure what you mean by "safely" and
"unwanted store outputs". Running `cargo test` takes the crate source,
and the closure of any `dependencies` and `dev-dependencies`, and
produces no real artifacts that make sense to put in the store, as far
as I can see. The only noteworthy artifact is the stdout/stderr ouput
produced, as well as the exit status, but I guess that's not relevant to
the store.

> I can see that maybe the test compile step might not catch everything
> or compile the whole package, but wouldn't you say that some testing
> is better than none at all?
>
Having tests run would be great: it's a service to the Rust ecosystem,
and can also help catch issues in packaging, as was already pointed
out. How likely catching issues is depends on the testsuite quality of
the crate in question, but that's not at all an argument against running
tests, of course!

>> In addition, `cargo test` will bring in the
>> `dev-dependencies`, which can indeed be _much_ more massive than the
>> regular `dependencies`.
>
> Can you provide an example? [...]
>
This may have come across wrong: I just wanted to point out that it may
mean more packaging effort, but it seems Guix is in a good position here
already.

  reply	other threads:[~2020-01-29 19:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-25 13:38 (not) testing Rust packages?! Hartmut Goebel
2020-01-25 14:31 ` Martin Becze
2020-01-25 16:46   ` John Soo
2020-01-25 17:45     ` Martin Becze
2020-01-25 22:56       ` Andreas Rottmann
2020-01-27 14:49         ` John Soo
2020-01-29 19:01           ` Andreas Rottmann [this message]
2020-01-31 18:50             ` John Soo
2020-02-03 12:22               ` Hartmut Goebel
2020-01-25 18:55     ` Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eevixf20.fsf@londo.h.r0tty.org \
    --to=mail@r0tty.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).