fix: fix shell generation panic due to unnecessary 'conflicts_with' #2934
+21
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
solana completions -s zsh
currently panics when trying to generate zsh completions.The root cause is the below code which defines a conflicting arg
buffer_authority
forsolana program-v4 show
, howeverbuffer_authority
is not an argument inprogram-v4 show
:agave/cli/src/program_v4.rs
Lines 277 to 283 in fc0183d
This results in clap panicking due to
find_any_arg
returningNone
, but the calling macro usesexpect()
https://github.com/clap-rs/clap/blob/v2.33.3/src/completions/macros.rs#L15
https://github.com/clap-rs/clap/blob/v2.33.3/src/app/parser.rs#L2168-L2179
Summary of Changes
.conflicts_with("buffer_authority")
fromprogram-v4 show
Fixes #2929