BB.Dsl.ValidateChildSpecBehavioursTransformer (bb v0.20.2)

Copy Markdown View Source

Enforces that every module wired into a component slot in the topology DSL implements the matching BB component behaviour.

Spark's built-in {:behaviour, X} schema type only validates that the value is an atom — it does not check behaviour conformance — so a bare use GenServer module could otherwise be wired in as e.g. an actuator, passing DSL compilation only to crash at runtime when the server expects callbacks (options_schema/0, init/1, etc.) that aren't defined.

This check lives in a transformer (rather than a verifier) so it raises at compile time. Verifiers run in @after_verify where Elixir does not tolerate errors, so they can only warn.

Summary

Functions

after_compile?()

Callback implementation for Spark.Dsl.Transformer.after_compile?/0.