cargo-smart-release icon indicating copy to clipboard operation
cargo-smart-release copied to clipboard

smart-release path must exist in current commit (panic)

Open xenoterracide opened this issue 1 year ago • 1 comments

Current behavior 😯

❯ RUST_BACKTRACE=1 cargo smart-release
[WARN ] Consider running with --update-crates-index to assure bumping on demand uses the latest information
[WARN ] Using 'brix' as crate name as no one was provided. Specify one if this isn't correct
thread 'main' panicked at 'path must exist in current commit', /home/xeno/.asdf/installs/rust/1.71.1/registry/src/index.crates.io-6f17d22bba15001f/cargo-smart-release-0.20.0/src/git/mod.rs:50:26
stack backtrace:
   0: rust_begin_unwind
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:67:14
   2: core::panicking::panic_display
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:150:5
   3: core::panicking::panic_str
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/panicking.rs:134:5
   4: core::option::expect_failed
             at /rustc/eb26296b556cef10fb713a38f3d16b9886080f26/library/core/src/option.rs:1932:5
   5: cargo_smart_release::git::change_since_last_release
   6: cargo_smart_release::traverse::dependencies
   7: cargo_smart_release::command::release_impl::release_depth_first
   8: cargo_smart_release::command::release_impl::release
   9: cargo_smart_release::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Expected behavior 🤔

I'm not sure; this is my first attempt to use it. I would expect more helpful messaging; at the very least. a stack trace feels weird.

Steps to reproduce 🕹

this repo/sha should reproduce

https://github.com/xenoterracide/brix/commit/178ece2401ab64bd1d014311bf6824618fd94db5

xenoterracide avatar Aug 22 '23 11:08 xenoterracide

Thanks for posting!

Indeed, this is a limitation as it's rename-tracking is very limited for performance, but it could probably do better than crashing hard. Ideally, it will recover from that gracefully, if possible.

Byron avatar Aug 22 '23 13:08 Byron