Contexted.Tracer (contexted v0.3.2)
The Contexted.Tracer
module provides a set of functions to trace and enforce separation between specific modules, known as "contexts".
This is useful when you want to ensure that certain modules do not reference each other directly within your application.
Link to this section Summary
Functions
To support automatic docs and specs generation in delegated functions inside contexts, all of the modules have to be compiled first.
Trace events are emitted during compilation.
Link to this section Functions
after_compiler(arg)
To support automatic docs and specs generation in delegated functions inside contexts, all of the modules have to be compiled first.
Because of that, we need to run this operation in after compiler callback in two steps:
- Remove all contexts beam files.
- Generate contexts beam files again.
This is an opt-in step, so in order to enable it, you will have to set this config:
config :contexted,
enable_recompilation: true
trace(arg1, env)
Trace events are emitted during compilation.
trace
function verifies if the provided event contains cross-references between two contexts.
If so, raises an error with an appropriate message.