Executable version-one conformance contract for Stack packages.
Satellite libraries can call these functions from their own ExUnit suites without depending on ExUnit from production code.
Summary
Functions
Verifies an installable module or raises.
Reads a compiled V1 Stack and conservatively lowers it into Contract V2.
Verifies an installable module and returns its normalized manifest.
Verifies a raw manifest for module.
Returns the contract version implemented by this module.
Functions
@spec assert_installable!(module()) :: Spectre.Stack.Package.t()
Verifies an installable module or raises.
@spec to_v2( Spectre.Stack.Definition.t() | module() | nil, keyword() ) :: {:ok, Spectre.Stack.Contract.V2.t()} | {:error, term()}
Reads a compiled V1 Stack and conservatively lowers it into Contract V2.
V1 declarations remain requests. Only capabilities present in the trusted
:authority_ceiling become effective grants in the returned contract.
@spec verify_installable(module()) :: {:ok, Spectre.Stack.Package.t()} | {:error, term()}
Verifies an installable module and returns its normalized manifest.
@spec verify_manifest(module(), Spectre.Stack.Package.t() | map() | keyword()) :: {:ok, Spectre.Stack.Package.t()} | {:error, term()}
Verifies a raw manifest for module.
@spec version() :: pos_integer()
Returns the contract version implemented by this module.