From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Soo Subject: Re: (not) testing Rust packages?! Date: Mon, 27 Jan 2020 14:49:42 +0000 Message-ID: References: <6e429473-5e4e-503e-fdb8-6e2b65a819f9@riseup.net> <87tv4jxhzn.fsf@londo.h.r0tty.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39538) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iw5i8-0005Qp-K0 for guix-devel@gnu.org; Mon, 27 Jan 2020 09:49:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iw5i6-0005Ch-T2 for guix-devel@gnu.org; Mon, 27 Jan 2020 09:49:55 -0500 Received: from mail-ua1-x92c.google.com ([2607:f8b0:4864:20::92c]:42201) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iw5i6-0005Av-GI for guix-devel@gnu.org; Mon, 27 Jan 2020 09:49:54 -0500 Received: by mail-ua1-x92c.google.com with SMTP id u17so3514940uap.9 for ; Mon, 27 Jan 2020 06:49:54 -0800 (PST) In-Reply-To: <87tv4jxhzn.fsf@londo.h.r0tty.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: Andreas Rottmann Cc: Guix-devel 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 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? > 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? The largest sets of test dependencies I can find are using the insta library which we have packaged already. Do you think the number of dependencies at the top level package was due to the old style of hiding crates packages? Also we have quickcheck and criterion packaged now which should also reduce the required work to create a package now. Thanks, John