From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59565) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ia7Rf-0005Ku-3n for guix-patches@gnu.org; Wed, 27 Nov 2019 19:14:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ia7Rd-00073o-2A for guix-patches@gnu.org; Wed, 27 Nov 2019 19:14:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50435) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ia7Ra-00071U-AE for guix-patches@gnu.org; Wed, 27 Nov 2019 19:14:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ia7Ra-0005DZ-4R for guix-patches@gnu.org; Wed, 27 Nov 2019 19:14:02 -0500 Subject: [bug#38408] [PATCH 0/3] (WIP) Semantic version aware recusive importer for crates Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:59103) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ia7RP-0005KX-LU for guix-patches@gnu.org; Wed, 27 Nov 2019 19:13:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ia7RO-0006nY-AF for guix-patches@gnu.org; Wed, 27 Nov 2019 19:13:51 -0500 Received: from mx1.riseup.net ([198.252.153.129]:45718) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ia7RK-0006hm-6h for guix-patches@gnu.org; Wed, 27 Nov 2019 19:13:48 -0500 From: Martin Becze Date: Wed, 27 Nov 2019 19:13:11 -0500 Message-Id: MIME-Version: 1.0 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: 38408@debbugs.gnu.org Cc: efraim@flashner.co.il, Martin Becze This patch add a new recusive importer (recusive-import-semver) which use= s semantic versioning to find the correct version of dependencies. This p= rocedure is then used by the crate importer. Since quite a few langague p= ms use semantic versioning I hope that other importers can also use it. This patch has one problem that I'm aware of. recusive-import-semver reli= es on guile-semver. But how do I make it so that it is installed by defau= lt? Or altenativly how can I check a guile module exists or not, so that = I can promt the user to install it? Thanks, Martin Becze Martin Becze (3): gnu: added new function, find-packages-by-name*/direct gnu: added new procedure, recusive-import-semver Rewrote some of guix/import/crate.scm to use recursive-import-semver and updated script and test. gnu/packages.scm | 41 ++++++++ guix/import/crate.scm | 165 +++++++++++++++++-------------- guix/import/utils.scm | 181 ++++++++++++++++++++++++++++++++-- guix/scripts/import/crate.scm | 9 +- tests/crate.scm | 2 +- tests/import-utils.scm | 162 ++++++++++++++++++++++++++++++ tests/packages.scm | 13 +++ 7 files changed, 481 insertions(+), 92 deletions(-) --=20 2.24.0