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

--sort flag doesn't work. #1147

Closed
aljustiet opened this issue Aug 23, 2024 · 7 comments
Closed

--sort flag doesn't work. #1147

aljustiet opened this issue Aug 23, 2024 · 7 comments

Comments

@aljustiet
Copy link

aljustiet commented Aug 23, 2024

OS: Arch BTW
Package source: AUR
Tokei version: tokei-git 1:13.0.0_alpha.4.r1053.ff11207-1
When running:

tokei --sort code

having this output:

❯ command tokei --sort code
thread 'main' panicked at /home/aljustiet/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.15/src/parser/error.rs:32:9:
Mismatch between definition and access of `sort`. Could not downcast to TypeId { t: (12240482387622365497, 8168246256813923877) }, need to downcast to TypeId { t: (32853015933574672, 13565291224083057261) }

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: IOT instruction (core dumped)  command tokei --sort code
@XAMPPRocky
Copy link
Owner

Cc @qtfkwk 😀

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 23, 2024

Thanks for your issue @aljustiet!

Confirmed via:

~/github.com/qtfkwk/tokei$ git log -n 1 --pretty=format:"%h" --no-show-signature
612981e
~/github.com/qtfkwk/tokei$ cargo build
...
~/github.com/qtfkwk/tokei$ ./target/debug/tokei --sort code
thread 'main' panicked at src/cli.rs:279:64:
Mismatch between definition and access of `sort`. Could not downcast to tokei::sort::Sort, need to downcast to alloc::string::String

@aljustiet
Copy link
Author

aljustiet commented Aug 23, 2024

@qtfkwk

Did he mention you because you use Arch BTW?

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 23, 2024

I have used Arch Linux but it has been years. They mentioned me because these bugs stem from my earlier change to upgrade clap v3 to v4.

qtfkwk pushed a commit to qtfkwk/tokei that referenced this issue Aug 23, 2024
@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 23, 2024

Sorry about that! Issue should be resolved after merging PR #1149. Thanks again!

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 23, 2024

LGTM... @aljustiet please confirm the issue is resolved. Thanks again!

~/github.com/qtfkwk/tokei$ cargo install --git https://github.com/XAMPPRocky/tokei --tag v13.0.0-alpha.5 --features all tokei
...
~/github.com/qtfkwk/tokei$ tokei --sort code
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Language              Files        Lines         Code     Comments       Blanks
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 JSON                      1         1939         1939            0            0
 TOML                      3          125          104            5           16
 Shell                     1           49           38            1           10
 BASH                      4           48           30           10            8
─────────────────────────────────────────────────────────────────────────────────
 Rust                     24         4573         3850          138          585
 |- Markdown              14          394            5          335           54
 (Total)                             4967         3855          473          639
─────────────────────────────────────────────────────────────────────────────────
 HTML                      1           12            9            1            2
 |- JavaScript             1           15           11            4            0
 (Total)                               27           20            5            2
─────────────────────────────────────────────────────────────────────────────────
 Markdown                  5         1667            0         1342          325
 |- BASH                   1            3            3            0            0
 |- JSON                   1           46           46            0            0
 |- Rust                   1            7            4            3            0
 |- Shell                  1           16           14            0            2
 (Total)                             1739           67         1345          327
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Total                    39         8894         6053         1839         1002
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

@aljustiet
Copy link
Author

Fixed.

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

No branches or pull requests

3 participants