Skip to content

hooks: add opt-in cache update hook

Mathieu Duponchelle requested to merge meh/gstreamer:cache-hook into master

CI now checks that plugin caches are up to date, for example when adding a new property to an element.

This is something pretty easy to forget, and it can be checked in a pre-commit hook provided the cache generator generates no unnecessart diff on the developer's machine. This is now the case for me in core, -base and -good, and eventually all the repositories should behave appropriately, at least on my development machine.

The new check in the pre-commit hook is only performed when the user is in the development environment (it checks $MESON_BUILD_ROOT to determine that), and when the developer has opted-in by setting GST_CACHE_HOOK=enabled. That is because the hook will actually rebuild the cache with ninja, and modify it in the source directory, that's not a behaviour we want to enable by default.

Merge request reports