Repository navigation
Conversation
Cargo 1.100 reports `unused dependency` for four entries under `cargo clippy --workspace` (the `unused_dependencies` lint, https://doc.rust-lang.org/cargo/reference/lints.html), and a fifth, craft-video's `thiserror`, once those are cleared. - craft-svg: `craft-image-codecs` is used only by the `tree` module, so it is optional and the `tree` feature turns it on. - craft-update: `getrandom` is removed; no source, test or target-specific code uses it, and it set no features. - craft-video: `craft-media` and `thiserror` are used only by the codec modules, so both are optional. Each codec feature turns on what its module uses: `dnx` adds `dep:craft-media`, and every feature whose module derives `thiserror::Error` adds `dep:thiserror`. The AVI dev-dependency stays for the MPEG-4 Part 2 end-to-end test. The codec, SVG and update features build as before.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 26 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
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.
Summary
Cargo 1.100 reports
unused dependencyfor four manifest entries undercargo clippy --workspace(theunused_dependencieslint: https://doc.rust-lang.org/cargo/reference/lints.html), and for a fifth, craft-video'sthiserror, once those four are cleared.craft-image-codecsis used only by thetreemodule. It is now optional, andtreeturns it on withdep:craft-image-codecs.tree-text,tree-renderand the othertree-*features still go throughtree.getrandom = "0.3"is removed. No source, test or target-specific code in the crate uses it, and it set no features.Cargo.lockloses only that one edge; thegetrandom 0.3.4package stays for the other crates that use it.craft-mediaandthiserrorare used only by the codec modules, so both are optional.dnxaddsdep:craft-media; the other features whose modules use craft-media already name acraft-media/...feature, which turns the optional dependency on (https://doc.rust-lang.org/cargo/reference/features.html). Each feature whose module derivesthiserror::Error(dnx, apv, vp8, mpeg2-decode, mpeg4-encode, prores, h264, hevc-decode, vp9-decode, av1-decode) addsdep:thiserror. Thecraft-mediadev-dependency withavistays for thempeg4_encodetest.A build with no features no longer compiles
craft-mediaandthiserrorinto craft-video, orcraft-image-codecsinto craft-svg. Every feature builds as before.Validation
With cargo 1.100.0, on
mainat6c894be8. The feature-by-feature checks ran onb77af389; the commits between the two change onlycrates/idml.cargo fmt --all -- --check: clean.cargo clippy --workspace --locked: 0unused dependencywarnings (4 onmainatb77af389).cargo check --workspace --tests --locked: passes.cargo clippy -p craft-svg -p craft-update -p craft-video --all-targets --all-features -- -D warnings(one crate per run): passes.cargo check -p craft-video --no-default-features, and--liband--all-targetswith each of the 17 codec leaf features on its own: passes with nounused dependencywarnings.cargo check -p craft-svgwith no features,tree,tree-text,tree-renderand--all-features, andcargo check -p craft-updatewith--no-default-featuresand--features egui,local-mirror, all--all-targets: passes.cargo test -p craft-video --features mpeg4-encode --test mpeg4_encode: 10 passed.dep:craft-image-codecsintree,cargo check -p craft-svg --features treefails with E0433 oncraft_image_codecs; withoutdep:thiserrorinav1-decode,cargo check -p craft-video --no-default-features --features av1-decodefails with E0433 onthiserror.craft-update's
cfg(target_os = "windows")code was not compiled here; it has nogetrandomuse, andupdate.ymlbuilds it on Windows in this pull request's CI.Pre-existing on
mainat6c894be8, with or without this change:craft-svg'stree::tests::every_limit_refuses_the_file_past_itfails atcrates/svg/src/tree/tests.rs:84.