From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KLgkI13+q1+EJgAA0tVLHw (envelope-from ) for ; Wed, 11 Nov 2020 15:08:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cAPwHl3+q192EAAAB5/wlQ (envelope-from ) for ; Wed, 11 Nov 2020 15:08:13 +0000 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 CACAB9403C9 for ; Wed, 11 Nov 2020 15:08:12 +0000 (UTC) Received: from localhost ([::1]:42132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kcrjG-0008GE-9t for larch@yhetil.org; Wed, 11 Nov 2020 10:08:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcrj8-0008ES-J7 for guix-patches@gnu.org; Wed, 11 Nov 2020 10:08:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59257) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kcrj8-0008AE-6y for guix-patches@gnu.org; Wed, 11 Nov 2020 10:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kcrj8-0000Sn-1C for guix-patches@gnu.org; Wed, 11 Nov 2020 10:08:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#38408] [PATCH v16 3/6] import: crate: Use guile-semver to resolve module versions. In-Reply-To: Resent-From: Timothy Sample Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Nov 2020 15:08:01 +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: Hartmut Goebel Cc: 38408@debbugs.gnu.org, Martin Becze Received: via spool by 38408-submit@debbugs.gnu.org id=B38408.16051072251697 (code B ref 38408); Wed, 11 Nov 2020 15:08:01 +0000 Received: (at 38408) by debbugs.gnu.org; 11 Nov 2020 15:07:05 +0000 Received: from localhost ([127.0.0.1]:42568 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcriC-0000RJ-Ls for submit@debbugs.gnu.org; Wed, 11 Nov 2020 10:07:04 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:38033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kcri9-0000Qo-Lz for 38408@debbugs.gnu.org; Wed, 11 Nov 2020 10:07:03 -0500 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 8985D5C0432; Wed, 11 Nov 2020 10:06:56 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 11 Nov 2020 10:06:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=+GozZC7PNxzJu+zTAYL0YORtDITLCiUOWB1MzEuZvrw=; b=WgKN3hnK MZ9a15KV9E4WAjdO/qWkC2fs4IDA4r6L4i9RZiyQs+EsNbt4rmOPGryQhU+SDGRZ skdScZlFz5XZIEH18+NyyOO0gm1EQXb1EccuQECiRaKGCVPDK8dCp/66Dtf/Hn8s /byjlXD5FEX2Nv5T03Cina+iw/UC1ccpSGZ8yD7sKR3zpagsXZFy1s43SkxenYsP dO6qjlvRMcRxt8Tdcsko1bV9OBNaYrorqZeHiqxbKxisKR6ualnjOgFGTgf/33BS cHgBGUvi0pN8IBGDtGzIr9STSWr/JoRBfdclzFUGhDX/U9r9fRrdtPoj28V7GHyl DYaSEKGhnXOevQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvtddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhffffkfgggtgfgsehtqhertddtreejnecuhfhrohhmpefvihhmohht hhihucfurghmphhlvgcuoehsrghmphhlvghtsehnghihrhhordgtohhmqeenucggtffrrg htthgvrhhnpeehtdekgeegjeevvdfhhefhhedufeejgeffvdeigfelveehvdetleetfedu vdeuueenucffohhmrghinheprhhushhtqdhlrghnghdrohhrghenucfkphepjeegrdduud eirddukeeirdeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehsrghmphhlvghtsehnghihrhhordgtohhm X-ME-Proxy: Received: from mrblack (74-116-186-44.qc.dsl.ebox.net [74.116.186.44]) by mail.messagingengine.com (Postfix) with ESMTPA id AB8E63063088; Wed, 11 Nov 2020 10:06:55 -0500 (EST) From: Timothy Sample References: <9a14a3c5-dcab-98ce-8d81-d5c19b77cf93@crazy-compilers.com> Date: Wed, 11 Nov 2020 10:06:55 -0500 Message-ID: <87y2j8q6eo.fsf@ngyro.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) 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" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=messagingengine.com header.s=fm1 header.b=WgKN3hnK; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: YBMVxKzwF/jk Hi Hartmut, Thanks for working on this series! Hartmut Goebel writes: > Please also make sure, there is a test-case with some 0.x version, since > crates.io documentations says [1]: "This compatibility convention is > different from SemVer in the way it treats versions before 1.0.0. =E2=80= =A6" > > [1] > https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#ca= ret-requirements As the author of Guile-SemVer, I just wanted to mention that its support for caret ranges is well-tested and should work well for both NPM and Cargo. Caret ranges support the convention that version 0.x.z is compatible with 0.x.y, where y < z. The Semantic Versioning document does not require that compatibility, but I think it=E2=80=99s expected anyw= here Semantic Versioning is used. For the tests, I suggest having one test that demonstrates that the importer is relying on Semantic Versioning to resolve packages. After that, we can rely on the Guile-SemVer tests to make sure that the Semantic Versioning resolution will work even for weird edge cases. To be clear, I think the all-1.0.0 test is too simplistic. Maybe the test should provide packages A@1.2.5 and A@1.3.2, and have the requirement for package A be =E2=80=9C>=3D1.2.0 <1.3.0=E2=80=9D. It would then make su= re that A@1.2.5 is selected. That way, the test shows that the importer is actually doing some kind of resolution. You could use any range syntax, but I personally find the tildes and carets hard to understand without looking at the definition. -- Tim