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

setting any cmdtime threshold results in panic #8

Closed
bugabinga opened this issue May 1, 2019 · 1 comment
Closed

setting any cmdtime threshold results in panic #8

bugabinga opened this issue May 1, 2019 · 1 comment

Comments

@bugabinga
Copy link

Setting the variable SILVER_CMDTIME_THRESHOLD to seemingly any value, results in a panic on silver init.
Values I tried:

  • no value
  • 1
  • 10
  • 500
thread 'main' panicked at 'invalid $SILVER_CMDTIME_THRESHOLD: UnknownUnit(3, 3)', src/libcore/result.rs:997:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:385
   6: rust_begin_unwind
             at src/libstd/panicking.rs:312
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:85
   8: core::result::unwrap_failed
   9: silver::modules::cmdtime::segment
  10: silver::print::prompt
  11: silver::main
  12: std::rt::lang_start::{{closure}}
  13: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  14: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:87
  15: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  16: main
  17: __libc_start_main
  18: _start

The reason seems to be, that I forgot to specify the time unit (ms).
Could you document the supported time units?

My system:

  9ms  silver -V
silver
  5s 940ms  neofetch
                   -`
                  .o+`
                 `ooo/                   oli@x230
                `+oooo:                  --------
               `+oooooo:                 OS: Arch Linux x86_64
               -+oooooo+:                Host: 23255B2 ThinkPad X230
             `/:-:++oooo+:               Kernel: 5.0.10-arch1-1-ARCH
            `/++++/+++++++:              Uptime: 3 hours, 2 mins
           `/++++++++++++++:             Packages: 676 (pacman)
          `/+++ooooooooooooo/`           Shell: fish 3.0.2
         ./ooosssso++osssssso+`          WM: sway
        .oossssso-````/ossssss+`         Theme: Adwaita [GTK2/3]
       -osssssso.      :ssssssso.        Icons: Adwaita [GTK2/3]
      :osssssss/        osssso+++.       Terminal: alacritty
     /ossssssss/        +ssssooo/-       Terminal Font: monospace
   `/ossssso+/:-        -:/+osssso+-     CPU: Intel i5-3320M (4) @ 3.300G
  `+sso+:-`                 `.-/+oso:    GPU: Intel 3rd Gen Core processo
 `++:.                           `-/+/   Memory: 1626MiB / 15853MiB
 .`                                 `/
@reujab
Copy link
Owner

reujab commented May 2, 2019

I documented the available suffixes: https://github.com/reujab/silver/wiki/Command-Time.

@reujab reujab closed this as completed May 2, 2019
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

2 participants