* (rust) Do we always need to package minor versions separately?
@ 2022-03-08 17:43 Maxime Devos
2022-03-08 21:01 ` Liliana Marie Prikler
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Devos @ 2022-03-08 17:43 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1064 bytes --]
Hi guix,
Many rust crates are available in multiple versions in Guix
(say, rust-wayland-scanner-0.29). The reason is that ((guix)Rust
Crates):
In the rust ecosystem it is common for multiple incompatible versions
of a package to be used at any given time, so all package definitions
should have a versioned suffix. The versioned suffix is the left-most
non-zero digit (and any leading zeros, of course). This follows the
“caret” version scheme intended by Cargo. Examples ‘rust-clap-2’,
‘rust-rand-0.6’.
I understand the point about version incompatibilities in the land of
oxides. However, what if a crate is being nice by striving to be
backwards-compatible, perhaps even using, say, semver, to indicate
incompatibilities clearly? Is it then still necessary to package the
different minor versions, or would major versions suffice?
I would hope the latter, but I don't know any rust.
(Asked in the context of reviewing Rust patches like 54299 and perhaps
simplifying Rust packages in Guix.)
Greetings,
Maxime
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (rust) Do we always need to package minor versions separately?
2022-03-08 17:43 (rust) Do we always need to package minor versions separately? Maxime Devos
@ 2022-03-08 21:01 ` Liliana Marie Prikler
2022-03-10 11:40 ` Hartmut Goebel
0 siblings, 1 reply; 3+ messages in thread
From: Liliana Marie Prikler @ 2022-03-08 21:01 UTC (permalink / raw)
To: Maxime Devos, guix-devel
Hi,
Am Dienstag, dem 08.03.2022 um 18:43 +0100 schrieb Maxime Devos:
> Hi guix,
>
> Many rust crates are available in multiple versions in Guix
> (say, rust-wayland-scanner-0.29). The reason is that ((guix)Rust
> Crates):
>
> In the rust ecosystem it is common for multiple incompatible
> versions of a package to be used at any given time, so all package
> definitions should have a versioned suffix. The versioned suffix is
> the left-most non-zero digit (and any leading zeros, of course).
> This follows the “caret” version scheme intended by Cargo. Examples
> ‘rust-clap-2’, ‘rust-rand-0.6’.
>
> I understand the point about version incompatibilities in the land of
> oxides. However, what if a crate is being nice by striving to be
> backwards-compatible, perhaps even using, say, semver, to indicate
> incompatibilities clearly? Is it then still necessary to package the
> different minor versions, or would major versions suffice?
>
> I would hope the latter, but I don't know any rust.
What both you and the manual describe is actually well-defined semver,
which is "required" by Cargo. clap 2.x is supposed to be compatible
with 2.y, y < x or the other way round depending on which direction
you're looking at, but not 1.z. The exception here is 0.whatever,
which according to semver is a wild land in which everything is
permitted. Or in the words of the spec:
> Major version zero (0.y.z) is for initial development. Anything MAY
> change at any time. The public API SHOULD NOT be considered stable.
In practice, we assume 0.y.z be compatible with 0.y.a, a < z or the
other way round depending on which direction you're looking at. I'm
not sure if this is a rust fortification of semver or just Guix
intuition. Another important thing to take away w.r.t. semver here is
> Major version X (X.y.z | X > 0) MUST be incremented if any backwards
> incompatible changes are introduced to the public API. It MAY also
> include minor and patch level changes. Patch and minor versions MUST
> be reset to 0 when major version is incremented.
so you can't drop the rusty-oxide-12 package upon the release of rusty-
oxide-26 when there's still a consumer.
Cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: (rust) Do we always need to package minor versions separately?
2022-03-08 21:01 ` Liliana Marie Prikler
@ 2022-03-10 11:40 ` Hartmut Goebel
0 siblings, 0 replies; 3+ messages in thread
From: Hartmut Goebel @ 2022-03-10 11:40 UTC (permalink / raw)
To: Liliana Marie Prikler, Maxime Devos, guix-devel
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
Am 08.03.22 um 22:01 schrieb Liliana Marie Prikler:
> In practice, we assume 0.y.z be compatible with 0.y.a, a < z or the
> other way round depending on which direction you're looking at. I'm
> not sure if this is a rust fortification of semver
This is backed by the cargo manual
<https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html>:
An update is allowed if the new version number *does not modify the
left-most non-zero digit* in the major, minor, patch grouping.
--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software
Development
Goebel Consult, Landshut
http://www.goebel-consult.de
Blog:
https://www.goe-con.de/blog/nicht-pgp-ist-gescheitert-die-entwickler-haben-versagt
Kolumne:
https://www.goe-con.de/hartmut-goebel/cissp-gefluester/2012-02-bring-your-own-life-glosse
[-- Attachment #2: Type: text/html, Size: 2377 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-10 12:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-08 17:43 (rust) Do we always need to package minor versions separately? Maxime Devos
2022-03-08 21:01 ` Liliana Marie Prikler
2022-03-10 11:40 ` Hartmut Goebel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.