-
Notifications
You must be signed in to change notification settings - Fork 55
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
Add FileCheck mode #354
base: master
Are you sure you want to change the base?
Add FileCheck mode #354
Conversation
ec02d48
to
5823c18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really sure why this changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are autogenerated by trycmd
when running tests, based on the content of the cli options.
I forgot the details, but in tests/README.md I added some info a while ago
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant I'm not sure specifically why the formatting of the help output changed here - descriptions are now all placed on the following line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did some bisection of your patchset. The change that trigger this is the new command line argument
#[arg(long, help = "Path to LLVM FileCheck")]
filecheck_path: Option<PathBuf>,
if you remove the underscore from the parameter name (for example to filecheckpath
), the help output does not add a newline anymore.
So, the issue is with clap
. I quickly skimmed the changelog but couldn't find anything explaining this strange thing. Feel free to investigate further 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it's not the underscore, it's the name length - I think when the size of the longest arg name + the longest help string are such that having all arguments inline would be very long, it's wrapped round to a new line
Repro: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ba39c32190f89d5b28976c14b28e58cb
Remove the S
from the argument name and it'll be in-line
This allows using, e.g.
cargo-bisect-rustc --start 1.70.0 --filecheck src/lib.rs --preserve --regress success
to investigate codegen regressions/improvements