From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 04 17:08:04 2019 Received: (at 38408) by debbugs.gnu.org; 4 Dec 2019 22:08:04 +0000 Received: from localhost ([127.0.0.1]:42763 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iccoW-0007lG-4O for submit@debbugs.gnu.org; Wed, 04 Dec 2019 17:08:04 -0500 Received: from mx1.riseup.net ([198.252.153.129]:39250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iccoU-0007kr-CY for 38408@debbugs.gnu.org; Wed, 04 Dec 2019 17:08:03 -0500 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 47StJd51GmzFc82; Wed, 4 Dec 2019 14:08:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1575497281; bh=myqupL9tXhYmuzSlr33KAezfh+oNd5VGDPXk235dnvA=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=f9z3uo2bBf2nwzZLfNURy0oQt013jpuRTuI0l9prHAftEkEq/ASvZLlRwVbR6T7fB b+FYEb8JkJrHyGofbF3JvtXQtvnFD76fvuHfj/l9hPM6ID2AsO3AmJY/onBHVsBdum iKolBYSXi8KDFMg1tftnQ5E12/DNslB3Ig8uoYYg= X-Riseup-User-ID: 42BE56310C6F0775B61A1D0C510EF5B6D5940410BBE66CE897AE043AC66D5F97 Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 47StJd2YsVzJtY4; Wed, 4 Dec 2019 14:08:01 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Wed, 04 Dec 2019 14:08:01 -0800 From: Martin Becze To: Ivan Petkov Subject: Re: [PATCH] WIP patches for the rust importer In-Reply-To: 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> Message-ID: X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 38408 Cc: guix-devel@gnu.org, 38408@debbugs.gnu.org, Efraim Flashner X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On 2019-12-04 02:40, Ivan Petkov wrote: > Hi Martin, > >> 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? > > 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’d expect there to > be a > one-to-one mapping between a Cargo.toml and a package definition). > > For example, if crate foo depends on crate bar which depends on crate > baz, I’d expect the definitions to look like: > > (define-public rust-foo > (package > (name “rust-foo") > (source-input `((“bar” ,bar))))) > > (define-public rust-bar > (package > (name “rust-bar") > (source-input `((“baz” ,baz))))) > > (define-public rust-baz > (package > (name “rust-baz"))) > > But while building foo (assuming it is some kind of application), guix > would ensure that bar and baz are available in the build environment. > > IMO this direction would be the most maintainable in the long term. > > —Ivan Yes agree and that is what (recusive-import-semver) for produces rust. -Martin