You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, just wanted to say I'm a huge fan of delta and it works great and this problem does not occur when I've used it in an Ubuntu VM, Arch Linux on bare metal, and Arch Linux in WSL. I am having problems with it in Ubuntu WSL though.
Note (just in case): WSL = Windows Subsystem for Linux.
TLDR
When there is an existing bat cache, the delta main thread panics and crashes.
System
Output of uname -a.
Linux DESKTOP-XXXXXX 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Note: I also have symlinked git-delta to delta so that I can just run delta with delta.
The Issue
Originally, I had a bat theme set up (Catppuccin Mocha, but this is not important) and when running delta or trying git diff, I received the following.
[bat warning]: Unknown theme 'Catppuccin-Mocha', using default.
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bat-0.24.0/src/assets.rs:252:22:
something is very wrong if the default theme is missing
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I figured that this was user error, so I messed around a bit and disabled the Catppuccin Mocha theme. I then received
[bat warning]: Unknown theme 'Monokai Extended', using default.
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bat-0.24.0/src/assets.rs:252:22:
something is very wrong if the default theme is missing
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I then tried some older versions of delta to no avail.
Finally, I ran bat cache --clear and delta worked as normal.
However, this means I can't use any themes with bat or delta. Running bat cache --build and then trying to use delta again shows the same errors as above, no matter what theme I have set.
Something to maybe help debug, running bat cache --build to setup environment for "broken" delta then running delta with full backtrace with the command RUST_BACKTRACE=full delta yields the output
What are the used bat version in the various configurations (I doubt WSL is the culprit anywhere)? Also see #1712 (comment) where @ernstki compiled a list of compatible versions.
Ah that's a good observation.
On WSL I have bat --version
bat 0.19.0
Whereas on my VM I have bat --version
bat 0.24.0
I checked the list of compatible versions and 0.19.0 is on there, yet I'm still seeing this bug.
I have a feeling it is linked to #1712 though, since running the commands that previously errored would work fine even with the bat cache being built if I run them as root through sudo
Let me install a newer version and get back to you.
After installing the latest version of bat from the releases page from here (at the time of writing this, that is bat 0.25.0 (25f4f96)) and running bat cache --build, delta no longer crashes with any theme that i've tried.
delta
and it works great and this problem does not occur when I've used it in an Ubuntu VM, Arch Linux on bare metal, and Arch Linux in WSL. I am having problems with it in Ubuntu WSL though.TLDR
bat cache
, thedelta
main thread panics and crashes.System
uname -a
.Linux DESKTOP-XXXXXX 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
.wget https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_amd64.deb && sudo dpkg -i git-delta_0.18.2_amd64.deb
delta --version
..gitconfig
options.git-delta
todelta
so that I can just run delta withdelta
.The Issue
bat
theme set up (Catppuccin Mocha, but this is not important) and when runningdelta
or tryinggit diff
, I received the following.delta
to no avail.bat cache --clear
anddelta
worked as normal.bat
ordelta
. Runningbat cache --build
and then trying to usedelta
again shows the same errors as above, no matter what theme I have set.bat cache --build
to setup environment for "broken"delta
then runningdelta
with full backtrace with the commandRUST_BACKTRACE=full delta
yields the outputThe text was updated successfully, but these errors were encountered: