Xion / gisht

Gists in the shell
GNU General Public License v2.0
27 stars 0 forks source link

Panic on fresh Linux box #22

Closed Xion closed 6 years ago

Xion commented 6 years ago
$ RUST_BACKTRACE=1 inv run -- Xion/list_tags.sh
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/gisht Xion/list_tags.sh`
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /checkout/src/libcore/option.rs:335:20
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:60
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:611
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:572
   6: std::panicking::begin_panic_fmt
             at /checkout/src/libstd/panicking.rs:522
   7: rust_begin_unwind
             at /checkout/src/libstd/panicking.rs:498
   8: core::panicking::panic_fmt
             at /checkout/src/libcore/panicking.rs:71
   9: core::panicking::panic
             at /checkout/src/libcore/panicking.rs:51
  10: <core::option::Option<T>>::unwrap
             at /checkout/src/libcore/macros.rs:32
  11: gisht::hosts::github::api::GistsIterator::gist_from_json
             at src/hosts/github/api.rs:155
  12: gisht::hosts::github::api::GistsIterator::next_cached
             at src/hosts/github/api.rs:106
  13: <gisht::hosts::github::api::GistsIterator<'o> as core::iter::iterator::Iterator>::next
             at src/hosts/github/api.rs:95
  14: <&'a mut I as core::iter::iterator::Iterator>::next
             at /checkout/src/libcore/iter/iterator.rs:2278
  15: core::iter::iterator::Iterator::find
             at /checkout/src/libcore/iter/iterator.rs:1565
  16: gisht::hosts::github::resolve_gist
             at src/hosts/github/mod.rs:191
  17: <gisht::hosts::github::GitHub as gisht::hosts::Host>::fetch_gist
             at src/hosts/github/mod.rs:50
  18: gisht::decode_gist
             at src/main.rs:244
  19: gisht::main
             at src/main.rs:126
  20: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:99
  21: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:61
  22: main
  23: __libc_start_main
  24: _start
Xion commented 6 years ago

Running it with -vv gives the following logs before the panic happens:

D2017-11-07T12:15:02.0804Z main#162] gisht v0.1.0 (rev. 554f0a6)
T2017-11-07T12:15:02.0804Z main#166] Built with stable rustc 1.21.0 (3b72af97e 2017-10-09) on x86_64-unknown-linux-gnu
T2017-11-07T12:15:02.0804Z main#176] Application directory (/home/karolk/.gisht) already exists, skipping creation.
D2017-11-07T12:15:02.0804Z main#216] Gist gh:Xion/list_tags.sh specified as the argument
T2017-11-07T12:15:02.0804Z main#235] Gist gh:Xion/list_tags.sh hasn't been downloaded yet
D2017-11-07T12:15:02.0804Z main#242] Possibly fetching or updating gist gh:Xion/list_tags.sh...
T2017-11-07T12:15:02.0804Z hosts::github#171] Resolving GitHub gist: gh:Xion/list_tags.sh
D2017-11-07T12:15:02.0804Z hosts::github::api#65] Iterating over GitHub gists for user Xion
T2017-11-07T12:15:02.0818Z hosts::github::api#124] Listing GitHub gists from https://api.github.com/users/Xion/gists?per_page=50
T2017-11-07T12:15:03.0633Z hosts::github::api#135] Result page with 40 gist(s) found
D2017-11-07T12:15:03.0633Z hosts::github::api#148] Got to the end of gists for GitHub user Xion
Xion commented 6 years ago

This appears to be a latent bug after serde_json migration, so it's been here for ages :(