From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:1008:1e59::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YFFiKIK1hGWESQEAkFu2QA (envelope-from ) for ; Thu, 21 Dec 2023 23:00:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 6GtwIoK1hGWWQgEA62LTzQ (envelope-from ) for ; Thu, 21 Dec 2023 23:00:34 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=o8lM8t44; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1703196034; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=0sRJnRDyxZs04CV11daa7aSCg/6PC823fU2pqN9bldw=; b=AkPBvmBIHMbWZWUr+pCdd52hYdllFLxjDQ8W+vaaSqjLAzjiFpqoeyxQJ7oiRlSh2xTsGu /sZx8HCPTcDfLBU9PA5+VePrRisIzwYU3ELdQW9MpYRn0LCN7M3I+iDhuf+ZHNGeOTtDQN R2QW1E6gOz+FOBq3s0gKOCx6uaR0lfBaKRbyRQZZKaL1LqzhVZAyQLVFNzXrc8hLOY7CWy sVl17y+l2XiJlUzPh6BW+6Oii0ixkCDYKL3KOMwuvijp8WC3JtOA29c0fkdncAChs8LJGi D/l3k3x958tRVAXUcmLJdQJNOUEQK5ImGp1INSr2QAezkzF3ELeg1JzpdyRSVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=o8lM8t44; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1703196034; a=rsa-sha256; cv=none; b=ERK6uT9cWNH4bXTPjMEQLIJb8MNyal4ZRkSLm+rRbOp4LHP2pXgijMyrWnOH2m44R7BsnT q8BNGh52rzjp/KywOxQeC/+YqtKw9GhXJ/K/IEMGU4Yo5khYo2lGNCAcIOYxZrCjB02B8p zTR1Kwgnkcqf60xYCSjrjRgsJJredtWjX5f1fuV9LK9ZgwepReTFqytxXe7nQ4DXbmRbay 0L3J2yVuuEphCPNTwgGuqE8OWzFoFKLklryL7NJ/+AGYM+SpxVys5BW5WeEMOjBKKPB5CV qLXgNa8kV/BtJcCMsx5Yc6x88otaDDA8vrA0L6Uyz/8fpHU+L99DrHdwuW7l/g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DB79F599CF for ; Thu, 21 Dec 2023 23:00:33 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGR5L-0003p4-MJ; Thu, 21 Dec 2023 17:00:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGR5D-0003oc-2i for guix-patches@gnu.org; Thu, 21 Dec 2023 16:59:59 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rGR5C-0003G6-Ql for guix-patches@gnu.org; Thu, 21 Dec 2023 16:59:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGR5G-00020m-J6 for guix-patches@gnu.org; Thu, 21 Dec 2023 17:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67960] [PATCH 0/4] Improve the crate importer. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Dec 2023 22:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67960 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67960@debbugs.gnu.org Cc: David Elsing X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17031959887681 (code B ref -1); Thu, 21 Dec 2023 22:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Dec 2023 21:59:48 +0000 Received: from localhost ([127.0.0.1]:45608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGR52-0001zo-EB for submit@debbugs.gnu.org; Thu, 21 Dec 2023 16:59:48 -0500 Received: from lists.gnu.org ([2001:470:142::17]:48162) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGR50-0001zb-L5 for submit@debbugs.gnu.org; Thu, 21 Dec 2023 16:59:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGR4q-0003m0-EN for guix-patches@gnu.org; Thu, 21 Dec 2023 16:59:36 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGR4o-00036f-7R for guix-patches@gnu.org; Thu, 21 Dec 2023 16:59:36 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B82BE240101 for ; Thu, 21 Dec 2023 22:59:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1703195967; bh=3KFATatliYlf/3vBo/K0V+oTi8dAQxTPik2/oTBsKd8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=o8lM8t44Ao9sKbI+AlN4cOFbF/csvAnjk32DkGkKt4nUbdVnB8AIIPnUEbsJs5CaG rMzW6eHvS2EJ+hg/EYHBaw92n9ZR+KBr8t1iHOL2OnBpPdSREZb3kFaRy2+YGphLR9 a+SrqVdeQEAMlcqXtTqPtiHREbwAb4kPdfGJ68TpR/Z/XuCG7cWkPcUaG4U2hqVcYn SjGpkMGunr+5flgaGg/BURiLN/Ab0YHJSWieRPIyZplQVOfixlNoIcCuCICexvnLZt bbdQzZcxvRtBgwHpAco/K9ZCROvtIUEmGIJGB+K6RExhFU9z5tpHlNr0FCW13eJQLC mDqfWJM2jzvgQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Sx48b1mwLz6tvt; Thu, 21 Dec 2023 22:59:26 +0100 (CET) From: David Elsing Date: Thu, 21 Dec 2023 21:59:02 +0000 Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.66; envelope-from=david.elsing@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.83 X-Spam-Score: -3.83 X-Migadu-Queue-Id: DB79F599CF X-Migadu-Scanner: mx10.migadu.com X-TUID: T4GfoUtmkVRW This patch series contains improvements to the crate importer. The first patch fixes the memoization in crate-recursive-import. The second patch allows for including the cargo-development-inputs also in recursively imported crates by specifying --recursive-dev-dependencies, such that the tests of all imported crates can be run. The third patch removes the dependency of a test in tests/crate.scm on an existing crate in gnu/packages/crates.io. Sometimes, it can happen that a crate requires a dependency for which only a yanked version exists, which is addressed in the fourth patch. Instead of simply failing, I changed the behavior to also import yanked versions if no non-yanked version exists. Then, they can be used anyway or be manually patched out from the dependent packages. Their packages obtain a different package name (including the full version) and a package property marking them as yanked. The logic to decide which version to use naturally became more complicated as a result. David Elsing (4): gnu: import: Fix memoization in crate-recursive-import. import: crate: Optionally import dev-dependencies recursively. tests: Mock find-packages-by-name in crate importer test. guix: import: Optionally import necessary yanked crates. doc/guix.texi | 7 + guix/import/crate.scm | 161 +++++++--- guix/read-print.scm | 1 + guix/scripts/import/crate.scm | 24 +- tests/crate.scm | 576 +++++++++++++++++++++++++++++----- 5 files changed, 653 insertions(+), 116 deletions(-) -- 2.41.0