From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: Overhauling the cargo-build-system Date: Sun, 17 Nov 2019 09:19:34 +0200 Message-ID: <20191117071934.GC12423@E5400> References: <20191010155056.GD1301@E5400> <87d0f4p6xd.fsf@gnu.org> <20191011141342.GC13364@E5400> <87imnjtsk3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nmemrqcdn5VTmUEE" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:48561) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iWEqu-0004Ru-If for guix-devel@gnu.org; Sun, 17 Nov 2019 02:20:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iWEqt-0000Cj-7v for guix-devel@gnu.org; Sun, 17 Nov 2019 02:20:08 -0500 Content-Disposition: inline In-Reply-To: <87imnjtsk3.fsf@gnu.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.org@gnu.org Sender: "Guix-devel" To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org --nmemrqcdn5VTmUEE Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 16, 2019 at 10:33:32PM +0100, Ludovic Court=C3=A8s wrote: > Hello! >=20 > Martin Becze skribis: >=20 > > Sorry for digging up and old issue, but i just saw commit > > 86e443c71d4d19e6f80cad9ca15b9c3a301c738c > > > >> It makes for a very large package definition, but we > > wouldn't have to ensure thousands of other rust libraries built so we > > > > The whole point of package management is that you can use module > > building blocks. By having to specify the sub-dependencies in a top > > level definition kinda breaks the whole modular thing. In commit > > 86e443c71d4d19e6f80cad9ca15b9c3a301c738c all the inputs got removed for > > all the libraries. So if I'm trying to use guix as package manager for a > > rust project and I want to use one of the rust libraries in > > crates-io.scm, how am i suppose to do this? I can't just include it as > > an input to my project because now I have to look up all of it > > dependencies as well? >=20 > I agree that removing all the dependencies from Rust packages feels > wrong. >=20 > What I would have liked is to somehow replace the #:cargo-inputs > argument (which is build-system-specific and thus =E2=80=9Copaque=E2=80= =9D) with regular > =E2=80=98native-inputs=E2=80=99 or =E2=80=98inputs=E2=80=99 field. >=20 > I know it=E2=80=99s not that easy with Rust and Cargo, I just never manag= e to > fully grasp why :-), but at least that should be our horizon IMO. >=20 > WDYT, Efraim, Martin, and other Rusty people? :-) >=20 The big problems are the recursive dependencies, the partial dependencies and the versioning. There are some that are easy to figure out, serde always needs serde-derive, winapi always needs the winapi-[i686|x86_64] crates, rayon -> rayon-core, etc. The real problem is that each crate has a number of features, and only needs certain inputs based on those features. If we include too few then we're stuck specifying dependencies anyway. If we include all of them then we're stuck packaging way more versions of things than we actually need. This by itself might not be a problem; we could just say "this is what the importer gave us based on upstream, if you're missing something you're on your own to add it." I have one package that I was working on, a custom rust package (which is unfortunately still missing a license file). In the end I needed about 70 crates. Before the change I had it building with about 200 packaged crates but the file itself failed to compile with a 'guix pull' because of all the still unpackaged crates which were referenced by other packaged crates. I still haven't reached the bottom of that tree, and I have more than 500 crates that I haven't upstreamed yet. The current situation definitely could be better. Without opening the repo there's no way to know which crates are packaged. When updating a crate there's no way to know which packages will be rebuilt. I suppose one way to work around some of the issues is to make it so that the crates "build" by copying the source to %out/share/guix-vendor or something. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --nmemrqcdn5VTmUEE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl3Q9IMACgkQQarn3Mo9 g1FhrA//Yhqva1tLRXEpsiOjPFibzicABhCzoEtyYaolUa00wOzhzXGBIXaKAA+v fAbIJfHuUm/43H7KNzQCs9Arqf77rFFHgLXuzwME/0/dhluH1KvgSDibwwhUzw0g 6adcmsTcNNX9XdgU/8lb6xdorssqavlreMw0P63l0MLf8/lOnw2MFvRu6Se0a/S+ qr1eanBfkRT8h2ym4wvUVMySDI4UcC4DC95qV7zqEOzGiESCFN8PF/eKySr2jLOz 4RQ7WYtCZog/mgtEdGmmcntZ9Aaz6X8cDytzi7ynwOCvt0sNcCEqc/Ce2yuVdkzm 6IIAcQZeKq5DhyytCoMEODGf9pUbwr9p+GtfsJ90el68eIcrnXMzKBo/9jpdk2pt tzB5hHE7lyVs+YkyB31R2T9NMVb/2u2Xccj9qwSjv0zc3mHVTMZRbAYLeUcoG4fb NQqbB77ydguGgZVhwW77IJfyXKK0lZsW7LfwsHtZh7pWBh/B/sPHIRekTb5ENMT/ aOGBskYbyvCeDjF6Lw+VMmdZ9z+PK3PgNV9h8xpejZNYxdE+wE+WlrIgyQQgcu9f BywelCslqkSkCzq0GKubL7RG4SOjG/Glb40Vz+Ofnllm+mxwL5F5V6ds/GJIxxP2 ccwBkZ1okyOlTctee4KGPfIl7UNRLQLRS4u/48uIJcOsXlM2R6s= =An5s -----END PGP SIGNATURE----- --nmemrqcdn5VTmUEE--