Skip to content

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.

3 participants