Comprehensive DSL verification for Dala screen modules.
Validates user-defined screens against the component registry and reports warnings/errors for:
- Unknown component types
- Invalid prop names
- Missing required props
- Event handler props that are not atoms
- Invalid attribute types
- Missing handle_event/3 for declared event handlers
- Children placed inside leaf components
- Invalid variant values
- Deprecated prop usage
Summary
Functions
Suggest the closest valid prop for a mistyped key, or nil when nothing is close enough. Shared by the runtime verifier and the DSL's parse-time prop validation.
Event names handled by handle_event/3 clauses in module.
Format a list of warnings into a human-readable report.
Missing / unused handle_event warnings for a compiled module.
Print warnings to the Mix shell with appropriate coloring.
Verify DSL from raw entity/attribute/handler data (used by compile-time hook).
Verify a single screen module's DSL definition.
Types
@type warning() :: %{ type: :error | :warning | :info, module: atom(), line: non_neg_integer(), message: String.t() }
Functions
Suggest the closest valid prop for a mistyped key, or nil when nothing is close enough. Shared by the runtime verifier and the DSL's parse-time prop validation.
Event names handled by handle_event/3 clauses in module.
Reads the module's compiled debug_info, so it works for fully-compiled
modules (runtime verification, mix dala.verify). Returns [] when the
beam or debug info is unavailable — e.g. from inside the compile hook,
where only missing-handler checks are possible.
Format a list of warnings into a human-readable report.
Missing / unused handle_event warnings for a compiled module.
Used by the @after_verify hook so a typo'd on_tap surfaces during
mix compile instead of as a runtime crash or a manual mix dala.verify.
Returns [] when the module or its beam is unavailable.
@spec print_warnings([warning()]) :: :ok
Print warnings to the Mix shell with appropriate coloring.
Verify DSL from raw entity/attribute/handler data (used by compile-time hook).
Verify a single screen module's DSL definition.
Returns a list of warnings/errors found.