[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#38408] [PATCH v16 3/6] import: crate: Use guile-semver to resolve m
From: |
Timothy Sample |
Subject: |
[bug#38408] [PATCH v16 3/6] import: crate: Use guile-semver to resolve module versions. |
Date: |
Wed, 11 Nov 2020 10:06:55 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi Hartmut,
Thanks for working on this series!
Hartmut Goebel <h.goebel@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@1.2.5 and A@1.3.2, and have the requirement
for package A be “>=1.2.0 <1.3.0”. It would then make sure 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
- [bug#44560] [PATCH v16 0/6] New take on: Semantic version aware recursive importer for crates, Hartmut Goebel, 2020/11/10
- [bug#38408] [PATCH v16 4/6] import: crate: Memorize crate->guix-package., Hartmut Goebel, 2020/11/10
- [bug#38408] [PATCH v16 2/6] guix: self: Add guile-semver as a depenedency., Hartmut Goebel, 2020/11/10
- [bug#38408] [PATCH v16 6/6] import: crate: Parameterized importing of dev dependencies., Hartmut Goebel, 2020/11/10
- [bug#38408] [PATCH v16 5/6] import: utils: Trim patch version from names., Hartmut Goebel, 2020/11/10
- [bug#38408] [PATCH v16 1/6] import: utils: 'recursive-import' accepts an optional version parameter., Hartmut Goebel, 2020/11/10
- [bug#38408] [PATCH v16 3/6] import: crate: Use guile-semver to resolve module versions., Hartmut Goebel, 2020/11/10
[bug#38408] [PATCH v16 0/6] New take on: Semantic version aware recursive importer for crates, Hartmut Goebel, 2020/11/10