Ash.Dsl.Transformer behaviour (ash v1.37.2) View Source
A transformer manipulates and/or validates the entire DSL state of a resource.
It's transform/2
takes a map
, which is just the values/configurations at each point
of the DSL. Don't manipulate it directly, if possible, instead use functions like
get_entities/3
and replace_entity/5
to manipulate it.
Use the after?/1
and before?/1
callbacks to ensure that your transformer
runs either before or after some other transformer.
The pattern for requesting information from other modules that use the DSL and are also currently compiling has not yet been determined. If you have that requirement you will need extra utilities to ensure that some other DSL based module has either completed or reached a certain point in its transformers. These utilities have not yet been written.