guppy-rs/guppy

`cargo-hakari generate` panics in MaterializeInc/materialize

Closed this issue · 3 comments

Porting over @guswynn's issue from the original repository: facebookarchive/cargo-guppy#658.


cargo hakari generate panics when run against https://github.com/MaterializeInc/materialize. Reproduction instructions:

$ git clone https://github.com/MaterializeInc/materialize.git
$ cd materialize
$ cargo hakari init my-workspace-hack
$ RUST_BACKTRACE=1 cargo hakari generate
The application panicked (crashed).
Message:  full value should be present
Location: /Users/benesch/.cargo/registry/src/github.com-1ecc6299db9ec823/hakari-0.11.0/src/hakari.rs:680

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 7 frames hidden ⋮                               
   8: core::panicking::panic_display::h0b3cf32cf3b35897
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:72
   9: core::panicking::panic_str::hedee8590c93b39b0
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/panicking.rs:56
  10: core::option::expect_failed::h0b457b49698c9371
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/option.rs:1880
  11: hakari::hakari::HakariBuilder::compute::h8c5877c80a9017cf
      at <unknown source file>:<unknown line>
  12: cargo_hakari::command::Command::exec::hec101a2d0b09ce33
      at <unknown source file>:<unknown line>
  13: cargo_hakari::command::Args::exec::h6f37e86ca17b5c4a
      at <unknown source file>:<unknown line>
  14: cargo_hakari::main::h5056dcf6c229d01f
      at <unknown source file>:<unknown line>
  15: std::sys_common::backtrace::__rust_begin_short_backtrace::haffac7619f39d7af
      at <unknown source file>:<unknown line>
  16: std::rt::lang_start::{{closure}}::hdb63a4232a026ebb
      at <unknown source file>:<unknown line>
  17: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h0c60ab225fafdaa1
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/core/src/ops/function.rs:283
  18: std::panicking::try::do_call::he83c34dec7ecf156
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492
  19: std::panicking::try::hf8a127683312d6e6
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456
  20: std::panic::catch_unwind::h6bfb2185c735f4ae
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137
  21: std::rt::lang_start_internal::{{closure}}::he1235e45f833117a
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148
  22: std::panicking::try::do_call::h600fcfa83f96c092
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:492
  23: std::panicking::try::h3ab439188ed13993
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panicking.rs:456
  24: std::panic::catch_unwind::hb86c613836afcf80
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/panic.rs:137
  25: std::rt::lang_start_internal::h94fa211da9d06d56
      at /rustc/897e37553bba8b42751c67658967889d11ecd120/library/std/src/rt.rs:148
  26: _main<unknown>
      at <unknown source file>:<unknown line>

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.

Figured it out -- ended up being pretty simple once I'd traced it down. See #41.

Wonderful, thank you @sunshowers!

This is now out as cargo-hakari 0.9.17.