Skip to content

lintcheck: run clippy on transitive dependencies #8704

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

Closed
wants to merge 1 commit into from

Conversation

Alexendoo
Copy link
Member

cc @matthiaskrgr

changelog: lintcheck: run clippy on transitive dependencies

Switches over to cargo vendor to download the sources and some creative use of cargo check to run clippy on them

The trick is to use the fact that cargo shows warnings for patched dependencies by generating a patch entry for every (unignored) dependency

[patch.crates-io."adler-1.0.2"]
package = "adler"
path = "/home/alex/rust/clippy/target/lintcheck/vendor/adler-1.0.2"

[patch.crates-io."aho-corasick-0.7.18"]
package = "aho-corasick"
path = "/home/alex/rust/clippy/target/lintcheck/vendor/aho-corasick-0.7.18"

# ... many more

This brings the number of crates clippy is running on up to 229 (on linux) for the same set of crates (but different versions), the effects being:

Lint count changes
clippy::bind_instead_of_map 0 => 7
clippy::unicode_not_nfc 0 => 1386
clippy::trait_duplication_in_bounds 0 => 6
clippy::uninit_vec 0 => 3
clippy::blocks_in_if_conditions 0 => 1
clippy::unnecessary_cast 0 => 6
clippy::float_cmp 0 => 16
clippy::unnecessary_fold 0 => 1
clippy::manual_memcpy 0 => 1
clippy::op_ref 0 => 13
clippy::excessive_precision 0 => 1959
clippy::useless_asref 0 => 2
clippy::neg_multiply 0 => 2
clippy::ptr_eq 0 => 2
clippy::no_effect 0 => 1
clippy::erasing_op 0 => 1
clippy::needless_bitwise_bool 0 => 1
clippy::write_literal 0 => 1
clippy::manual_unwrap_or 0 => 1
clippy::into_iter_on_ref 0 => 8
clippy::ref_option_ref 0 => 4
clippy::mut_range_bound 0 => 2
clippy::match_bool 0 => 4
clippy::double_must_use 0 => 1
clippy::implicit_hasher 0 => 2
clippy::copy_iterator 0 => 5
clippy::transmute_ptr_to_ptr 0 => 15
clippy::let_unit_value 0 => 4
clippy::bool_comparison 0 => 4
clippy::redundant_pattern 0 => 2
clippy::needless_match 0 => 4
clippy::absurd_extreme_comparisons 0 => 1
clippy::format_in_format_args 0 => 1
clippy::never_loop 0 => 1
clippy::naive_bytecount 0 => 1
clippy::inconsistent_digit_grouping 0 => 2
clippy::drop_ref 0 => 2
clippy::for_kv_map 0 => 5
clippy::cast_abs_to_unsigned 0 => 6
clippy::match_wild_err_arm 0 => 2
clippy::manual_swap 0 => 1
clippy::large_stack_arrays 0 => 4
clippy::unused_unit 0 => 11
clippy::manual_split_once 0 => 1
clippy::same_item_push 0 => 3
clippy::large_enum_variant 0 => 3
clippy::transmute_float_to_int 0 => 6
clippy::needless_range_loop 0 => 6
clippy::match_ref_pats 0 => 10
clippy::iter_nth_zero 0 => 10
clippy::tabs_in_doc_comments 0 => 1
clippy::result_unit_err 0 => 19
clippy::println_empty_string 0 => 1
clippy::iter_cloned_collect 0 => 10
clippy::unused_io_amount 0 => 1
clippy::cast_ptr_alignment 0 => 146
clippy::assign_op_pattern 0 => 314
clippy::deprecated_cfg_attr 0 => 21
clippy::drop_copy 0 => 4
clippy::transmute_num_to_bytes 0 => 9
clippy::needless_continue 0 => 13
clippy::transmute_int_to_float 0 => 6
clippy::filter_next 0 => 1
clippy::wildcard_in_or_patterns 0 => 2
clippy::zero_sized_map_values 0 => 4
clippy::match_result_ok 0 => 2
clippy::needless_arbitrary_self_type 0 => 3
clippy::eq_op 0 => 6
clippy::iter_not_returning_iterator 0 => 3
clippy::explicit_counter_loop 0 => 1
clippy::ptr_offset_with_cast 0 => 26
clippy::no_effect_underscore_binding 0 => 3
clippy::flat_map_option 0 => 3
clippy::checked_conversions 0 => 8
clippy::redundant_allocation 0 => 1
clippy::transmute_ptr_to_ref 0 => 12
clippy::invalid_upcast_comparisons 0 => 1
clippy::collapsible_if 0 => 14
clippy::char_lit_as_u8 0 => 2
clippy::unnecessary_join 0 => 4
clippy::from_str_radix_10 0 => 5
clippy::only_used_in_recursion 0 => 6
clippy::useless_conversion 0 => 22
clippy::let_and_return 0 => 5
clippy::toplevel_ref_arg 0 => 3
clippy::while_let_loop 0 => 5
clippy::redundant_closure 0 => 7
clippy::wildcard_dependencies 0 => 3
clippy::unnecessary_operation 0 => 2
clippy::unnecessary_unwrap 0 => 3
clippy::type_repetition_in_bounds 0 => 44
clippy::missing_inline_in_public_items 0 => 18
clippy::extend_with_drain 0 => 8
clippy::inefficient_to_string 0 => 6
clippy::needless_bool 0 => 3
clippy::unnecessary_owned_empty_strings 0 => 3
clippy::redundant_pattern_matching 2 => 11
clippy::stable_sort_primitive 1 => 5
clippy::nonminimal_bool 1 => 10
clippy::missing_safety_doc 9 => 91
clippy::semicolon_if_nothing_returned 118 => 679
clippy::unused_self 19 => 158
clippy::wrong_self_convention 11 => 60
clippy::needless_question_mark 8 => 2
clippy::option_map_unit_fn 7 => 9
clippy::write_with_newline 2 => 33
clippy::manual_range_contains 10 => 90
clippy::cast_slice_different_sizes 1 => 3
clippy::map_clone 7 => 34
clippy::single_char_add_str 14 => 12
clippy::is_digit_ascii_radix 1 => 4
clippy::redundant_closure_for_method_calls 140 => 391
clippy::needless_return 5 => 54
clippy::cast_sign_loss 19 => 373
clippy::default_trait_access 24 => 116
clippy::manual_str_repeat 3 => 4
clippy::len_without_is_empty 9 => 29
clippy::from_over_into 2 => 26
clippy::filter_map_next 3 => 6
clippy::single_match_else 11 => 23
clippy::needless_lifetimes 12 => 91
clippy::format_push_string 24 => 27
clippy::many_single_char_names 9 => 12
clippy::cargo_common_metadata 21 => 224
clippy::unit_arg 1 => 14
clippy::field_reassign_with_default 5 => 3
clippy::single_match 2 => 9
clippy::enum_variant_names 1 => 14
clippy::needless_doctest_main 10 => 26
clippy::while_let_on_iterator 4 => 17
clippy::match_on_vec_items 2 => 4
clippy::linkedlist 14 => 11
clippy::cast_precision_loss 44 => 88
clippy::identity_op 5 => 66
clippy::needless_pass_by_value 18 => 146
clippy::mut_mut 2 => 19
clippy::mem_replace_with_default 7 => 32
clippy::expl_impl_clone_on_copy 164 => 393
clippy::verbose_bit_mask 1 => 2
clippy::single_component_path_imports 6 => 31
clippy::option_option 2 => 8
clippy::trivially_copy_pass_by_ref 26 => 285
clippy::new_without_default 5 => 55
clippy::redundant_clone 1 => 6
clippy::map_unwrap_or 20 => 122
clippy::multiple_crate_versions 9 => 23
clippy::too_many_arguments 4 => 16
clippy::ptr_arg 1 => 6
clippy::cast_lossless 44 => 413
clippy::redundant_else 29 => 104
clippy::cloned_instead_of_copied 35 => 55
clippy::module_name_repetitions 161 => 901
clippy::redundant_feature_names 4 => 21
clippy::unnested_or_patterns 25 => 89
clippy::borrow_as_ptr 2 => 160
clippy::unnecessary_wraps 35 => 138
clippy::explicit_iter_loop 5 => 106
clippy::manual_map 3 => 12
clippy::needless_late_init 1 => 12
clippy::explicit_deref_methods 1 => 32
clippy::match_wildcard_for_single_variants 9 => 68
clippy::redundant_field_names 111 => 775
clippy::len_zero 2 => 64
clippy::implicit_clone 7 => 24
clippy::collapsible_else_if 6 => 20
clippy::manual_strip 6 => 32
clippy::similar_names 82 => 361
clippy::cast_possible_wrap 19 => 443
clippy::unusual_byte_groupings 19 => 39
clippy::upper_case_acronyms 5 => 34
clippy::derivable_impls 2 => 11
clippy::manual_non_exhaustive 1 => 28
clippy::case_sensitive_file_extension_comparisons 7 => 8
clippy::crate_in_macro_def 3 => 5
clippy::unreadable_literal 365 => 3548
clippy::type_complexity 2 => 10
clippy::negative_feature_names 1 => 11
clippy::wildcard_imports 165 => 259
clippy::clone_on_copy 1 => 54
clippy::explicit_into_iter_loop 7 => 23
clippy::or_fun_call 1 => 34
clippy::unwrap_or_else_default 2 => 4
clippy::redundant_static_lifetimes 21 => 1166
clippy::precedence 1 => 2
clippy::fn_params_excessive_bools 3 => 6
clippy::option_as_ref_deref 2 => 7
clippy::missing_errors_doc 356 => 2373
clippy::match_like_matches_macro 5 => 102
clippy::single_char_pattern 11 => 72
clippy::too_many_lines 35 => 124
clippy::struct_excessive_bools 20 => 45
clippy::comparison_chain 1 => 14
clippy::enum_glob_use 44 => 277
clippy::missing_panics_doc 102 => 563
clippy::self_named_constructors 1 => 2
clippy::inline_always 59 => 851
renamed_and_removed_lints 2 => 40
clippy::used_underscore_binding 1 => 25
clippy::redundant_slicing 2 => 8
clippy::doc_markdown 190 => 1335
clippy::cast_possible_truncation 92 => 905
clippy::items_after_statements 143 => 279
clippy::needless_borrow 24 => 215
clippy::manual_assert 9 => 39
clippy::range_plus_one 7 => 70
clippy::match_same_arms 51 => 808
clippy::must_use_candidate 571 => 4258
clippy::if_not_else 35 => 182
clippy::let_underscore_drop 26 => 67
clippy::should_implement_trait 1 => 6
clippy::question_mark 2 => 8
clippy::ptr_as_ptr 91 => 1019
clippy::return_self_not_must_use 60 => 666
clippy::from_iter_instead_of_collect 3 => 13
clippy::comparison_to_empty 2 => 8
clippy::inconsistent_struct_constructor 3 => 4
clippy::if_same_then_else 3 => 19
clippy::zero_ptr 3 => 7
clippy::manual_flatten 1 => 0
clippy::int_plus_one 1 => 0
clippy::manual_saturating_arithmetic 1 => 0
clippy::unnecessary_to_owned 1 => 0
clippy::map_entry 1 => 0
clippy::unsafe_derive_deserialize 1 => 0
clippy::vec_init_then_push 2 => 0

Some more tweaking could be done on the ignore list, but the most substantial outliers are already added

Runtime wise it went from 7:08 to 8:46 on my laptop. Both times are for compiling only, not downloading the sources. My laptop has an old dual core CPU, the difference should be more favourable on higher core count machines due to the improved scheduling.

Feature wise it gained the --timings flag to enable cargo timings, which is really handy to track down the slow crates

Some things that are no longer supported are --fix and git dependencies (I believe path dependencies would still work). You also can no longer set per crate options

@rust-highfive
Copy link

r? @xFrednet

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Apr 15, 2022
@bors
Copy link
Contributor

bors commented Apr 15, 2022

☔ The latest upstream changes (presumably #8705) made this pull request unmergeable. Please resolve the merge conflicts.

@matthiaskrgr
Copy link
Member

Hm, I'm not really sure if I see the benefit here.

I want to avoid as much spurious noise in the logs as possible, so I use a fixed version root crates to run clippy on.
If we use cargo vendor and let's say ripgrep dependes on serde "1.0" and serde is updated from "1.0.136" to "1.0.137" and shows some clippy warnings as "new", will this show up as noise with your pr?

If we just care about transitive dependencies and not fixed versions of them, we can probably do something like
cargo clippy -vvv |& grep "https://rust-lang.github.io/rust-clippy.*index.html" | grep -o "#.*$" | sort -n | uniq -c | sort -n in a rusty way, without cargo vendor.

I'm not fan of losing --fix, the git repo source type was mostly intended for folks at embark who we had a meeting with at some point because of high false positives rates and such iirc,

@Alexendoo
Copy link
Member Author

If you check in the Cargo.lock for https://github.com/matthiaskrgr/clippy-lintcheck it wouldn't show up as spurious, the one in the clippy repo is .gitignore'd, but if you add rust-clippy/lintcheck/lintcheck_crates as a path dependency to the extended list I think the Cargo.lock would be populated from that. That or we could allow this specific Cargo.lock to be checked into rust-clippy

I went through a few attempts:

  • cargo clippy -vv is what I tried initially, but cargo doesn't run clippy-driver on dependant crates as it uses RUSTC_WORKSPACE_WRAPPER
  • cargo check -vv with RUSTC_WRAPPER=clippy-driver worked, but was too slow due to the substantial output volume and no capability to ignore individual crates
  • cargo check -vv with a fairly small custom RUSTC_WRAPPER around clippy-driver that implemented the ignore logic, this worked but the output from -vv wasn't super pleasant, since it contains every environment variable for every invocation and random build script output, with some filtering code it wasn't drastically unreasonable though.
  • This was the latest attempt, it's a minute or two faster than the custom driver version and the output (to the user) is the same as a normal cargo build which is nice

My goal is to get lintcheck running more clippy per second, potentially with the aim of running it against PRs (with a smaller set of crates) for say ~1 minute

@Alexendoo
Copy link
Member Author

--fix could be made to work through the rustfix library but it'd be a fair amount of work, I couldn't figure a way to convince cargo to run fix on patched crates. git dependencies are similar, needs work and I wanted to get some feedback before spending that time, particularly if it doesn't see much use

@bors
Copy link
Contributor

bors commented Apr 16, 2022

☔ The latest upstream changes (presumably #8709) made this pull request unmergeable. Please resolve the merge conflicts.

@matthiaskrgr
Copy link
Member

Aah I see now, you created some kind of "dummy" crate with a few dependencies, cargo vendor will get the dependencies for us, and the you run clippy on the crate sources.
Since the sources are "local" (vendored), cargo prints the lint warnings for these as well, instead of ignoring them?
Do I understand that correctly? 🙃

One downside of this approach is that this will be less flexible in regards of what kind of crates you can check, for example you won't be able to check two versions of the same crate (cargo 123 and cargo 234), or there can also be weird dependency incompatibilities, for example when two different root crates require different major versions of a c++ crate, I think I have seen something like that with libgit2.

Right, running cargo fix on transitive deps like that might not even be possible, I have no idea tbh :/

@Alexendoo
Copy link
Member Author

Alexendoo commented Apr 16, 2022

Yep! that's it, with the additional step of creating a patch entry for every dep, as being vendored alone isn't enough for cargo to show the warnings from them

Two versions of the same crate can work if you give one of them a different name, such as

cargo123 = { package = "cargo", version = "1.2.3" }
cargo234 = { package = "cargo", version = "2.3.4" }

...but oh god yes native dependencies can be frustrating 💢, there's some that won't let you have multiple versions of themselves in the crate graph. Fortunately that didn't come up with the current list, but it could happen with a different one

Today I was looking into how cargo fix works, but it's a bit more complicated than I initially assumed, so I'm still not sure either way 😅

However the RustfixDiagnosticServer it uses gave me an idea for an alternative implementation of this PR. lintcheck could create a TcpListener, then run RUSTC_WRAPPER=wrapper SERVER=localhost:1234 cargo check, where wrapper takes the stderr from clippy-driver and sends it to SERVER

That would allow more complicated filtering again also, such as per crate -A clippy::lint, it's still a little hacky, but I think less so than this one?

@xFrednet
Copy link
Member

My goal is to get lintcheck running more clippy per second, potentially with the aim of running it against PRs (with a smaller set of crates) for say ~1 minute

I like the general idea, could we maybe have an easy switch for this mode?

That would allow more complicated filtering again also, such as per crate -A clippy::lint, it's still a little hacky, but I think less so than this one?

lintcheck has a --filter option to narrow it down to one lint, this will also emit lints that are allowed in code.


I'm sadly not familiar with the code. @flip1995 or @matthiaskrgr could you maybe take over the review? 🙃

@flip1995
Copy link
Member

With the lintcheck tool I always defer to @matthiaskrgr myself 😄

I'm not sure how necessary this change is. Couldn't you just generate a crates list with all dependencies and feed it to the lintcheck tool?

I'm also not really a fan of losing the --fix and the git repo source option. I also liked the per-crate option field for crates.

@Alexendoo
Copy link
Member Author

I'm not sure how necessary this change is. Couldn't you just generate a crates list with all dependencies and feed it to the lintcheck tool?

You could yeah, the purpose is to make it run quicker. With the current lintcheck apart from the leaf nodes every crate would be downloaded twice - once by cargo, once by lintcheck. And I think compiled twice as well, once by rustc as a dep, and once by clippy-driver as the primary package

I'm also not really a fan of losing the --fix and the git repo source option. I also liked the per-crate option field for crates.

Yeah that's fair, I think I'm going to bring this one back to the drawing board. I'll try another PR with the wrapper method I mentioned earlier, that would allow keeping git sources and per crate options. I believe I can get --fix working too

@matthiaskrgr
Copy link
Member

I already tried speeding up checking by sharing a target dir between projects
https://github.com/rust-lang/rust-clippy/blob/master/lintcheck/src/main.rs#L333
and building root crates in parallel
https://github.com/rust-lang/rust-clippy/blob/master/lintcheck/src/main.rs#L766
I think that is what I remember the code to be doing 😅

@Alexendoo
Copy link
Member Author

I put together the equivalent list of crates to give it a go with the current lintcheck, runtime was 20mins including download time, 18mins excluding

all.toml
[crates]
aho-corasick = {name = "aho-corasick", versions = ["0.7.18"]}
anyhow = {name = "anyhow", versions = ["1.0.56"]}
arrayvec = {name = "arrayvec", versions = ["0.5.2"]}
async-trait = {name = "async-trait", versions = ["0.1.53"]}
atty = {name = "atty", versions = ["0.2.14"]}
autocfg = {name = "autocfg", versions = ["0.1.8", "1.1.0"]}
base64 = {name = "base64", versions = ["0.9.3", "0.12.3", "0.13.0"]}
bitflags = {name = "bitflags", versions = ["1.3.2"]}
bitmaps = {name = "bitmaps", versions = ["2.1.0"]}
bstr = {name = "bstr", versions = ["0.2.17"]}
byteorder = {name = "byteorder", versions = ["1.4.3"]}
bytes = {name = "bytes", versions = ["1.1.0"]}
bytesize = {name = "bytesize", versions = ["1.1.0"]}
cargo = {name = "cargo", versions = ["0.61.1"]}
cargo-platform = {name = "cargo-platform", versions = ["0.1.2"]}
cargo-util = {name = "cargo-util", versions = ["0.1.2"]}
cc = {name = "cc", versions = ["1.0.73"]}
cfg-expr = {name = "cfg-expr", versions = ["0.10.2"]}
cfg-if = {name = "cfg-if", versions = ["1.0.0"]}
chrono = {name = "chrono", versions = ["0.4.19"]}
clap = {name = "clap", versions = ["3.1.8"]}
# combine = {name = "combine", versions = ["4.6.3"]}
crates-io = {name = "crates-io", versions = ["0.34.0"]}
# crc32fast = {name = "crc32fast", versions = ["1.3.2"]}
crossbeam-channel = {name = "crossbeam-channel", versions = ["0.5.4"]}
crossbeam-deque = {name = "crossbeam-deque", versions = ["0.8.1"]}
crossbeam-epoch = {name = "crossbeam-epoch", versions = ["0.9.8"]}
crossbeam-utils = {name = "crossbeam-utils", versions = ["0.8.8"]}
crypto-hash = {name = "crypto-hash", versions = ["0.3.4"]}
curl = {name = "curl", versions = ["0.4.43"]}
# curl-sys = {name = "curl-sys", versions = ["0.4.53+curl-7.82.0"]}
cxx = {name = "cxx", versions = ["1.0.66"]}
cxxbridge-flags = {name = "cxxbridge-flags", versions = ["1.0.66"]}
cxxbridge-macro = {name = "cxxbridge-macro", versions = ["1.0.66"]}
either = {name = "either", versions = ["1.6.1"]}
env_logger = {name = "env_logger", versions = ["0.9.0"]}
fastrand = {name = "fastrand", versions = ["1.7.0"]}
filetime = {name = "filetime", versions = ["0.2.15"]}
flate2 = {name = "flate2", versions = ["1.0.23"]}
fnv = {name = "fnv", versions = ["1.0.7"]}
foreign-types = {name = "foreign-types", versions = ["0.3.2"]}
foreign-types-shared = {name = "foreign-types-shared", versions = ["0.1.1"]}
form_urlencoded = {name = "form_urlencoded", versions = ["1.0.1"]}
getrandom = {name = "getrandom", versions = ["0.2.6"]}
git2 = {name = "git2", versions = ["0.14.2"]}
git2-curl = {name = "git2-curl", versions = ["0.15.0"]}
glob = {name = "glob", versions = ["0.3.0"]}
globset = {name = "globset", versions = ["0.4.8"]}
hashbrown = {name = "hashbrown", versions = ["0.11.2"]}
hex = {name = "hex", versions = ["0.3.2", "0.4.3"]}
home = {name = "home", versions = ["0.5.3"]}
http = {name = "http", versions = ["0.2.6"]}
httparse = {name = "httparse", versions = ["1.7.0"]}
humantime = {name = "humantime", versions = ["2.1.0"]}
hyper = {name = "hyper", versions = ["0.10.16"]}
idna = {name = "idna", versions = ["0.1.5", "0.2.3"]}
ignore = {name = "ignore", versions = ["0.4.18"]}
im-rc = {name = "im-rc", versions = ["15.0.0"]}
indexmap = {name = "indexmap", versions = ["1.8.1"]}
iron = {name = "iron", versions = ["0.6.1"]}
itertools = {name = "itertools", versions = ["0.10.3"]}
itoa = {name = "itoa", versions = ["1.0.1"]}
jobserver = {name = "jobserver", versions = ["0.1.24"]}
jsonwebtoken = {name = "jsonwebtoken", versions = ["7.2.0"]}
kstring = {name = "kstring", versions = ["1.0.6"]}
language-tags = {name = "language-tags", versions = ["0.2.2"]}
lazy_static = {name = "lazy_static", versions = ["1.4.0"]}
lazycell = {name = "lazycell", versions = ["1.3.0"]}
libc = {name = "libc", versions = ["0.2.123"]}
# libgit2-sys = {name = "libgit2-sys", versions = ["0.13.2+1.4.2"]}
# libnghttp2-sys = {name = "libnghttp2-sys", versions = ["0.1.7+1.45.0"]}
# libssh2-sys = {name = "libssh2-sys", versions = ["0.2.23"]}
# libz-sys = {name = "libz-sys", versions = ["1.1.5"]}
link-cplusplus = {name = "link-cplusplus", versions = ["1.0.6"]}
linked-hash-map = {name = "linked-hash-map", versions = ["0.5.4"]}
# lintcheck_crates = {name = "lintcheck_crates", versions = ["0.0.1"]}
log = {name = "log", versions = ["0.3.9", "0.4.16"]}
matches = {name = "matches", versions = ["0.1.9"]}
memchr = {name = "memchr", versions = ["2.4.1"]}
memoffset = {name = "memoffset", versions = ["0.6.5"]}
mime = {name = "mime", versions = ["0.2.6"]}
mime_guess = {name = "mime_guess", versions = ["1.8.8"]}
modifier = {name = "modifier", versions = ["0.1.0"]}
num-bigint = {name = "num-bigint", versions = ["0.2.6"]}
num-integer = {name = "num-integer", versions = ["0.1.44"]}
num-traits = {name = "num-traits", versions = ["0.2.14"]}
num_cpus = {name = "num_cpus", versions = ["1.13.1"]}
once_cell = {name = "once_cell", versions = ["1.10.0"]}
opener = {name = "opener", versions = ["0.5.0"]}
openssl = {name = "openssl", versions = ["0.10.38"]}
openssl-probe = {name = "openssl-probe", versions = ["0.1.5"]}
# openssl-sys = {name = "openssl-sys", versions = ["0.9.72"]}
os_info = {name = "os_info", versions = ["3.2.0"]}
os_str_bytes = {name = "os_str_bytes", versions = ["6.0.0"]}
pem = {name = "pem", versions = ["0.8.3"]}
percent-encoding = {name = "percent-encoding", versions = ["1.0.1", "2.1.0"]}
phf = {name = "phf", versions = ["0.7.24"]}
phf_codegen = {name = "phf_codegen", versions = ["0.7.24"]}
phf_generator = {name = "phf_generator", versions = ["0.7.24"]}
phf_shared = {name = "phf_shared", versions = ["0.7.24"]}
pkg-config = {name = "pkg-config", versions = ["0.3.25"]}
plugin = {name = "plugin", versions = ["0.2.6"]}
ppv-lite86 = {name = "ppv-lite86", versions = ["0.2.16"]}
proc-macro2 = {name = "proc-macro2", versions = ["1.0.37"]}
puffin = {name = "puffin", versions = ["0.13.1"]}
quote = {name = "quote", versions = ["1.0.18"]}
rand = {name = "rand", versions = ["0.6.5", "0.8.5"]}
rand_chacha = {name = "rand_chacha", versions = ["0.1.1", "0.3.1"]}
rand_core = {name = "rand_core", versions = ["0.3.1", "0.4.2", "0.5.1", "0.6.3"]}
rand_hc = {name = "rand_hc", versions = ["0.1.0"]}
rand_isaac = {name = "rand_isaac", versions = ["0.1.1"]}
rand_jitter = {name = "rand_jitter", versions = ["0.1.4"]}
rand_os = {name = "rand_os", versions = ["0.1.3"]}
rand_pcg = {name = "rand_pcg", versions = ["0.1.2"]}
rand_xorshift = {name = "rand_xorshift", versions = ["0.1.1"]}
rand_xoshiro = {name = "rand_xoshiro", versions = ["0.4.0"]}
rayon = {name = "rayon", versions = ["1.5.2"]}
rayon-core = {name = "rayon-core", versions = ["1.9.2"]}
regex = {name = "regex", versions = ["1.5.5"]}
regex-automata = {name = "regex-automata", versions = ["0.1.10"]}
regex-syntax = {name = "regex-syntax", versions = ["0.6.25"]}
remove_dir_all = {name = "remove_dir_all", versions = ["0.5.3"]}
# ring = {name = "ring", versions = ["0.16.20"]}
rpmalloc = {name = "rpmalloc", versions = ["0.2.2"]}
# rpmalloc-sys = {name = "rpmalloc-sys", versions = ["0.2.3+b097fd0"]}
rustc-workspace-hack = {name = "rustc-workspace-hack", versions = ["1.0.0"]}
rustfix = {name = "rustfix", versions = ["0.6.0"]}
ryu = {name = "ryu", versions = ["1.0.9"]}
safemem = {name = "safemem", versions = ["0.3.3"]}
same-file = {name = "same-file", versions = ["1.0.6"]}
scopeguard = {name = "scopeguard", versions = ["1.1.0"]}
semver = {name = "semver", versions = ["1.0.7"]}
serde = {name = "serde", versions = ["1.0.136"]}
serde_derive = {name = "serde_derive", versions = ["1.0.136"]}
serde_ignored = {name = "serde_ignored", versions = ["0.1.2"]}
serde_json = {name = "serde_json", versions = ["1.0.79"]}
serde_yaml = {name = "serde_yaml", versions = ["0.8.23"]}
shell-escape = {name = "shell-escape", versions = ["0.1.5"]}
simple_asn1 = {name = "simple_asn1", versions = ["0.4.1"]}
siphasher = {name = "siphasher", versions = ["0.2.3"]}
sized-chunks = {name = "sized-chunks", versions = ["0.6.5"]}
smallvec = {name = "smallvec", versions = ["1.8.0"]}
socket2 = {name = "socket2", versions = ["0.4.4"]}
spin = {name = "spin", versions = ["0.5.2"]}
strip-ansi-escapes = {name = "strip-ansi-escapes", versions = ["0.1.1"]}
strsim = {name = "strsim", versions = ["0.10.0"]}
syn = {name = "syn", versions = ["1.0.91"]}
tame-oidc = {name = "tame-oidc", versions = ["0.4.0"]}
tar = {name = "tar", versions = ["0.4.38"]}
tempfile = {name = "tempfile", versions = ["3.3.0"]}
termcolor = {name = "termcolor", versions = ["1.1.3"]}
textwrap = {name = "textwrap", versions = ["0.15.0"]}
thiserror = {name = "thiserror", versions = ["1.0.30"]}
thiserror-impl = {name = "thiserror-impl", versions = ["1.0.30"]}
thread_local = {name = "thread_local", versions = ["1.1.4"]}
time = {name = "time", versions = ["0.1.43"]}
tinyvec = {name = "tinyvec", versions = ["1.5.1"]}
tinyvec_macros = {name = "tinyvec_macros", versions = ["0.1.0"]}
toml_edit = {name = "toml_edit", versions = ["0.13.4"]}
traitobject = {name = "traitobject", versions = ["0.1.0"]}
typeable = {name = "typeable", versions = ["0.1.2"]}
typemap = {name = "typemap", versions = ["0.3.3"]}
typenum = {name = "typenum", versions = ["1.15.0"]}
unicase = {name = "unicase", versions = ["1.4.2"]}
unicode-bidi = {name = "unicode-bidi", versions = ["0.3.7"]}
# unicode-normalization = {name = "unicode-normalization", versions = ["0.1.19"]}
unicode-width = {name = "unicode-width", versions = ["0.1.9"]}
unicode-xid = {name = "unicode-xid", versions = ["0.2.2"]}
unsafe-any = {name = "unsafe-any", versions = ["0.4.2"]}
untrusted = {name = "untrusted", versions = ["0.7.1"]}
url = {name = "url", versions = ["1.7.2", "2.2.2"]}
utf8parse = {name = "utf8parse", versions = ["0.2.0"]}
version_check = {name = "version_check", versions = ["0.1.5", "0.9.4"]}
vte = {name = "vte", versions = ["0.10.1"]}
vte_generate_state_changes = {name = "vte_generate_state_changes", versions = ["0.1.1"]}
walkdir = {name = "walkdir", versions = ["2.3.2"]}
yaml-rust = {name = "yaml-rust", versions = ["0.4.5"]}

@llogiq
Copy link
Contributor

llogiq commented Apr 20, 2022

Somewhat related, I recently encountered a troll on the Rust subreddit asking me how to lint all dependencies.

@xFrednet
Copy link
Member

xFrednet commented Apr 20, 2022

I put together the equivalent list of crates to give it a go with the current lintcheck, runtime was 20mins including download time, 18mins excluding

That's sadly a big difference. Have you looked into my suggestion, to have a switch for the two modes? 🙃 When we could have the best of both worlds 🙃

Somewhat related, I recently encountered a troll on the Rust subreddit asking me how to lint all dependencies.

Maybe you just found the alt account from one.. ^^

@Alexendoo
Copy link
Member Author

Have you looked into my suggestion, to have a switch for the two modes? 🙃 When we could have the best of both worlds 🙃

By this do you mean a switch for between the current behaviour and running on transitive deps, or between the current crates and fewer crates mode?

@xFrednet
Copy link
Member

Yes, the question is how complicated that would be and if it's worth it.

Also one thing I just thought of: The --markdown option tries to provide a link to the lint triggering Code. That might need some adjusted for dependency lint triggers.

@Alexendoo
Copy link
Member Author

Any fewer crates mode would definitely be off by default yeah

For switching off transitive mode it shouldn't be tooooo bad, I think I would need something like that for --fix anyway

@xFrednet
Copy link
Member

xFrednet commented May 5, 2022

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels May 5, 2022
@Alexendoo
Copy link
Member Author

Ah yeah can close this

@Alexendoo Alexendoo closed this May 5, 2022
@xFrednet
Copy link
Member

xFrednet commented May 5, 2022

Ohh, was this change of the table? I thought we were only waiting on a switch to have the best of both worlds? 🤔

@Alexendoo
Copy link
Member Author

It turned out to be quite a pain to unify the two ways, bindeps have a few teething issues. I'll still work towards it though it'll just be in a different branch, maybe as an entirely separate mode at first

@xFrednet
Copy link
Member

xFrednet commented May 5, 2022

Okay, thank you for clarifying 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants