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
This commit is contained in:
Ed Page 2022-04-15 14:09:23 -05:00
parent 297b9cf594
commit ed57342bdd

View file

@ -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 = [] }