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

Tokei doesn't filter children languages #966

Closed
1 task done
o2sh opened this issue Feb 20, 2023 · 2 comments
Closed
1 task done

Tokei doesn't filter children languages #966

o2sh opened this issue Feb 20, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@o2sh
Copy link
Owner

o2sh commented Feb 20, 2023

Duplicates

  • I have searched the existing issues

Current behavior 😯

Running onefetch on github's linguist repo:

image

crash report:

name = 'onefetch'
operating_system = 'Windows (Windows 10 10.0.22621) (64-bit)'
crate_version = '2.15.1'
explanation = '''
Panic occurred in file 'C:\dev\onefetch\target\release\build\onefetch-1ee8fcb6dd801208\out/language.rs' at line 3398
'''
cause = 'not implemented: Language Type Stylus'
method = 'Panic'
backtrace = '''

   0: 0x7ff6680de0af - std::sys_common::backtrace::__rust_end_short_backtrace<std::panicking::begin_panic_handler::closure_env$0,never$>
                at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library\std\src\sys_common\backtrace.rs:137
   1: 0x7ff6680e01f0 - std::panicking::begin_panic_handler
                at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library\std\src\panicking.rs:575
   2: 0x7ff668267f95 - core::panicking::panic_fmt
                at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library\core\src\panicking.rs:64
   3: 0x7ff667b16d01 - onefetch::info::langs::language::stats_loc::h3874017eb471e4af
   4: 0x7ff667b1674b - onefetch::info::langs::language::loc::h884938647e5655c6
   5: 0x7ff667b5a0c0 - onefetch::info::langs::get_loc_by_language_sorted::h52564e05d6203bef
   6: 0x7ff667b3554b - std::sys_common::backtrace::__rust_begin_short_backtrace::h56f02eeba9ad51d4
   7: 0x7ff667b5427a - <&T as core::fmt::Display>::fmt::h2b3e43223c41fb46
   8: 0x7ff6680ec3ac - alloc::boxed::impl$45::call_once
                at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library\alloc\src\boxed.rs:2000
   9: 0x7ff6680ec3ac - alloc::boxed::impl$45::call_once
                at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library\alloc\src\boxed.rs:2000
  10: 0x7ff6680ec3ac - std::sys::windows::thread::impl$0::new::thread_start
                at /rustc/fc594f15669680fa70d255faec3ca3fb507c3405/library\std\src\sys\windows\thread.rs:56
  11: 0x7ffa264a26bd - BaseThreadInitThunk
  12: 0x7ffa2798dfb8 - RtlUserThreadStart'''

Expected behavior 🤔

Stylus which is a children language of Vue should be filtered out by tokei:

image

Possible Solution 💡

return 0 here instead of panicking:

image

@o2sh o2sh added the bug Something isn't working label Feb 20, 2023
@spenserblack
Copy link
Collaborator

Oops, my bad 😞

I had assumed it was impossible to get an unregistered language type in that block.

@o2sh o2sh closed this as completed in 8947d43 Feb 21, 2023
@o2sh
Copy link
Owner Author

o2sh commented Feb 21, 2023

I had assumed it was impossible to get an unregistered language type in that block.

Same 😓

Anyway, 8947d43 should fix it 👍

o2sh added a commit that referenced this issue Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants