我在一个像这样的Rust项目中添加了依赖项:
rust_wheel = { git = "https://github.com/jiangxiaoqiang/rust_wheel.git" }
当我在GitHub操作中构建这个项目时,我发现它得到了rust_wheel
的遗留版本。
Compiling rust_wheel v0.1.0 (https://github.com/jiangxiaoqiang/rust_wheel.git#5dffd2f5)
error[E0412]: cannot find type `Json` in module `content`
--> /usr/local/cargo/git/checkouts/rust_wheel-8476ff1b418e67f8/5dffd2f/src/common/util/model_convert.rs:35:50
|
35 | pub fn box_rest_response<T>(data: T) -> content::Json<String> where T: Serialize + Default {
| ^^^^ not found in `content`
|
help: consider importing one of these items
|
1 | use diesel::pg::types::sql_types::Json;
GitHub Actions获得了5dffd2f5
版本,但rust_wheel
的最新版本是52bccd9a4a3ece5cf9416510b7f8a4274d205da1
。为什么没买到最新的?我应该怎么做才能使它获得最新版本的依赖关系?
发布于 2022-05-24 17:50:49
很可能您有一个Cargo.lock
文件,它的目的是通过跟踪所使用的特定版本来防止从您的鼻子下面更新依赖项。如果要使用的git存储库中有更改,可以使用cargo update
更新Cargo.lock
文件。
cargo update -p rust_wheel
另一个选项是显式定义要在Cargo.toml
中使用的修订。
rust_wheel = { git = "https://github.com/jiangxiaoqiang/rust_wheel.git", rev = "52bccd9a" }
https://stackoverflow.com/questions/72367081
复制相似问题