From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: Re: [PATCH] WIP patches for the rust importer Date: Sun, 1 Dec 2019 10:59:41 +0200 Message-ID: <20191201085941.GB14869@E5400> References: <20191126120408.GL1124@E5400> <1E01C051-2EE5-4050-B826-C60E858AAC2B@flashner.co.il> <0b2db52d687fc2acf34dc1e00618dae7.squirrel@sm.riseup.net> <20191128122255.GT1124@E5400> <8981451ac5d914dd5f53fa928741b846@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IiVenqGWf+H9Y6IX" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:52142) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ibL5T-0000yj-Pa for guix-devel@gnu.org; Sun, 01 Dec 2019 04:00:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ibL5S-0003Fi-F6 for guix-devel@gnu.org; Sun, 01 Dec 2019 04:00:15 -0500 Received: from flashner.co.il ([178.62.234.194]:55394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ibL5S-00039n-7s for guix-devel@gnu.org; Sun, 01 Dec 2019 04:00:14 -0500 Content-Disposition: inline In-Reply-To: <8981451ac5d914dd5f53fa928741b846@riseup.net> 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: Martin Becze Cc: guix-devel@gnu.org, 38408@debbugs.gnu.org --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 29, 2019 at 07:59:35AM -0800, Martin Becze wrote: > On 2019-11-28 12:22, Efraim Flashner wrote: > > On Wed, Nov 27, 2019 at 04:36:20PM -0800, mjbecze@riseup.net wrote: > >> > >> > I'd love to see what you have so far if you want to share > >> > >> Okie Dokie, I posted it and cc'd ya. > >> > >> Also I took a look at your patches. > >> 0001-import-crate-Don-t-include-optional-dependencies.patch should work > >> just fine with my patch. But > >> 0003-import-crate-Honor-versioned-dependencies-when-impor.patch will n= ot > >> work. > >> > >> I took a different route here with the naming. If you are interested t= ake > >> a look take a look at my second patch. (recusive-import-semver) only w= ill > >> add the version number to the name if the crate being imported is not = the > >> latest version. I thought this was more inline with the canonical name= s, > >> but if always adding version number the export symbol is desirable it = will > >> simplify things. > >> > >=20 > > I'll take a look at it in a minute. I figured with the versioned > > requirements we would always want to be specific in version numbers for > > crate dependents so I figured it made sense. Also, if we did want to > > provide an unversioned '-latest' version we could declare an extra > > variable '(define-public rust-libc rust-libc-0.2)' and now rust-libc > > points to rust-libc-0.2. > >=20 > >> Also I added a function (find-packages-by-name*/direct) to packages.scm > >> which will return the export symbol of a package that already exists. I > >> use this in case there are some non-canocal export name already added. > >> >=20 > I added the no-optional-dep logic to the recusive-semver patch > (https://issues.guix.gnu.org/issue/38408), but it seems to break > packages. I'm testing on the recursive importer on "hello-cli". Attach > is the patch to add the logic and the before and after output for "guix > import crate -r hello-cli". Removing all the optional deps breaks clap > here for some reason which I haven't figured out. Looking at the two attached files I want to bring attention to the size of them: after.scm [text/plain, base64, utf-8, 5.7K] before.scm [text/plain, base64, utf-8, 226K] One way to fix this (in addition to your "default to the don't build" argument) is to keep rust-clap in it's broken state and define a different rust-clap for when we actually want it and to have that use enough inputs to actually build. I do now actually realize that only really works if we keep all the crates hidden, which I don't think we want. So I guess that has us sending bug reports upstream that some of the optional dependencies aren't actually optional. In any case, I think it'd be better to skip the optional dependencies and then add them back in as needed to actually build the crates we want. --=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 --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl3jgP0ACgkQQarn3Mo9 g1GTaBAAnMDGKZ8byZEL9rDyLAcVf8I+wFrZPw7D2KolaZ15EZppFeif9Vf4mxU6 bFZzfb3EurqpTND3JpLFxLXoOEw/JWe5JqSzZBR4ejRWBbzEr33R2OC+qxfm6o93 GIgf8BPFx7ZvBbJeN/wRbnZunlqcPaMfgrq6hHx5iNRrGEoMaBCSROi1t/t5ZTuF gm6+aAasFlZTwCANjV2zxpmpyOpkhskrN55i3JfTGkRMVkJ5r1BsUeLVlWTsw2n5 BrM8x68ETSnSt84Exn5V1a2ffzlAhktS2AXp0X67bvzwgOZzmfaGzMFEM83Rx1ym o5JQJAP/2wLUTIvfPVOb3awOqm6J0Z8ulZCY9F2+9GhIChzldHr4vzCD+tjkK6du 5ez/yFiXhN8TEPA+eNHDG1q5KxEqDRJm9JNQ7jWwrOhNkQC6VTKNtmrAlAQKwMkM f6Hf8y5BbiHXWNRaHzvQB0e7+oOW8tARrU4Av9M+vY0D4WjTHlJYLfhK9gkZ5rVm ncQMWqE0SGkXk6ixyFh09UHSTnyy4UcZgCXlV5XIv60OpIVYsATPwMaWn92Q1/TR CQKkWm+BxG6eOjoHOkFAS7/gJ3NFLcsNGuvYdbdiuOrP8vR5+Qvot0Q7BQcL3wLA 4hPsdTE2TtdtQH48vyyNQGz/ztQ3wbJJrZm9zZyZafklZj8c4Do= =+UEn -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX--