FS#74765 - [git-delta] Crashing after last update

Attached to Project: Community Packages
Opened by Mathieu Arnold (Mat813) - Monday, 16 May 2022, 09:08 GMT
Last edited by George Rawlinson (rawlinsong) - Wednesday, 08 June 2022, 01:23 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To George Rawlinson (rawlinsong)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

Since last update, delta does not seem to be working at all, it crashes saying it cannot find its theme.

Additional info:
* package version(s) : 0.13.0-1

Steps to reproduce:

I first thought it was a bat problem because of the error:

❯ git diff
[bat warning]: Unknown theme 'GitHub', using default.
thread 'main' panicked at 'something is very wrong if the default theme is missing', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/bat-0.21.0/src/assets.rs:205:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

but it fails even when I ask the list of themes :

❯ env RUST_BACKTRACE=full delta --list-syntax-themes
[bat warning]: Unknown theme 'Monokai Extended', using default.
thread 'main' panicked at 'something is very wrong if the default theme is missing', /build/.cargo/registry/src/github.com-1ecc6299db9ec823/bat-0.21.0/src/assets.rs:205:22
stack backtrace:
0: 0x55bbb8e3735c - <unknown>
1: 0x55bbb8e5f1dc - <unknown>
2: 0x55bbb8e32531 - <unknown>
3: 0x55bbb8e39745 - <unknown>
4: 0x55bbb8e39404 - <unknown>
5: 0x55bbb8e39e78 - <unknown>
6: 0x55bbb8e39b87 - <unknown>
7: 0x55bbb8e377f4 - <unknown>
8: 0x55bbb8e398a9 - <unknown>
9: 0x55bbb8be1703 - <unknown>
10: 0x55bbb8e5dc71 - <unknown>
11: 0x55bbb8e5dc1b - <unknown>
12: 0x55bbb8be1576 - <unknown>
13: 0x55bbb8d62f8d - <unknown>
14: 0x55bbb8c0de8b - <unknown>
15: 0x55bbb8c8d7d1 - <unknown>
16: 0x55bbb8be4a3a - <unknown>
17: 0x55bbb8be47cf - <unknown>
18: 0x55bbb8ca8995 - <unknown>
19: 0x55bbb8c5b843 - <unknown>
20: 0x55bbb8caac1d - <unknown>
21: 0x55bbb8e36b0e - <unknown>
22: 0x55bbb8cabb02 - <unknown>
23: 0x7f6d2d7d6290 - <unknown>
24: 0x7f6d2d7d634a - __libc_start_main
25: 0x55bbb8be1f35 - <unknown>
26: 0x0 - <unknown>
This task depends upon

Closed by  George Rawlinson (rawlinsong)
Wednesday, 08 June 2022, 01:23 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with update to bat 0.21.0-1.
Comment by Matt (matth) - Monday, 16 May 2022, 13:52 GMT
The issue here is git-delta is using bat 0.21, but bat in arch is still 0.20 here: https://archlinux.org/packages/community/x86_64/bat/

If you have caches at ~/.cache/bat generated by bat 0.20 they will not work with git-delta with 0.21 as the syntax changed. https://github.com/dandavison/delta/issues/1075

Solutions are either update bat to 0.21 and then run `bat cache --build` to rebuild the caches.

Or remove the caches from ~/.cache/bat and delta will run it uncached, although I think there is still an issue with themes not working when doing it this way.

Loading...