From patchwork Thu Dec 5 20:05:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Becze X-Patchwork-Id: 16389 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BFE7F17851; Thu, 5 Dec 2019 20:07:27 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 8646D1784F for ; Thu, 5 Dec 2019 20:07:27 +0000 (GMT) Received: from localhost ([::1]:60472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icxPL-0003Kv-3C for patchwork@mira.cbaines.net; Thu, 05 Dec 2019 15:07:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55385) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1icxOy-00036P-N3 for guix-patches@gnu.org; Thu, 05 Dec 2019 15:07:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1icxOx-00078R-9V for guix-patches@gnu.org; Thu, 05 Dec 2019 15:07:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39293) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1icxOw-000767-OX for guix-patches@gnu.org; Thu, 05 Dec 2019 15:07:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1icxOw-0002nN-Gd for guix-patches@gnu.org; Thu, 05 Dec 2019 15:07:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38408] [PATCH v2 0/5] Semantic version aware recusive importer for crates References: In-Reply-To: Resent-From: Martin Becze Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Dec 2019 20:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38408 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 38408@debbugs.gnu.org Cc: Martin Becze Received: via spool by 38408-submit@debbugs.gnu.org id=B38408.157557638310624 (code B ref 38408); Thu, 05 Dec 2019 20:07:02 +0000 Received: (at 38408) by debbugs.gnu.org; 5 Dec 2019 20:06:23 +0000 Received: from localhost ([127.0.0.1]:45248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icxOI-0002lB-Nj for submit@debbugs.gnu.org; Thu, 05 Dec 2019 15:06:22 -0500 Received: from mx1.riseup.net ([198.252.153.129]:45842) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1icxOF-0002kz-41 for 38408@debbugs.gnu.org; Thu, 05 Dec 2019 15:06:19 -0500 Received: from capuchin.riseup.net (capuchin-pn.riseup.net [10.0.1.176]) (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 47TRY96q4KzFcn9 for <38408@debbugs.gnu.org>; Thu, 5 Dec 2019 12:05:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1575576378; bh=0DDz489qFqrxg3fuhPxV6PBmAl3mnLNJZNfP1HUeGl4=; h=From:To:Cc:Subject:Date:From; b=N192jYrjW1hElaZEHXgIU3+5LoC/yx7as3wbCV+eirUSpKHfmCcLZxTyeIPTwLui/ 1vOKJ6jtEnb9A2pSkQc3QA70FRgJ/eUGhKFpmmhUR4XbWLj5DMrPRIEvQeMEWhE9Ik DCu88sx8C8tNgbqkd6j8jyPY7p0f8V9bDuF3bfdM= X-Riseup-User-ID: 433B8AFB6F03371F5C827A0825F9C93691D6120A3DAF9BDC0B429FF017E89216 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 47TRY92FZLz8tYt; Thu, 5 Dec 2019 12:05:49 -0800 (PST) From: Martin Becze Date: Thu, 5 Dec 2019 15:05:30 -0500 Message-Id: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This version just builds a bit on the prevouse version (https://issues.guix.gnu.org/issue/38408#0) I found while testing some crates have build-dependencies and nor dependencies that are the same. While in guix build and normal dependiences are treated the same way (ie source only). So the recusive importer was importing the duplicates so here we dedup the deps. Please let me know if there are any problems! -Martin Martin Becze (5): 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. added "#:skip-build? #t" to the output of (make-crate-sexp). Most the the packages imported will be libaries and won't need to build. The top level package will build them though. guix: crate: Depublicated build and normal dependencies gnu/packages.scm | 41 ++++++++ guix/import/crate.scm | 188 +++++++++++++++++++--------------- guix/import/utils.scm | 181 ++++++++++++++++++++++++++++++-- guix/scripts/import/crate.scm | 9 +- tests/crate.scm | 5 +- tests/import-utils.scm | 162 +++++++++++++++++++++++++++++ tests/packages.scm | 13 +++ 7 files changed, 501 insertions(+), 98 deletions(-)