From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Rottmann Subject: Re: (not) testing Rust packages?! Date: Sat, 25 Jan 2020 23:56:44 +0100 Message-ID: <87tv4jxhzn.fsf@londo.h.r0tty.org> References: <6e429473-5e4e-503e-fdb8-6e2b65a819f9@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:45900) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ivUMG-0001S5-0W for guix-devel@gnu.org; Sat, 25 Jan 2020 17:56:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ivUMF-0004cA-1F for guix-devel@gnu.org; Sat, 25 Jan 2020 17:56:51 -0500 Received: from ciao.gmane.io ([159.69.161.202]:38844) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ivUME-0004b8-SA for guix-devel@gnu.org; Sat, 25 Jan 2020 17:56:50 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ivUMC-000WpX-Fr for guix-devel@gnu.org; Sat, 25 Jan 2020 23:56:48 +0100 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: guix-devel@gnu.org Martin Becze writes: > Yeah really good point there (and good work on getting all those pkgs > in!) > Being a newcomer to guix, I must say I'm really amazed about the state of Rust packaging! >> Furthermore since most rust libraries we have are not executables, we >> could still skip the build and run the tests I think. Aren’t the two >> phases completely separate for cargo? > > Yes, will can skip the build and just test in the (cargo-build-system) > but `cargo test` will cause most everything to build anyways i > believe. > `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. In addition, `cargo test` will bring in the `dev-dependencies`, which can indeed be _much_ more massive than the regular `dependencies`.