Explicitly specify the serde/derive dev-dependency - #1032
Merged
Merged
Conversation
Contributor
Author
|
@decathorpe pointed out that with the |
Owner
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In downstream packaging for Fedora, we routinely patch out dev-dependencies on
criterionbecause they are unnecessary (we run tests, but not benchmarks) and bring in a large tree of otherwise-unnecessary dependencies.It turns out that dropping the
criteriondev-dependency by removing this line fromCargo.tomltera/tera/Cargo.toml
Line 45 in f345cf2
breaks compiling the tests and examples, with many errors like:
This is because tests and examples rely on the
derivefeature of theserdecrate (not just havingserde_derivein the dependency tree, although the explicit dependency on it is correct sinceserde_derive::Serializeis used directly), but there’s no (dev-)dependency onserdewith thederivefeature. Instead,criterionhappens to depend onserde/derive, so it gets enabled due to feature unification.To be more explicit about this requirement, to guard against possible changes in the features used by
criterionor perhaps a future switch to a different benchmarking library, and to make downstream packaging easier, this PR adds an explicit dev-dependency onserde/derive.