Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(derive): Couple derive version to clap #3636

Merged
merged 1 commit into from
Apr 15, 2022
Merged

Conversation

epage
Copy link
Member

@epage epage commented Apr 15, 2022

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

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
@epage epage merged commit 4abf9d7 into clap-rs:master Apr 15, 2022
@epage epage deleted the derive branch April 15, 2022 19:35
facebook-github-bot pushed a commit to facebook/buck2 that referenced this pull request Jun 20, 2022
Summary: For: clap-rs/clap#3636

Reviewed By: IanChilds

Differential Revision: D37273461

fbshipit-source-id: db58a28d70d6d2307ef58dc1f3f52e2e8e23b5e8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant