Skip to content
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

Upgrade to clap 3. #1142

Merged
merged 3 commits into from Jan 18, 2022
Merged

Upgrade to clap 3. #1142

merged 3 commits into from Jan 18, 2022

Conversation

nnethercote
Copy link
Contributor

This requires moving away from the deprecated clap_app! macro. Clap's
derive API (formerly StructOpt) is nicer anyway, because it's not
stringly-typed.

There is quite a bit of furniture moving in execute.rs to better
separate the perf tools used for bench_* subcommands from those used
for the profile subcommands.

This requires moving away from the deprecated `clap_app!` macro. Clap's
derive API (formerly `StructOpt`) is nicer anyway, because it's not
stringly-typed.

There is quite a bit of furniture moving in `execute.rs` to better
separate the perf tools used for `bench_*` subcommands from those used
for the profile subcommands.
@nnethercote
Copy link
Contributor Author

@epage: this may be of interest after all my questions today, and I'd be happy to hear any suggestions you have. Thanks!

@Mark-Simulacrum
Copy link
Member

Would you be up for bumping clap in database as well? That should be significantly easier (the options are much more limited, I suspect) -- it would be nice to avoid depending on 2.x and 3.x at the same time.

Copy link

@epage epage left a comment

Choose a reason for hiding this comment

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

I didn't dig into verifying clap_app -> derive but instead focused on how the derive is being used.

collector/src/main.rs Show resolved Hide resolved
collector/src/main.rs Show resolved Hide resolved
collector/src/main.rs Show resolved Hide resolved
collector/src/main.rs Show resolved Hide resolved
collector/src/main.rs Show resolved Hide resolved
collector/src/main.rs Show resolved Hide resolved
@nnethercote
Copy link
Contributor Author

Would you be up for bumping clap in database as well? That should be significantly easier (the options are much more limited, I suspect) -- it would be nice to avoid depending on 2.x and 3.x at the same time.

No problem. I didn't even know that usage was there. I'll do it in a follow-up PR to avoid scope creep here.

@nnethercote
Copy link
Contributor Author

Thanks @epage for the helpful suggestions :)

@Mark-Simulacrum
Copy link
Member

@nnethercote I think this broadly seems good to me, but it looks like there are some ongoing(?) conversations on potential cleanups/simplifications that could be done -- can you comment when you want to move ahead?

@nnethercote
Copy link
Contributor Author

@Mark-Simulacrum I'm happy with the current code as it is.

Pretty minor stuff, mostly renamed functions.
@nnethercote
Copy link
Contributor Author

Having said that, I just added a commit to update database to clap 3 as well. It's much simpler.

@nnethercote
Copy link
Contributor Author

Note: The same "Test profiling" failure is happening on some other PRs, so it isn't caused by this PR's changes.

@nnethercote nnethercote merged commit d676bcf into rust-lang:master Jan 18, 2022
@nnethercote nnethercote deleted the clap3-derive branch January 18, 2022 00:57
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.

None yet

4 participants