Closed tonyarnold closed 7 months ago
almost certainly some kind of race condition where you're probably executing mise asynchronously in 2 places. It shouldn't cause any real problem since it just means it has to refresh the cache twice.
I'm not sure what the best way to fix this would be, or even if a fix makes sense. We could create a file lock around these which we do for other things but I don't love that idea. It might impact performance since this is on the critical path. We could also just not show a warning in this case but I kind of want to keep it just in case some other problem happens around serializing since it's good to know that errors are happening without debug mode.
It's happening when I run mise up
- I'm not deliberately running more than one copy at a time.
Is there any chance that you could give users a way to hide this logging? It's quite intrusive, and happens almost any time I login, or invoke mise:
Last login: Mon Feb 26 07:33:03 on ttys002
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish
mise failed to parse cache file: /Users/tonyarnold/Library/Caches/mise/zoxide/0.9.4/list_bin_paths.msgpack.z IO error while reading marker: failed to fill whole buffer: failed to fill whole buffer
mise failed to parse cache file: /Users/tonyarnold/Library/Caches/mise/tuist/4.3.4/list_bin_paths.msgpack.z IO error while reading marker: failed to fill whole buffer: failed to fill whole buffer
mise failed to parse cache file: /Users/tonyarnold/Library/Caches/mise/usage/0.1.9/list_bin_paths.msgpack.z IO error while reading marker: failed to fill whole buffer: failed to fill whole buffer
mise failed to parse cache file: /Users/tonyarnold/Library/Caches/mise/fzf/0.46.1/list_bin_paths.msgpack.z IO error while reading marker: failed to fill whole buffer: failed to fill whole buffer
~
I think you can hide it by setting MISE_LOG_LEVEL=warn
. I have not received any other reports of this.
Thanks @jdx. I think that I've found the issue. I had https://github.com/acomagu/fish-async-prompt installed in my fish shell, which would line up with your earlier statement about this coming from a async execution/access.
I've uninstalled the plugin, and will close this issue if it resolves the issue for a couple of days. Thanks for all of the info and your help.
Yeah, two days on and I haven't seen the warning once. It would seem that the async prompt plugin was the culprit. Thanks again for mise, and for your help with this issue.
I saw this for the first time when restarting neovim that had multiple terminal buffers open, in case anyone else runs into this but doesn't have an async prompt plugin installed.
I was having a very similar issue, I got the failed to parse cache file
randomly and not always blaming the same binary.
Thanks to this message from @tonyarnold :
I think that I've found the issue. I had https://github.com/acomagu/fish-async-prompt installed in my fish shell, which would line up with your earlier statement about this coming from a async execution/access.
I remembered that my zsh + oh my zsh + powerlevel10k configuration has an "instant prompt" feature enabled that could be the issue.
I disabled that feature and haven't seen the failed to parse cache file
again, at least yet.
Maybe this helps other users.
Describe the bug I'm regularly seeing logs saying that
mise failed to parse cache file
, like the following:To Reproduce I'm honestly not sure - it's not happening every time I open a new terminal window, but it's happening at least 2 out of every 3 new windows.
Expected behavior There's no IO error.
mise doctor
output