cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.77k stars 176 forks source link

mcfly crashes with "unknown history format" #224

Closed cjk closed 2 years ago

cjk commented 2 years ago

Suddenly seeing this after upgrading mcfly:

thread 'main' panicked at 'McFly error: unknown history format 'zsh-extended'', src/settings.rs:318:29                                                                                                                        
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Note sure what happened here. I tried deleting ~/.mcfly but it doesn't seem to be the problem. Haven't changed anything related to zsh-history recently, so I've no idea why it occurs.

cantino commented 2 years ago

Likely due to #221. Did you update from master, or from a release?

@vmax

vmax commented 2 years ago

This probably stems from the fact that the shell script is new, but the mcfly binary used is old (therefore, not knowing about the new format)

cjk commented 2 years ago

Thanks for the quick response!

I'm on Arch-Linux so the shell-script was updated first and then I updated the Arch-package for mcfly.

I thought the error would go away once I have both synced at the latest version again, but unfortunately it stayed.

$ mcfly --version
McFly 0.5.11
pacman -Qi

> spm -Qi mcfly
Name            : mcfly
Version         : 0.5.11-2
Description     : Fly through your shell history
Architecture    : x86_64
URL             : https://github.com/cantino/mcfly
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : sh
Optional Deps   : zsh: for zsh support [installed]
                  fish: for fish support
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 3.35 MiB
Packager        : Orhun Parmaksız <orhun@archlinux.org>
Build Date      : Mon 20 Dec 2021 07:38:59 PM CET
Install Date    : Wed 12 Jan 2022 06:44:25 PM CET
Install Reason  : Explicitly installed
Install Script  : Yes
Validated By    : Signature

(the shell-script also has a timestamp of Dec. 20th. should be newest version, not sure how to verify that)

vmax commented 2 years ago

@cjk it's indeed the latest release at the time, but it doesn't include the relevant changes (#221) as it was published in December.

@cantino looks like you'd need to cut another one at current master? 🙂

cjk commented 2 years ago

Oh, I see, it requires that latest from master - that makes sense :man_facepalming:

cantino commented 2 years ago

It's just odd that you got the code that I merged into master yesterday, since no release has been cut yet. I wanted to figure out if it's a bug, or if I just need to cut a release.

cantino commented 2 years ago

Okay, cut https://github.com/cantino/mcfly/releases/tag/v0.5.12

cjk commented 2 years ago

Thanks, will try as soon as it's available. I'm pretty sure it fixes the problem.

Guess my problem is that I install + update the shell-script from my .zshrc and the binary using the Arch-Linux repository. If those two are not aligned it may cause trouble.

I'll look for ways to unify those two sources.

cjk commented 2 years ago

I can now confirm that the latest mcfly-release fixes my original problem. Thanks again for the quick help!

cantino commented 2 years ago

Great!