GNU bug report logs - #38408
[PATCH 0/3] (WIP) Semantic version aware recusive importer for crates

Previous Next

Package: guix-patches;

Reported by: Martin Becze <mjbecze <at> riseup.net>

Date: Thu, 28 Nov 2019 00:14:01 UTC

Severity: normal

Tags: patch

Merged with 44560, 44694

Fixed in version 44560

Done: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Bug is archived. No further changes may be made.

Full log


Message #302 received at 38408 <at> debbugs.gnu.org (full text, mbox):

From: Timothy Sample <samplet <at> ngyro.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>
Cc: 38408 <at> debbugs.gnu.org, Martin Becze <mjbecze <at> riseup.net>
Subject: Re: [bug#38408] [PATCH v16 3/6] import: crate: Use guile-semver to
 resolve module versions.
Date: Wed, 11 Nov 2020 10:06:55 -0500
Hi Hartmut,

Thanks for working on this series!

Hartmut Goebel <h.goebel <at> crazy-compilers.com> 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. …"
>
> [1]
> https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#caret-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’s expected anywhere
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 <at> 1.2.5 and A <at> 1.3.2, and have the requirement
for package A be “>=1.2.0 <1.3.0”.  It would then make sure that A <at> 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




This bug report was last modified 4 years and 159 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.