货物与 0.5.0-pre2 的 `rend = "^0.5"` 不匹配

问题描述 投票:0回答:1

我在 Cargo.toml 中添加了以下行:

rkyv = { git = "https://github.com/rkyv/rkyv", rev = "e2b0241a209e70e2fdd7ec43386ee72e2021d1a8" }

其中

e2b024
取决于

rend = { version = "0.5", git = "https://github.com/rkyv/rend", branch = "master", default-features = false }

rend/Cargo.toml

[package]
name = "rend"
version = "0.5.0-pre2"

然而

cargo check
在我的项目中抱怨指定版本之间不兼容。

Error: `cargo metadata` exited with an error:     Updating crates.io index
    Updating git repository `https://github.com/rkyv/rkyv`
    Updating git repository `https://github.com/rkyv/rend`
error: failed to select a version for the requirement `rend = "^0.5"`
candidate versions found which didn't match: 0.5.0-pre2
location searched: Git repository https://github.com/rkyv/rend?branch=master
required by package `rkyv v0.8.0 (https://github.com/rkyv/rkyv?rev=e2b0241a209e70e2fdd7ec43386ee72e2021d1a8#e2b0241a)`

以下站点表示 semver 约束“^0.5”与“0.5.0-pre2”匹配。

https://jubianchi.github.io/semver-check/#/^0.5/0.5.0-pre2

我的 Cargo.toml 中是否有解决方法可以使这项工作无需克隆和修改

github.com/rkyv/*

rust rust-cargo semantic-versioning
1个回答
0
投票

正如@chayim-friedman所说,货物不会将“0.5”与“0.5.0-pre2”相匹配。

© www.soinside.com 2019 - 2024. All rights reserved.