From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47497) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3iTC-0000M7-R4 for guix-patches@gnu.org; Mon, 17 Feb 2020 10:38:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3iTB-0006as-Sq for guix-patches@gnu.org; Mon, 17 Feb 2020 10:38:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33121) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3iTB-0006ak-PN for guix-patches@gnu.org; Mon, 17 Feb 2020 10:38:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j3iTB-0005RJ-L9 for guix-patches@gnu.org; Mon, 17 Feb 2020 10:38:01 -0500 Subject: [bug#38408] [PATCH v9 2/8] guix: import: crate: Use semver to resovle module versions Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <7dbe9a73fe56e1116d3207ef3cb9547a32b9a773.1580817140.git.mjbecze@riseup.net> <87y2t17047.fsf@gnu.org> <20200217145759.GM1968@E5400> Date: Mon, 17 Feb 2020 16:37:25 +0100 In-Reply-To: <20200217145759.GM1968@E5400> (Efraim Flashner's message of "Mon, 17 Feb 2020 16:57:59 +0200") Message-ID: <87v9o55ioa.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Efraim Flashner Cc: 38408@debbugs.gnu.org, jsoo1@asu.edu, Martin Becze Efraim Flashner skribis: > On Mon, Feb 17, 2020 at 03:35:20PM +0100, Ludovic Court=C3=A8s wrote: [...] >> --8<---------------cut here---------------start------------->8--- >> scheme@(guix import crate)> (crate-version-dependencies (car (crate-vers= ions (lookup-crate "blake2-rfc")))) >> $8 =3D (#< id: "arrayvec" kind: normal requirement: "^= 0.4.6"> #< id: "constant_time_eq" kind: normal requiremen= t: "^0.1.0"> #< id: "data-encoding" kind: dev requirement= : "^2.0.0"> #< id: "clippy" kind: normal requirement: "^0= .0.41">) >> --8<---------------cut here---------------end--------------->8--- >>=20 >> In the example above, the importer could =E2=80=9Cjust=E2=80=9D fetch ve= rsion 0.4.6 of >> arrayvec, version 0.1.0 of constant_time_eq, etc., no? >>=20 >> It=E2=80=99s an approximation because the caret (^) means more than just= this, >> but hopefully it=E2=80=99s a good approximation. >>=20 >> Am I missing something? >>=20 >> Ludo=E2=80=99. > > Here we're looking at a minimum of 0.4.6 for arrayvec. According to > here=C2=B9 we'd really want to import 0.4.12, which is the latest 0.4.x > release. That=E2=80=99s why I wrote that 0.4.6 is an approximation (probably a good = one because it=E2=80=99s apparently known to work.) We can do something smarter, but then it=E2=80=99s only useful if the updat= er is equally smart=E2=80=94that is, it can update 0.4.6 to 0.4.13 whenever that version is out, knowing that blake2-rfc will still work fine. Tricky! WDYT? Ludo=E2=80=99.