Skip to content

prism compile

Compile one or more source documents on the IRIS server. Compilation generates the runtime artefacts that make a .cls usable as an SQL table, callable class method, or base for other classes.

Usage

prism compile DOCUMENT [DOCUMENT ...] [OPTIONS]

Arguments

Name Type Description
DOCUMENT string (variadic) One or more document names (e.g. MyApp.Person.cls).

Options

Flag Default Description
--namespace, -n IRIS_NAMESPACE setting Target namespace.
--flags IRIS_COMPILE_FLAGS (default cuk) IRIS compiler flags.

Compiler flags

The default cuk covers almost every case:

Flag Meaning
c compile
u update only (skip classes that are already up-to-date)
k keep generated source for inspection
b compile the whole branch (all subclasses)
d display progress on the console

Combine flags as a single string, no separators: --flags cub.

Output

IRIS's Atelier response includes a console list of log lines from the compiler. On success:

{
  "status": {"errors": [], "summary": ""},
  "console": [
    "",
    "Compilation started on 04/20/2026 18:07:39 with qualifiers 'cuk'",
    "Compiling class MyApp.Hello",
    "Compiling routine MyApp.Hello.1",
    "Compilation finished successfully in 0.046s."
  ],
  "result": {"content": []}
}

On failure, status.errors has the details and the exit is still 0 (Prism doesn't re-raise compiler errors; check the JSON):

{
  "status": {
    "errors": [
      {"error": "ERROR #5002: ClassCompiler: Class 'MyApp.Bad' does not exist"}
    ]
  },
  "console": [
    "Compilation started on 04/20/2026 18:08:02 with qualifiers 'cuk'",
    "ERROR #5373: Class MyApp.Bad does not exist.",
    "Compilation failed."
  ]
}

Examples

Compile one class:

prism compile MyApp.Hello.cls

Compile several in one pass (faster than one-by-one because IRIS batches dependency resolution):

prism compile MyApp.Hello.cls MyApp.Utils.cls MyApp.Person.cls

Force recompile (no u flag, so every class is recompiled even if up-to-date):

prism compile MyApp.Hello.cls --flags ck

Compile + keep going across namespaces:

prism compile MyApp.Hello.cls --namespace SAMPLES
  • prism put-doc — upload before compiling.
  • prism sql — query compiled classes.
  • MCP tool: compile_documents, also put_and_compile for upload-and-compile in one step. See MCP tools.