From patchwork Fri Dec 6 18:21:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Becze X-Patchwork-Id: 16403 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 34C8D1785E; Fri, 6 Dec 2019 18:58:33 +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 F1A5E1785C for ; Fri, 6 Dec 2019 18:58:32 +0000 (GMT) Received: from localhost ([::1]:44076 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idIoC-0006Sm-I4 for patchwork@mira.cbaines.net; Fri, 06 Dec 2019 13:58:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49882) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1idIEt-0004LS-Vg for guix-patches@gnu.org; Fri, 06 Dec 2019 13:22:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1idIEs-0003l6-Pk for guix-patches@gnu.org; Fri, 06 Dec 2019 13:22:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41063) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1idIEs-0003ip-DS for guix-patches@gnu.org; Fri, 06 Dec 2019 13:22:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1idIEs-00054T-7n for guix-patches@gnu.org; Fri, 06 Dec 2019 13:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38408] [PATCH v3 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: Fri, 06 Dec 2019 18:22: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.157565650919435 (code B ref 38408); Fri, 06 Dec 2019 18:22:02 +0000 Received: (at 38408) by debbugs.gnu.org; 6 Dec 2019 18:21:49 +0000 Received: from localhost ([127.0.0.1]:47026 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idIEf-00053J-BP for submit@debbugs.gnu.org; Fri, 06 Dec 2019 13:21:49 -0500 Received: from mx1.riseup.net ([198.252.153.129]:41836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1idIEb-00052Q-Pa for 38408@debbugs.gnu.org; Fri, 06 Dec 2019 13:21:47 -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 47V1Bd1HkPzDt64 for <38408@debbugs.gnu.org>; Fri, 6 Dec 2019 10:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1575656505; bh=QPS3bM4nS0tAl4W8u0V3hVdrklAjhLVj58YZIA1k25M=; h=From:To:Cc:Subject:Date:From; b=PfqeM9B/dzlGf6Li4T4OafbOiale8W5vSSDND6WUHG8H0urIEex/zpJT2r3t/yW0+ srimuJbrg4wifY5qKMd/EHjhJrc8qSTVbSCyTBbpZBiS/z8SXOilM5HUQLm1aSNAWX yc733yDvbDG3f/SagTPz+Sa70HQfzA0ALq57+UpE= X-Riseup-User-ID: 661A2108CF12647199D64417387C268023DC2B298670B8A84B09C8C21603B512 Received: from [127.0.0.1] (localhost [127.0.0.1]) by capuchin.riseup.net (Postfix) with ESMTPSA id 47V1Bc3hMdz8syM; Fri, 6 Dec 2019 10:21:44 -0800 (PST) From: Martin Becze Date: Fri, 6 Dec 2019 13:21:32 -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 makes one little change from the prevous version (https://issues.guix.gnu.org/issue/38408#13). I found out that crates could have duplicate dependencies in for every possible target in their Cargo.toml. So just depuplicating the build dependencies agains the normal depedencies was not enough. We need to make sure all the dependencies are unqie! -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 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(-)