Checking for Drift¶
collider check scans meson.build for dependency() calls and compares them
against collider.json. It reports two classes of issues:
- Untracked: a dependency called in
meson.buildthat is not recorded incollider.json. Fix withcollider pkg add <name>. - Stale: a collider-managed entry in
collider.jsonthat no longer appears anywhere inmeson.build. Fix by runningcollider pkg remove <name>.
The command exits 0 when clean and non-zero when drift is detected, making it
suitable for CI gates.
Basic Usage¶
Run from the project root:
Or specify a source directory:
Conditional Dependencies¶
By default, collider check skips dependency() calls inside Meson if-blocks
because their resolution depends on the build configuration. Pass
--include-conditional to treat them as required:
Known Limitation¶
collider check assumes the dependency() name in meson.build matches the
collider package name. Packages where these differ (for example, abseil-cpp
provides absl_strings) may produce false positives.
CI Integration¶
Add collider check as a step in CI to prevent dependency drift from going
unnoticed: