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

Release v13.0.0-alpha.2 broken #1138

Closed
9SMTM6 opened this issue Aug 20, 2024 · 9 comments
Closed

Release v13.0.0-alpha.2 broken #1138

9SMTM6 opened this issue Aug 20, 2024 · 9 comments

Comments

@9SMTM6
Copy link

9SMTM6 commented Aug 20, 2024

If I run cargo install --git https://github.com/XAMPPRocky/tokei.git tokei then this builds successfully, but when I then run tokei I get on amd64 linux (arch linux based):

thread 'main' panicked at /home/[user]/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_builder-4.5.15/src/parser/matches/arg_matches.rs:181:17:
arg `files`'s `ArgAction` should be one of `SetTrue`, `SetFalse` which should provide a default
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: IOT instruction (core dumped)  tokei

That error doesn't look platform specific.

When I specify the last alpha release it works: cargo install --git https://github.com/XAMPPRocky/tokei.git --tag v13.0.0-alpha.1 tokei.

@XAMPPRocky
Copy link
Owner

Thank you for your issue! cc @qtfkwk it seems this is caused by your clap changes.

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 20, 2024

Can confirm @9SMTM6's error on a similar system (amd64 / debian). Looking into a fix now.

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 20, 2024

Found the same issue also affects the hidden, languages, no_ignore, no_ignore_parent, no_ignore_dot, no_ignore_vcs, and compact options, since they are also flag options.

Have a working fix now. Submitting a PR momentarily.

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

qtfkwk commented Aug 20, 2024

Sorry about that! Please pull after the PR merges (or use my fork) and confirm if the issue is resolved. Thanks!

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 20, 2024

PR: #1139

@9SMTM6
Copy link
Author

9SMTM6 commented Aug 20, 2024

I can confirm that this solves the issue cargo install --git https://github.com/qtfkwk/tokei.git --branch fix-issue-1138 tokei. I'm gonna keep this open until merged and released in case others have issues. Feel free to close if preferred or if solved.

@0323pin
Copy link

0323pin commented Aug 20, 2024

oh ... I was coming here to say this ... I get the same.

But, I'll leave the build warnings as well

warning: method `is_not_line_ending_whitespace` is never used
 --> src/utils/ext.rs:5:8
  |
3 | pub(crate) trait AsciiExt {
  |                  -------- method in this trait
4 |     fn is_whitespace(&self) -> bool;
5 |     fn is_not_line_ending_whitespace(&self) -> bool;
  |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: constant `FALLBACK_ROW_LEN` is never used
 --> src/consts.rs:3:11
  |
3 | pub const FALLBACK_ROW_LEN: usize = 81;
  |           ^^^^^^^^^^^^^^^^

warning: constant `LANGUAGE_COLUMN_WIDTH` is never used
 --> src/consts.rs:6:11
  |
6 | pub const LANGUAGE_COLUMN_WIDTH: usize = 10;
  |           ^^^^^^^^^^^^^^^^^^^^^

warning: constant `PATH_COLUMN_WIDTH` is never used
 --> src/consts.rs:7:11
  |
7 | pub const PATH_COLUMN_WIDTH: usize = 80;
  |           ^^^^^^^^^^^^^^^^^

warning: constant `FILES_COLUMN_WIDTH` is never used
 --> src/consts.rs:8:11
  |
8 | pub const FILES_COLUMN_WIDTH: usize = 8;
  |           ^^^^^^^^^^^^^^^^^^

warning: `tokei` (lib) generated 5 warnings
warning: field `verbose` is never read
  --> src/cli.rs:55:9
   |
38 | pub struct Cli {
   |            --- field in this struct
...
55 |     pub verbose: u64,
   |         ^^^^^^^
   |
   = note: `Cli` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
   = note: `#[warn(dead_code)]` on by default

warning: associated function `all` is never used
   --> src/cli_utils.rs:114:12
    |
104 | impl NumberFormatStyle {
    | ---------------------- associated function in this implementation
...
114 |     pub fn all() -> &'static [&'static str] {
    |            ^^^

warning: `tokei` (bin "tokei") generated 2 warnings

@qtfkwk
Copy link
Contributor

qtfkwk commented Aug 20, 2024

oh ... I was coming here to say this ... I get the same.

But, I'll leave the build warnings as well

Created a new issue for those: #1141

@9SMTM6
Copy link
Author

9SMTM6 commented Aug 22, 2024

alpha3 solved this particular issue.

@9SMTM6 9SMTM6 closed this as completed Aug 22, 2024
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

4 participants