Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Incompatible with binary caches from latest bat #895

Closed
kidonng opened this issue Jan 9, 2022 · 6 comments · Fixed by #903
Closed

🐛 Incompatible with binary caches from latest bat #895

kidonng opened this issue Jan 9, 2022 · 6 comments · Fixed by #903

Comments

@kidonng
Copy link

kidonng commented Jan 9, 2022

bat recently released a new version v0.19.0, after updating I got the following error when using bat:

The binary caches for the user-customized syntaxes and themes in '/path/to/cache' are not compatible with this version of bat (0.19.0). To solve this, either rebuild the cache (bat cache --build) or remove the custom syntaxes/themes (bat cache --clear).
For more information, see:

https://github.com/sharkdp/bat#adding-new-syntaxes--language-definitions

After rebuilding the cache, delta started falling back to default syntax theme. Turns out delta needs to release a compatible version as well?

@dandavison
Copy link
Owner

Thanks! So if I'm understanding correctly, the problem here affects people (like me, and you) who have custom themes/syntaxes in a local cache which we are sharing with bat. Currently delta has copied/vendored code handling binary assets from bat . But I wonder if we can make use of some of the bat-as-a-library features mentioned in the release notes: https://github.com/sharkdp/bat/releases/tag/v0.19.0

image

@dandavison
Copy link
Owner

The immediate fix here would be to use an older version of bat to create the custom theme for delta. The real fix is this unreleased delta PR #903 and the accompanying bat PR sharkdp/bat#2030 which would need to be released first.

@michaelblyons
Copy link

...in April, they say. I'll keep my bat pinned to 0.18.3 for a while longer I suppose.

@dandavison
Copy link
Owner

Right. In the interim we could, in principle, update the binary assets in delta "manually" and apply any changes to our vendored bat code that are necessary, and release delta like that. Perhaps there are no code changes required -- it's just that when this issue was opened I decided to look into using bat as a library properly rather than doing the delta binary assets upgrade that I usually do at delta releases. It is time for a delta release -- I was trying to get #939 in.

@michaelblyons
Copy link

No worries. It's not your fault.

In any case, it's no great hardship. I use bat once every two months. I first installed it to generate a delta color scheme. 😝

dandavison added a commit that referenced this issue Feb 27, 2022
dandavison added a commit that referenced this issue Feb 27, 2022
@dandavison
Copy link
Owner

This is fixed in the latest delta version (the bat PR was released).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants