bkt
bkt copied to clipboard
a subprocess caching utility, available as a command line binary and a Rust library.
I don't have much experience with this, but filing a bug to keep track of this over time. Package managers to consider: https://github.com/junegunn/fzf#using-linux-package-managers. * [x] Arch / Pacman * [x]...
I'm not sure how common/useful this would really be, but I can imagine wanting to use a file's modtime as an input to a command's cache key (alongside the cwd...
Reported by @tranzystorek-io in https://github.com/dimo414/bkt/issues/12#issuecomment-1080012510 - [example failure](https://github.com/void-linux/void-packages/runs/5711656703?check_suite_focus=true) blaming [this line](https://github.com/dimo414/bkt/blob/d95dfe10401d1bbbea774356e470687d6ac94606/tests/cli.rs#L227): ``` ---- cli::discard_failures_in_background stdout ---- thread 'cli::discard_failures_in_background' panicked at 'SystemTime { tv_sec: 1648411197, tv_nsec: 770703005 } !> SystemTime {...
bash-cache provides optional support for cooperative locking via `bc::locking_cache`, which ensures concurrent calls to the same function will not race. It would be nice to add something similar to `bkt`....
https://docs.rs/assert_cmd might help simplify some of the boilerplate in `cli.rs`. Need to experiment with it further.
An easy option is to add an `--invalidate` flag that, rather than retrieving the command simply deletes the cache key associated with the given command, like so: ``` $ bkt...
On Windows `bkt` fails with this error: ``` > /bkt.exe -- ipconfig bkt: Cache write failed: A required privilege is not held by the client. (os error 1314) ``` This...
so i really like bkt alot, however on multiuser system. or when root is using bkt -- somecommand, and after wards user tries bkt -- somesamecommandasother user ending up with...
Now that `--modtime` is supported it's possible for a cached invocation to become functionally unreachable[^1] but remain in the cache for an extended period of time. For example: ``` bkt...
In #46 @huyz asked about including some messaging like `Command cached 2h 3m ago` in `bkt`'s output. My initial reaction was to say `bkt` should be transparent and shouldn't modify...