Examples.EHotReload (gt_bridge v0.17.2)

Copy Markdown View Source

I test the hot-reload system end-to-end against a real dependency.

HotReloadTest is a path dep under fixtures/ with a struct (Config) and a struct caller (Builder). Examples modify its source, verify the change took effect, then revert. Running examples leaves no traces.

All mutation examples go through with_reload/3 which handles the write-compile-revert cycle. Each example only specifies what to change and what to observe.

Summary

Functions

add_function()

@spec add_function() :: [{atom(), non_neg_integer()}]

beam_persisted()

@spec beam_persisted() :: [{atom(), non_neg_integer()}]

copy(item)

Callback implementation for ExExample.Behaviour.copy/1.

modify_function()

@spec modify_function() :: String.t()

new_field_propagates()

@spec new_field_propagates() :: String.t()

rerun?(_)

Callback implementation for ExExample.Behaviour.rerun?/1.

resolve_source()

@spec resolve_source() :: {String.t(), String.t()}

revert_clean()

@spec revert_clean() :: [{atom(), non_neg_integer()}]

standalone_module()

@spec standalone_module() :: keyword()