Currently, if a user makes use of custom assets and then installs a new 0.x.0 version of bat, bat will stop working. That is not an ideal user experience. It would be good if we could make this use case smoother, e.g. by automatically doing the equivalent of running bat cache --build for the user.
Step-by-step
Here is a step by step against the git repo, but regular users will get this problem too via regular releases from us and e.g. package manager updates of the bat app.
cargo run -- cache --build --blank --source assets
- Bump 0.x.0 version in
Cargo.toml, e.g. from 0.19.0 to 0.20.0
cargo run -- examples/simple.rs
Expected result
bat prints examples/simple.rs
Actual result
[bat error]: The binary caches for the user-customized syntaxes and themes in
'/Users/martin/.cache/bat' are not compatible with this version of bat (0.20.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
Currently, if a user makes use of custom assets and then installs a new 0.x.0 version of bat, bat will stop working. That is not an ideal user experience. It would be good if we could make this use case smoother, e.g. by automatically doing the equivalent of running
bat cache --buildfor the user.Step-by-step
Here is a step by step against the git repo, but regular users will get this problem too via regular releases from us and e.g. package manager updates of the bat app.
cargo run -- cache --build --blank --source assetsCargo.toml, e.g. from 0.19.0 to 0.20.0cargo run -- examples/simple.rsExpected result
bat prints
examples/simple.rsActual result