Use `env` parameter instead of adding it to the command, and copy the
hook rather than adding a symbolic link to it to avoid losing it with
`cargo clean`.
The script has become quite big so it is easier to maintain it in Rust
to add new features.
Ideally we would declare it as a single file cargo script, but that
still requires the nightly toolchain. So we make it a separate checks
crate with no dependencies, to make compilation fast.
It is a separate crate instead of a member of the workspace because
cargo insists on downloading the git dependencies of the fractal crate
before building the checks crate, which adds 20-30 seconds to the first
compilation. Sadly that means the IDEs will probably not be very helpful
when modifying it, and cargo commands run from the root of the workspace
need to point explicitly to the manifest with the `--manifest-path`
argument.
It is pre-compiled during `meson setup` and a symlink is created at
`hooks/checks-bin`, that is used by the pre-commit hook. It is a
requirement for me because I use different environments to compile
crates and to commit changes.
Incidentally, this fixes the check about sorting the POTFILEs
alphabetically.
To replace ExpressionListModel where possible. It should be more
performant because it only triggers an `items-changed` signal if the
item filtering changed.
This was added in GTK 4.20 but we need at least 4.20.2 which includes a
bug fix.
`VectorRenderer::set_sprite_sheet_data` was deprecated in libshumate 1.1.
Instead we use `VectorSpriteSheet::add_page`, which allows to use
`GdkTexture` directly, and to add higher resolution sprites.
To the pre-commit checks, we add the checks about translatable strings,
as well as the check about sorting in blp-resources.in.
We also run `blueprint-compiler format` in CI to make sure that we have
consistent formatting.
Blueprint files to compile must be added to src/blp-resources.in.
To avoid having to maintain both a list of Blueprint files and the
corresponding list of UI files in the gresource.xml file, we populate
the resource file with meson.
That way we can benefit from improvements upstream.
This also simplifies the camera API in the process by using a trait
instead of a subclassable GObject.
Always use WebP to generate thumbnails, as it is known to be widely
supported and have a good compression ratio.
Only generate thumbnails when the bandwith savings make sense.
Instead we will use the flatpak-cargo-generator script from
flatpak-builder-tools for Flathub builds.
This is not a problem for reproducible builds since everything has a
hash (commit or Cargo.lock).