From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eIkENqrmmGD6FQAAgWs5BA (envelope-from ) for ; Mon, 10 May 2021 09:54:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sMy1MarmmGD2KQAA1q6Kng (envelope-from ) for ; Mon, 10 May 2021 07:54:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 85FC212F01 for ; Mon, 10 May 2021 09:54:18 +0200 (CEST) Received: from localhost ([::1]:35136 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg0k4-0006r2-63 for larch@yhetil.org; Mon, 10 May 2021 03:54:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43346) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg0jv-0006qT-3d for guix-devel@gnu.org; Mon, 10 May 2021 03:54:07 -0400 Received: from flashner.co.il ([178.62.234.194]:41696) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg0jt-0006vS-8W; Mon, 10 May 2021 03:54:06 -0400 Received: from localhost (unknown [31.210.177.125]) by flashner.co.il (Postfix) with ESMTPSA id 8072D40349; Mon, 10 May 2021 07:54:03 +0000 (UTC) Date: Mon, 10 May 2021 10:53:58 +0300 From: Efraim Flashner To: Hartmut Goebel Subject: Re: #:cargo-inputs don't honor --with-input Message-ID: Mail-Followup-To: Hartmut Goebel , Ludovic =?utf-8?Q?Court=C3=A8s?= , guix-devel , Ivan Petkov References: <87eeesgif0.fsf@gnu.org> <1ea7cf3d-b75f-c47a-9730-406ecc610e7c@crazy-compilers.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vvzOVIjpAyCdA4ep" Content-Disposition: inline In-Reply-To: <1ea7cf3d-b75f-c47a-9730-406ecc610e7c@crazy-compilers.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=178.62.234.194; envelope-from=efraim@flashner.co.il; helo=flashner.co.il X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel , Ivan Petkov Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620633258; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=jjLirP2PREWylSO01iyFwwHtXam0FPyIvqm2jV7zv8g=; b=O3IOjzgaTFnY7xRvqzU2yJqQoCxnxvlJPQsWFT+N/MB6XGffV1iJR9613GXy4Dsog0dowx Bn7tiNBma6q7CtiEhdQzDNkUEOpA60MhhurNMG5klLzMBwYBfACXRuq8mkz5x1LDIfZLkn swUmZCSgnU/+pCVnSbMEIF3q5AhWewFGtVA/8BHlgMi7SkJZ/89m4R+bVX+/kIBa0biByT t9kaYy7pWAcZ8MEFaz9bp4BGR3YMhyX497d8GtnSlbSo+nKmWFyZ5qpapZTz64mo9j19xG 7iEb+BxOXSFG+BCSyEoJy2NsO7tYj6UORFZqzyogoUTaL74jdSG/awa5Qavwug== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620633258; a=rsa-sha256; cv=none; b=nmefOB2+ixhdiqr9O+NjTMVC+q8p1zKAYb0xJTZyE25L+AQxBtM/LWX6kKZJQdpMV/5Wx3 OaoBXJW/xPr2+GI2he2wHxFJZ1Y6/ioWu7MZxwOpzRkNiYpQk3TU32X8sXJFl5vXfYAjXM dfuztNYWtvFCXvccgnxIF7XR9+M4TTWBxM2GSawVnzy31FB9TV72mh3dWtWNNUX1KUL+qJ 99GWV6W3Wb0JvmeqPQ/qfl9C4OPbCqAloZVX3tZa26XUXYtQKLOSBzpBqj+5H8WrUsuc/+ JvtLSvnc9f2ZfYyShQhaVdD4JibaBcM+L3fxFRgKN0+V5sEo53Yd9wQzNwFG6A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -4.05 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 85FC212F01 X-Spam-Score: -4.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: rBuZ8C8ToMhY --vvzOVIjpAyCdA4ep Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 01, 2021 at 11:20:51AM +0200, Hartmut Goebel wrote: > Hi Ludo, >=20 > Am 30.04.21 um 12:45 schrieb Ludovic Court=C3=A8s: >=20 > > Uh. More generally, Rust packages kinda create a =E2=80=9Cshadow depen= dency > > graph=E2=80=9D via #:cargo-inputs & co., which breaks all the tools tha= t are > > unaware of it. It was discussed several times on this list, and > > apparently it=E2=80=99s unfortunately unavoidable at this time. :-/ >=20 > Maybe we can get rid of #:cargo-inputs at least: >=20 > guix/build-system/cargo.scm says: "Although cargo does not permit cyclic > dependencies between crates, > however, it permits cycles to occur via dev-dependencies" That I don't remember, but it would make it easier. > So we could change #:cargo-inputs into normal inputs and get at least part > of the dependencies right. >=20 > I'm aware of the "special treatment" of cargo-inputs. Anyhow we could app= ly > the following changes to the cargo build-system: >=20 > * >=20 > The cargo build-system copies the "pre-built crate" (more on this > below) into a new output called "rlib" or "crate". There already is > a phase "packaging" which only needs to be changed to use the other > output. >=20 > * >=20 > All of today's #:cargo-inputs will be changed into normal inputs > using the "rlib/crate" output. (To avoid duplicate assoc-rec keys we > might need to change the name/keys, but this should be a minor issue.) >=20 > * >=20 > If required, the cargo build-system can easily identify former > #:cargo-inputs=C2=A0 by being inputs from a "rlib/crate" output. >=20 > Benefits up to here: >=20 > * The dependency graph would be much more complete - although > "#:cargo-development-inputs" would still be missing. This is the biggest one IMO. > * Package transformation options would work -again except for > "#:cargo-development-inputs". IIRC they're pulled in as (package-source rust-foo-0.x) so some of the transformations should work (I would assume). > * If(!) we actually manage to make cargo pick "pre-built" crates, > package definition will already be adjusted to use them. And cut down on some of the big build times. > |Drawbacks up to here:| >=20 > * ||Since the "packaging" phase copies the source, there is not much > benefit in having a "rlib/crate" output yet. Actually, when a > "rlib/crate" output needs to be build, the user will end up with two > copies of the source (one from the git-checkout, one from packaging) The benefit of copying the source is that in theory you should be able to set $GUIX_ENVIRONMENT/share/cargo/registry (or whatever) as a cache for crates.io when developing, so if you want different features from the crates you won't have to download the source, it would already be cached locally. > About "pre-built" crate: Given the many possible ways to build crates (e.= g. > switching on and off "features", different crate types), we might never be > able to provide pre-built packages for all cases. Thus we might end up > always providing the source, even if we manage to make cargo pick of > pre-built artifacts. Right now we use the 'default' feature set, which seems to be the default for most crates when they're used. > About the output name: Rust has a notion of "rlib" (a specialized .a file= ), > which seems to be the pre-built artifacts we are seeking. Thus the propos= ed > name. >=20 > WDYT? >=20 > --=20 > Regards > Hartmut Goebel When I last touched it I started from rust-apps.scm (or rust-minisign) and tried transitioning as much as possible, but doing even just the cargo-inputs would be a very good start. --=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 --vvzOVIjpAyCdA4ep Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmCY5pMACgkQQarn3Mo9 g1EmeQ//c+yizobSklP+wR2+yrHCfMZX+cf6MH93nVLVxLTtMu9EvWAGoTEuimZ9 mhe3wYhQk3oNF6TALegzoYDbiNFNumeN3vDK/0Di+iqPhoFBvkdxBCl5Sywn8Pyv wd7IyD+g9Lvoow77lVvVuZSwyAjsZX6ykmzg2JQq4BzGnm41owqd+LrfQkNeODwU U+wd4+egJLVTmIwRwqUykMAN07YkJ426q0BHacH/JIiNe05VAPmoz+A4qIIkeU/Z brlctdhjpfqqR2WlFtu9IKx9f1TKxloJeCDuyIVPBkRuMaz4AjmbF9Bg3Lhg60Ux pr6tPN6aXAvIU1AKtl5AifYONSMcpfT5dTc2fjw5Nvn/p7sappmYBKG9qmzMUmDD 8/OmLWpXeigki8xtkA0iimqS2DBsuwToouwqb9iBaj8PyV04TQx1mEMVU71HSpWE 2iABjYv1Ve76gmivE4M64vLCy7acHvk9SKvKsICQdh6QFwOotfVezWPtUJFua/mW AlZ9nbCBqMwA7NaLv2QVe8Ut0HAsr8JxDwLj7i2e9ZqMCKatyFV0QXZkNosOEtpi JvpK9qPvkBnj9NQJZOELPaotFaJkWgxsXSy9aNFKfJnEph1JsuM/zIF0uj1zeFEE ypdvP5lkCdDHmA+yDLUoA/0RzafPHXY1rMaRPvKK6+YcmOIpL9Y= =4w/A -----END PGP SIGNATURE----- --vvzOVIjpAyCdA4ep--