From ed57342bdd38615e0e357eb7ad2ef6772af6e85b Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 15 Apr 2022 14:09:23 -0500 Subject: [PATCH] fix(derive): Couple derive version to clap While `clap` depends on `clap_derive`, `clap_derive` inherently has a dependency on `clap` because it generates code assuming at least a specific clap version. If a new `clap_derive` is used with an old `clap`, it'll generate code that won't compile. We've kept things loose because of - Bad experiences with overly constrained version reqs - To not force new `clap` versions to release `clap_derive`. - People should have a lock file anyways The downsides: - `cargo install` does not use `Cargo.lock` by default, required `--locked` - If we want people to not skip non-patch releases when upgrading, we need it to not be a pain --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index c55134d7cda..060630b3992 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -118,7 +118,7 @@ name = "06_rustup" path = "benches/06_rustup.rs" [dependencies] -clap_derive = { path = "./clap_derive", version = "3.1.7", optional = true } +clap_derive = { path = "./clap_derive", version = "=3.1.7", optional = true } clap_lex = { path = "./clap_lex", version = "0.1.0" } bitflags = "1.2" textwrap = { version = "0.15.0", default-features = false, features = [] }