From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hMzS7-0003x5-DX for guix-patches@gnu.org; Sat, 04 May 2019 14:32:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hMzS6-0002Vm-GI for guix-patches@gnu.org; Sat, 04 May 2019 14:32:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38722) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hMzS6-0002Va-DC for guix-patches@gnu.org; Sat, 04 May 2019 14:32:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hMzS6-0007Fs-5k for guix-patches@gnu.org; Sat, 04 May 2019 14:32:02 -0400 Subject: [bug#35318] [PATCH] Update cargo-build-system to expand package inputs Resent-Message-ID: Date: Sat, 4 May 2019 20:31:23 +0200 From: Danny Milosavljevic Message-ID: <20190504203123.2af2049f@scratchpost.org> In-Reply-To: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_//Po.yk7a7xIBKdYHnEAOuUj"; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Ivan Petkov , ludo@gnu.org Cc: 35318@debbugs.gnu.org, Chris Marusich --Sig_//Po.yk7a7xIBKdYHnEAOuUj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Ludo, Hi Ivan, @Ludo: Could you take a look at patch 1? It's allowing the lookup of transitive dependencies in Guix to be more flexible. Is it OK? It's used in patch 2 in order to consider both inputs and propagated inputs rather than just propagated inputs. @Ivan: Thanks! I've tested it and it works. But I don't understand yet why you change the role of "inputs" compared to how it is in the rest of Guix. You have this: +(define-public rust-proc-macro2 + (package [...] + (build-system cargo-build-system) + (native-inputs + `(("rust-quote" ,rust-quote "src"))) + (inputs + `(("rust-unicode-xid" ,rust-unicode-xid "src"))) [...] Here, inputs refer to SOURCE parts of packages which are definitely not referred to at runtime. Does "guix gc --references ...rust-proc-macro2..." really refer to the source of rust-unicode-xid ? I checked, it doesn't, neither for the "src" derivation nor for the "out" derivation. I think the general approach is good but I'm not certain that this won't break other parts of Guix. If it doesn't, fine. @Ludo: WDYT? Details: A Rust crate has dependencies and dev-dependencies. The crate needs the dev-dependencies only when building, not at runtime. Let "transitives of X" mean "X and transitives of immediate dependencies of= X and transitives of immediate dev-dependencies of X", recursively. The crate needs the source code of all its transitives to be available when building, but needs none of the source code at runtime. A crate at run time only requires the immediate, if even that (probably not= !), dependencies and none of the dev-dependencies, and not as source code. So it's really not a propagated-input, although it kinda seems like a weird version of a propagated-input while building (something like a native-propagated-input). If this can't be generalized (and I'm not sure of that--Go has a similar static library-y view), we could also do those as (arguments ...) for the rust build system only--although not sure how to do the resolving of transitives then. --Sig_//Po.yk7a7xIBKdYHnEAOuUj Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlzN2nsACgkQ5xo1VCww uqXiQAgAnsh6D7ZoDv+8JU2L3Tvi484coVCFAHiHHV/2Shcy+I8O3jvgnibnToFA Nt9n1jZ/LgI33ikjAU/MsdCebS5EUmfiguQj8UHv7eem9kw3CPAHmZE9dAoYFs/P Kz5LZaQWmpCV6vonQco5DHHTiS/EKmDgS4AWNLqeZv42/pP3BHYG0Sy/w4qIDYm5 emni8sEnsJzSFG1qhvyV/i3Ywg07VqmNRh7FRgFFCUHb+pf5V375L6OaHT8+0fsX gGxNBKfWa7e+9qRkz2fBCyuFwZtysPbixkjzKYAg3GXS47Bk9euZ2AKYaiRed7OU tnFno5v+ZkKt3XYMXnfP7BIkLKXKrw== =oYVS -----END PGP SIGNATURE----- --Sig_//Po.yk7a7xIBKdYHnEAOuUj--