如何修复货物的“无法解析清单...”“版本不稳定”错误?

时间:2019-06-29 20:51:27

标签: rust-cargo

我尝试通过依赖jni =“ 0.12.3”来增强rust项目,而我的下一个cargo build失败并出现以下错误:

error: unable to get packages from source

Caused by:
  failed to parse manifest at `/home/thoth/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.32/Cargo.toml`

Caused by:
  editions are unstable

Caused by:
  feature `edition` is required

consider adding `cargo-features = ["edition"]` to the manifest

我正在运行从gentoo的dev-util / cargo-0.30.0 ebuild构建的货物。

1 个答案:

答案 0 :(得分:0)

由于锈是一种快速发展的语言,所以最新的板条箱似乎使用了我的较旧版本货物不支持的新功能。而且由于锈/货物没有像搬运工具的EAPI标记那样的东西,所以旧货物没有办法弄清楚这一点,因此错误消息有点间接。

我有一个理论,可以调整Cargo.lock以使用较旧版本的回溯板条箱,但是我无法找出执行此操作的过程。

升级到rust-1.34.2 ebuild,然后(不要忘记这一步:)然后使用eselect rust set 1激活了新版本的货物,它能够在没有故障的情况下构建包裹。