知识卡片
撤回版本限制新解析
cargo yank --vers 1.0.1 让新解析避开该版本,同时允许已锁定依赖的项目继续使用。加 --undo 可恢复可选状态。撤回不会清除发布工件,意外发布的密钥需要直接吊销。
相关卡片 [[发布工件按版本固定]]
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 深入 Cargo 与 Crates.io Setting Up a Crates.io Account · 查看原书依据
Yanking a version prevents new projects from depending on that version while allowing all existing projects that depend on it to continue. Essentially, a yank means that all projects with a Cargo.lock will not break, and any future Cargo.lock files generated will not use the yanked version.
参考来源
- 位置:《The Rust Programming Language(第2版)》第14章 深入 Cargo 与 Crates.io(来源项目 a19c7933-4eda-4176-aebd-30fe7e1ad292,`extracted/The Rust Programming Language(第2版)/_epub-src/c14.xhtml`,块 0119)
- 结论依据:原文比较了已有锁文件和未来解析对已撤回版本的结果。
- 原始内容:Yanking a version prevents new projects from depending on that version while allowing all existing projects that depend on it to continue. Essentially, a yank means that all projects with a Cargo.lock will not break, and any future Cargo.lock files generated will not use the yanked version.