-
Notifications
You must be signed in to change notification settings - Fork 57
Code refactor #152
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Code refactor #152
Conversation
help output is identical to before the change
change was lost when rebasing rust-lang#131
Using `Command` is enough.
Also allow to remove two dependencies
Before we stored `Datetime` and `Date` altogether when our scale is the number of days Also test new date parser `GithubCommitElem::date`
`Result<T,E>` is preferred over enums as it allows to use the `?` operator, at least until `trait_v2` is stabilised if ever.
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.
just one question that wasn't clear to me from the documentation of clap/structop
#[structopt( | ||
long = "preserve-target", | ||
help = "Preserve the target directory used for builds" | ||
)] | ||
#[structopt(long, help = "Preserve the target directory used for builds")] | ||
preserve_target: bool, |
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.
are underscores converted to dashes?
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.
Yes it does, -h
after the changes
cargo-bisect-rustc 0.6.3
USAGE:
cargo-bisect-rustc [FLAGS] [OPTIONS] [-- <command-args>...]
FLAGS:
-a, --alt Download the alt build instead of normal build
--by-commit Bisect via commit artifacts
--force-install Force installation over existing artifacts
-h, --help Prints help information
--preserve Preserve the downloaded artifacts
--preserve-target Preserve the target directory used for builds
--prompt Manually evaluate for regression with prompts
-V, --version Prints version information
--verbose
--with-dev Download rustc-dev [default: no download]
--with-src Download rust-src [default: no download]
--without-cargo Do not install cargo [default: install cargo]
OPTIONS:
--access <access> How to access Rust git repository [github|checkout]
-c, --component <components>... additional components to install
--end <end> Right bound for search (*with* regression). You can use a date (YYYY-MM-DD), git
tag name (e.g. 1.58.0) or git commit SHA.
--host <host> Host triple for the compiler [default: unknown]
--install <install> Install the given artifact
--regress <regress> Custom regression definition [default: error]
--script <script> Script replacement for `cargo build` command
--start <start> Left bound for search (*without* regression). You can use a date (YYYY-MM-DD),
git tag name (e.g. 1.58.0) or git commit SHA.
--target <target> Cross-compilation target platform
--test-dir <test-dir> Root directory for tests [default: .]
-t, --timeout <timeout> Assume failure after specified number of seconds (for bisecting hangs)
ARGS:
<command-args>... Arguments to pass to cargo or the file specified by --script during tests
EXAMPLES:
Run a fully automatic nightly bisect doing `cargo check`:
```
cargo bisect-rustc --start 2018-07-07 --end 2018-07-30 --test-dir ../my_project/ -- check
```
Run a PR-based bisect with manual prompts after each run doing `cargo build`:
```
cargo bisect-rustc --start 6a1c0637ce44aeea6c60527f4c0e7fb33f2bcd0d \
--end 866a713258915e6cbb212d135f751a6a8c9e1c0a --test-dir ../my_project/ --prompt -- build
```
this is an awesome cleanup! thank you |
No functional changes
As posted on zulip this part of a larger effort to modernise the code of the project, but for the code review to be easier thought it would be better to split it in parts. The PR contains quite a few commits compared to the changes but each of those is a logic unit that pass the tests and with formatted code.