From: "Ignas Lapėnas" <ignas@lapenas.dev>
To: Wilko Meyer <w@wmeyer.eu>
Cc: help-guix@gnu.org
Subject: Re: proper way to resolve dependency version conflicts of rust crates?
Date: Mon, 08 Jan 2024 12:02:29 +0200 [thread overview]
Message-ID: <87mstguo9v.fsf@lapenas.dev> (raw)
In-Reply-To: <87v885axd0.fsf@wmeyer.eu>
Hi,
> 1. Sent a patch to the upstream of the crate as well as to guix updating
> all crate dependencies to most-recent.
Sending a patch upstream updating package versions is probably desired by the
guix rust-team, can’t actually answer that. Contributing is another beast to
tackle for me some time in the future. Best guess, guix-devel mailing list
should provide an answer for that.
> 2. Define a package variant of said dependency, let’s say foo-0.13-1 for
> v0.13.1 of foo.
I doubt that this is necessary if the package in question follows semver rules.
> 3. Substitute the required version in Cargo.toml of a affected crate to
> match the package-version of said dependency we’ve packaged in Guix.
>
> If I had to guess 3. would be the most appropriate way forward on this?
I would go with option 3.
Currently most packages I see drops the ’=’ altogether in favor of ’^’.
For example the rust-base64 package:
┌────
│ (define-public rust-base64-0.13
│ (package
│ (inherit rust-base64-0.21)
│ (name "rust-base64")
│ (version "0.13.1")
│ (source
│ (origin
│ (method url-fetch)
│ (uri (crate-uri "base64" version))
│ (file-name
│ (string-append name "-" version ".tar.gz"))
│ (sha256
│ (base32 "1s494mqmzjb766fy1kqlccgfg2sdcjb6hzbvzqv2jw65fdi5h6wy"))
│ (modules '((guix build utils)))
│ (snippet
│ '(begin (substitute* "Cargo.toml"
│ (("=0\\.3\\.2") "^0.3.2"))))))
│ (arguments
│ `(#:cargo-development-inputs
│ (("rust-criterion" ,rust-criterion-0.3)
│ ("rust-rand" ,rust-rand-0.6)
│ ("rust-structopt" ,rust-structopt-0.3))))))
└────
Hope my blabering helps you mate.
–
Best Regards,
Ignas Lapėnas
next prev parent reply other threads:[~2024-01-08 10:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-07 16:32 proper way to resolve dependency version conflicts of rust crates? Wilko Meyer
2024-01-08 10:02 ` Ignas Lapėnas [this message]
2024-01-14 1:33 ` Wilko Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mstguo9v.fsf@lapenas.dev \
--to=ignas@lapenas.dev \
--cc=help-guix@gnu.org \
--cc=w@wmeyer.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.