I am examples for GtBridge.CodeMonitor, the sole publisher of
%ModuleEvent{kind: :recompiled} on the bridge's EventBroker bus.
Examples compose: monitor_pid is the leaf; every later example
builds on the verified-running monitor. recompile_event returns
the events drained from a real reload, and the negative case
(non_project_module_filtered) inherits that proof of life before
exercising the filter.
Summary
Functions
I assert the supervised CodeMonitor pid is alive AND has the
trace installed on :code_server with itself as tracer. Every
later example builds on this. The trace is what makes the bus
fire, so all downstream behavior is contingent on it.
I exercise the filter side: stdlib reloads must NOT produce events.
Composes on recompile_event (that proves the bus fires when it
should); this proves it stays silent when it shouldn't.
I reload an existing project module, drain the bus, and return the events I saw. Building block for downstream examples; the events list is what a real save looks like once the chain is working.
Callback implementation for ExExample.Behaviour.copy/1.
Callback implementation for ExExample.Behaviour.rerun?/1.
Functions
I assert the supervised CodeMonitor pid is alive AND has the
trace installed on :code_server with itself as tracer. Every
later example builds on this. The trace is what makes the bus
fire, so all downstream behavior is contingent on it.
I exercise the filter side: stdlib reloads must NOT produce events.
Composes on recompile_event (that proves the bus fires when it
should); this proves it stays silent when it shouldn't.
I reload an existing project module, drain the bus, and return the events I saw. Building block for downstream examples; the events list is what a real save looks like once the chain is working.
Callback implementation for ExExample.Behaviour.copy/1.
@spec monitor_pid() :: pid()
Callback implementation for ExExample.Behaviour.rerun?/1.