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

Fix examples for arbitrary process #206

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Niederb
Copy link

@Niederb Niederb commented Jun 3, 2022

The examples for arbitrary processes seems wrong. At least I had to change them to make them work.

@djc
Copy link
Contributor

djc commented Jun 6, 2022

Hmm, that's a little surprising, I guess this might be a regression from migrating to clap? Would you be able to check if this can fixed with our declarative clap setup instead?

@Niederb
Copy link
Author

Niederb commented Jun 6, 2022

I just had a quick look at the clap documentation and this is documented behavior. trailing_arguments is marked as last=true:

    #[clap(last = true)]
    trailing_arguments: Vec<String>

And from the clap-doc (https://docs.rs/clap/3.1.18/clap/struct.Arg.html#method.last)

This arg is the last, or final, positional argument (i.e. has the highest index) and is only able to be accessed via the -- syntax

I don't know if there would be another way to get it working without --.

@djc
Copy link
Contributor

djc commented Jun 8, 2022

So could we leave off the last = true?

@lukehsiao
Copy link

https://github.com/flamegraph-rs/flamegraph/pull/218/files

It looks like one of these changes already made it into main, so only the latter is relevant.

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

3 participants