NebulaAPI.CompilerCheck (NebulaAPI v0.5.0)

Copy Markdown View Source

Pure decision logic for the :nebula Mix compiler (Mix.Tasks.Compile.Nebula).

Kept separate from the compiler so it can be unit-tested without touching Mix or .beam files: it works on already-extracted module attributes.

Summary

Functions

Verifies an app's modules. modules_attrs is a list of {module, attributes} where attributes is the persisted attribute keyword list (as returned by module.__info__(:attributes) or the :attributes beam chunk).

Functions

verify(modules_attrs)

Verifies an app's modules. modules_attrs is a list of {module, attributes} where attributes is the persisted attribute keyword list (as returned by module.__info__(:attributes) or the :attributes beam chunk).

Returns :ok, or {:error, local_modules} — the list of modules with local methods on this node — when at least one such module exists but none of the app's modules wired a server via nebula_api_server/0 (so those methods' RPC workers would never start). The caller formats the human message; this stays pure decision logic.