Giter Site home page Giter Site logo

Comments (4)

 avatar commented on May 18, 2024

After 3+ hours of running, it failed with the following error:

thread 'main' panicked at 'McFly error: Insert to work: NulError(NulError(0, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, 120, 101, 99, 32, 115, 116, 97, 114, 116, 120, 32, 38, 38, 32, 101, 120, 105, 116]))', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

from mcfly.

 avatar commented on May 18, 2024

Next runs produce the error described here #56

McFly: Upgrading McFly DB to version 3, please wait...thread 'main' panicked at 'McFly error: Unable to add cmd_tpl to commands: SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("duplicate column name: cmd_tpl"))', src/libcore/result.rs:997:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Following the hint gives:

RUST_BACKTRACE=1 bash
McFly: Upgrading McFly DB to version 3, please wait...thread 'main' panicked at 'McFly error: Unable to add cmd_tpl to commands: SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some("duplicate column name: cmd_tpl"))', src/libcore/result.rs:997:5
stack backtrace:
0: <unknown>
1: <unknown>
2: <unknown>
3: <unknown>
4: <unknown>
5: <unknown>
6: <unknown>
7: <unknown>
8: <unknown>
9: main
10: __libc_start_main
11: <unknown>

from mcfly.

cantino avatar cantino commented on May 18, 2024

Hey @somospocos, I'm sorry to hear that. I haven't seen it take more than a second before. Is there any chance it was happening in two windows at once?

from mcfly.

 avatar commented on May 18, 2024

Is there any chance it was happening in two windows at once?

I don't think so. Here are more details about the install attempt:

  • I downloaded the binary release, put the binary in PATH, sourced the script in my bashrc, just as README suggests
  • bit later I opened another terminal window and got the first run error message. I did it to see how big the sqlite database grew up already, since I kept seeing continuous disk activity
  • as I stated in the first post, mcfly worked for at least 15 minutes before I tried to open that new terminal window, this makes me think there was no race condition involved
  • as soon as I saw that the new terminal window gets locked, I killed it and used other, older terminal window, that was started before I installed mcfly, so it did not have it enabled, to do CLI stuff

So far I have just disabled mcfly back and will most likely wait for the next stable release before trying again.

Of course, there's always the option to try it on a smaller bash history file, but I have a strong (in my - very likely biased - opinion) argument against it.

As I understand, mcfly does the initial processing of the bash history file only once, at the first run. As the user keeps using it, new commands are added to mcfly's database, so it doesn't work only with the commands that it did load at first run. And this is exactly why I fail to see any reasons why the first run should take long (one second that you said is fair). The following is pure speculation, since I don't know how does mcfly exactly work, but I imagine for a big bash history file, that file could be read incrementally / in background / whatever. Sure while the old history will be loaded partially, mcfly won't be "too smart", but the user having a fluid, non-blocking workflow is higher priority.

from mcfly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.