benfred / py-spy

Sampling profiler for Python programs
MIT License
12.53k stars 414 forks source link

Shell completion generation broken in 0.3.13 #520

Closed max-ae closed 2 years ago

max-ae commented 2 years ago

https://github.com/benfred/py-spy/pull/511/commits/bfbb9a9c6303da2790a2ceb333d948b3f9586232 most likely broke shell completions.

❯ py-spy completions fish
thread 'main' panicked at 'Must use `_os` lookups with `Arg::allow_invalid_utf8` at `[hash: EFB57B56EBBA4CFA]`', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.15/src/parser/matches/arg_matches.rs:1707:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
❯ py-spy completions zsh
thread 'main' panicked at 'Must use `_os` lookups with `Arg::allow_invalid_utf8` at `[hash: EFB57B56EBBA4CFA]`', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.15/src/parser/matches/arg_matches.rs:1707:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
❯ py-spy completions bash
thread 'main' panicked at 'Must use `_os` lookups with `Arg::allow_invalid_utf8` at `[hash: EFB57B56EBBA4CFA]`', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.2.15/src/parser/matches/arg_matches.rs:1707:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
benfred commented 2 years ago

Thanks for the bug report @max-ae - I've managed to reproduce, and have a fix in #522. I'll push out a new version with the fix sometime today

benfred commented 2 years ago

Fix will be in v0.3.14 - which will be pushed out to pypi/crates.io by CI once this finishes https://github.com/benfred/py-spy/actions/runs/3010745057 in about 30 minutes