# `mix compile.nebula`
[🔗](https://github.com/podCloud/nebula_api/blob/v0.7.1/lib/mix/tasks/compile.nebula.ex#L1)

Mix compiler that guards against forgetting `nebula_api_server/0`.

Opt in from **each** consuming app's `mix.exs` (per-app — see the umbrella note):

    def project do
      [
        # ...
        compilers: Mix.compilers() ++ [:nebula]
      ]
    end

It runs after `:app`, reads the persisted NebulaAPI attributes from the beams, and:

  * **fails** when the app has local methods on this build but no `nebula_api_server()`
    is wired (workers that would never start);
  * **warns** when a server is wired but the app defines no `defapi` methods at all
    (a server with nothing to serve — likely a leftover `nebula_api_server()`).

## Umbrella note

Per-app: it must be in the `compilers:` of each child app. `mix compile` in an umbrella
recurses into the child apps and runs *their* `compilers:`; adding `:nebula` to the umbrella
**root** `mix.exs` does **nothing** (the root's custom compilers are not invoked for an
`apps_path` project). There is no single root-level switch — opt each app in.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
