diff mbox series

[bug#56298,5/7] gnu: rust-anyhow-1: Update to 1.0.58.

Message ID 9c646934de8160f6782e20fbd6ebadf5bf11f69e.1656513323.git.peter@polidoro.io
State New
Headers show
Series Add python-cmsis-pack-manager and dependencies | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Peter Polidoro June 29, 2022, 2:46 p.m. UTC
From: Peter Polidoro <peter@polidoro.io>

* gnu/packages/crates-io.scm (rust-anyhow-1): Update to 1.0.58.
---
 gnu/packages/crates-io.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

M July 27, 2022, 4:01 p.m. UTC | #1
On 29-06-2022 16:46, peter@polidoro.io wrote:
>       (build-system cargo-build-system)
>       (arguments
> -     `(#:cargo-development-inputs
> +     `(#:cargo-inputs (("rust-backtrace" ,rust-backtrace-0.3))
> +       #:cargo-development-inputs
>          (("rust-futures" ,rust-futures-0.3)
>           ("rust-rustversion" ,rust-rustversion-1)
> +        ("rust-syn" ,rust-syn-1)
>           ("rust-thiserror" ,rust-thiserror-1)
>           ("rust-trybuild" ,rust-trybuild-1))))

I assume you updated rust-rustversion to update rust-anyhow?  If so, I 
have looked at the Cargo.toml of anyhow. It is very picky in the version 
of dependents, so if in the future we update rust-rustversion again, 
rust-anyhow will fail to build. To be robust to that, the Cargo.toml 
needs to be patched to be less picky, or alternatively you could wait 
for antioxidant which ignores the version specifications entirely.

Greetings,
Maxime.
M July 29, 2022, 7:26 p.m. UTC | #2
On 27-07-2022 18:01, Maxime Devos wrote:
> I assume you updated rust-rustversion to update rust-anyhow?  If so, I 
> have looked at the Cargo.toml of anyhow. It is very picky in the 
> version of dependents, so if in the future we update rust-rustversion 
> again, rust-anyhow will fail to build. To be robust to that, the 
> Cargo.toml needs to be patched to be less picky, or alternatively you 
> could wait for antioxidant which ignores the version specifications 
> entirely. 

Nevermind, from 
<https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html>:

> The string |"0.1.12"| is a version requirement. Although it looks like 
> a specific /version/ of the |time| crate, it actually specifies a 
> /range/ of versions and allows SemVer <https://semver.org> compatible 
> updates. An update is allowed if the new version number does not 
> modify the left-most non-zero digit in the major, minor, patch 
> grouping. In this case, if we ran |cargo update -p time|, cargo should 
> update us to version |0.1.13| if it is the latest |0.1.z| release, but 
> would not update us to |0.2.0|. If instead we had specified the 
> version string as |1.0|, cargo should update to |1.1| if it is the 
> latest |1.y| release, but not |2.0|. The version |0.0.x| is not 
> considered compatible with any other version.
>
(if it used = or <=, that would be a different manner)

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index d309d212b9..155d693430 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -2839,7 +2839,7 @@  (define-public rust-antidote-1
 (define-public rust-anyhow-1
   (package
     (name "rust-anyhow")
-    (version "1.0.46")
+    (version "1.0.58")
     (source
      (origin
        (method url-fetch)
@@ -2848,12 +2848,14 @@  (define-public rust-anyhow-1
         (string-append name "-" version ".tar.gz"))
        (sha256
         (base32
-         "0w0zm1bqk5kbk834r4xszlzqiln4vw5k1lnlswyjkh24khi2ia1s"))))
+         "014pw61axl4idagjdh9x96b06cy12vqs5599mzi11gnd7h2x41xv"))))
     (build-system cargo-build-system)
     (arguments
-     `(#:cargo-development-inputs
+     `(#:cargo-inputs (("rust-backtrace" ,rust-backtrace-0.3))
+       #:cargo-development-inputs
        (("rust-futures" ,rust-futures-0.3)
         ("rust-rustversion" ,rust-rustversion-1)
+        ("rust-syn" ,rust-syn-1)
         ("rust-thiserror" ,rust-thiserror-1)
         ("rust-trybuild" ,rust-trybuild-1))))
     (home-page "https://github.com/dtolnay/anyhow")