From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin Becze Subject: Re: [PATCH] WIP patches for the rust importer Date: Wed, 04 Dec 2019 14:08:01 -0800 Message-ID: References: <20191126120408.GL1124@E5400> <1E01C051-2EE5-4050-B826-C60E858AAC2B@flashner.co.il> <0b2db52d687fc2acf34dc1e00618dae7.squirrel@sm.riseup.net> <20191128122255.GT1124@E5400> <8981451ac5d914dd5f53fa928741b846@riseup.net> <20191201085941.GB14869@E5400> <322B85FF-6EA4-492E-B96A-1F326ADD136E@gmail.com> <785501a89e81d30db021047529e7262e@riseup.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36978) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iccoX-0000ix-3i for guix-devel@gnu.org; Wed, 04 Dec 2019 17:08:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iccoV-00031v-SG for guix-devel@gnu.org; Wed, 04 Dec 2019 17:08:04 -0500 Received: from mx1.riseup.net ([198.252.153.129]:53766) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iccoV-0002z6-Hj for guix-devel@gnu.org; Wed, 04 Dec 2019 17:08:03 -0500 In-Reply-To: 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: Ivan Petkov Cc: guix-devel@gnu.org, 38408@debbugs.gnu.org On 2019-12-04 02:40, Ivan Petkov wrote: > Hi Martin, >=20 >> On Dec 2, 2019, at 3:10 PM, Martin Becze wrote: >> >> When you say source import of the transitive dependencies, do you >> mean >> that all the rust libs should just be source only or do you mean the >> top >> level package should have to declare all the transitive >> dependencies? >=20 > All rust libs should be source only imports, but each package > definition > should only declare dependencies on the crates it consumes directly > and > guix should figure out the rest (in other words, I=E2=80=99d expect the= re to > be a=20 > one-to-one mapping between a Cargo.toml and a package definition). >=20 > For example, if crate foo depends on crate bar which depends on crate > baz, I=E2=80=99d expect the definitions to look like: >=20 > (define-public rust-foo > (package > (name =E2=80=9Crust-foo") > (source-input `((=E2=80=9Cbar=E2=80=9D ,bar))))) >=20 > (define-public rust-bar > (package > (name =E2=80=9Crust-bar") > (source-input `((=E2=80=9Cbaz=E2=80=9D ,baz))))) >=20 > (define-public rust-baz > (package > (name =E2=80=9Crust-baz"))) >=20 > But while building foo (assuming it is some kind of application), guix > would ensure that bar and baz are available in the build environment. >=20 > IMO this direction would be the most maintainable in the long term. >=20 > =E2=80=94Ivan Yes agree and that is what (recusive-import-semver) for produces rust.=20 -Martin