Skip to content

Conversation

klensy
Copy link
Contributor

@klensy klensy commented Apr 3, 2024

Fixes #1886

Instead of:

$ ./target/debug/collector.exe binary_stats +nightly-x86_64-pc-windows-msvc \
    --rustc2 +nightly-x86_64-pc-windows-msvc --include "helloworldasd" --profile Debug --backend Llvm
collector error: Warning: one or more unused --include entries: ["helloworldasd"]

will print:

$ ./target/debug/collector.exe binary_stats +nightly-x86_64-pc-windows-msvc \
    --rustc2 +nightly-x86_64-pc-windows-msvc --include "helloworldasd" --profile Debug --backend Llvm
collector error: Warning: one or more unused --include entries: ["helloworldasd"] found.
Expected zero or more entries or substrings from list: ["await-call-tree", "bitmaps-3.1.0", "cargo-0.60.0", "clap-3.1.6", "coercions", "cranelift-codegen-0.82.1", "ctfe-stress-5", "deep-vector", "deeply-nested-multi", "derive", "diesel-1.4.8", "encoding", "exa-0.10.1", "externs", "futures", "helloworld", "helloworld-tiny", "html5ever", "html5ever-0.26.0", "hyper-0.14.18", "image-0.24.1", "inflate", "issue-46449", "issue-58319", "issue-88862", "libc-0.2.124", "many-assoc-items", "match-stress", "piston-image", "projection-caching", "regex", "regex-1.5.5", "regression-31157", "ripgrep-13.0.0", "ripgrep-13.0.0-tiny", "serde-1.0.136", "serde_derive-1.0.136", "stm32f4-0.14.0", "style-servo", "syn", "syn-1.0.89", "token-stream-stress", "tokio-webpush-simple", "tt-muncher", "tuple-stress", "typenum-1.17.0", "ucd", "unicode-normalization-0.1.19", "unify-linearly", "unused-warnings", "webrender-2022", "wf-projection-stress-65510", "wg-grammar"].

First commit reworks include\exclude\exclude_suffix args to be parsed by clap as Vec instead of Option and later manually parsed, second one adds existing bench list to error output.

…of Option<String>

allows to skip manual arg parse in multiple places
Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nit, otherwise LGTM.

Copy link
Member

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! :)

@Kobzol Kobzol merged commit cbc8105 into rust-lang:master Apr 4, 2024
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.

collector should print more descriptive error if found no matches for include/exclude option
2 participants