Skip to content

KSP diagnostics

Arc discovers your commands, read models and validation rules while the JVM compiler runs, through a KSP annotation processor. When it cannot make sense of a declaration it reports a diagnostic against that declaration rather than failing later at runtime or silently generating nothing.

Every diagnostic carries a stable code. Errors stop code generation, so the build fails and no artifact manifest is written. Warnings identify a convention that compiles but is probably not what you meant — most often a declaration Arc will ignore, which shows up later as a missing endpoint or a proxy that was never generated.

Codes are grouped by the artifact they concern: 01xx commands, 02xx queries and read models, 03xx proxy generation and validation, 04xx interoperability.

The C# implementation reports equivalent conventions through Roslyn analyzers with ARC codes; see code analysis. The two sets are not numbered alike, because each follows what its own compiler can see.

CodeSeverityDescription
ARCKSP0001ErrorInvalid KSP configuration
ARCKSP0100WarningCommand-like type is missing @Command
ARCKSP0101ErrorUnsupported command declaration
ARCKSP0102ErrorInvalid command handle function
ARCKSP0103ErrorInvalid command provide function
ARCKSP0104ErrorUnsupported command method parameter
ARCKSP0105ErrorUnsupported command method return type
ARCKSP0106ErrorAmbiguous command key
ARCKSP0107WarningProvided value is not consumed by handle
ARCKSP0108ErrorConflicting authorization metadata
ARCKSP0109ErrorAmbiguous command response values
ARCKSP0110ErrorInvalid command event metadata
ARCKSP0200ErrorUnsupported read model declaration
ARCKSP0201ErrorInvalid query function
ARCKSP0202ErrorAmbiguous query overload
ARCKSP0203ErrorUnsupported query parameter
ARCKSP0204ErrorUnsupported query return type
ARCKSP0205ErrorQuery transport and return type disagree
ARCKSP0206ErrorAmbiguous or duplicate query route
ARCKSP0207ErrorDuplicate fully qualified query name
ARCKSP0208ErrorInvalid query infrastructure parameter
ARCKSP0209ErrorUnsupported Kotlin query parameter default
ARCKSP0210ErrorInvalid host query adapter shape
ARCKSP0300ErrorUnsupported generated proxy model shape
ARCKSP0301ErrorInvalid or unrepresentable Jakarta validation metadata
ARCKSP0302ErrorAmbiguous or unprovable Arc enum wire value
ARCKSP0303ErrorMissing or blank @DerivedType identifier
ARCKSP0304ErrorUnsupported @DerivedType declaration target
ARCKSP0305ErrorConcrete polymorphic base used as a property type
ARCKSP0306ErrorUnsupported @ExportedType declaration target
ARCKSP0307ErrorUnsupported identity details provider declaration
ARCKSP0308ErrorUnsupported fluent validation declaration
ARCKSP0309ErrorInvalid or unrepresentable fluent validation rule
ARCKSP0310ErrorMissing or conflicting fluent validation compiler metadata
ARCKSP0311ErrorUnsupported or ambiguous validation ignore member
ARCKSP0400WarningJava/Kotlin interoperability hazard
ARCKSP9999ErrorUnclassified Arc KSP diagnostic

A diagnostic names the declaration that caused it. Fix the declaration rather than suppressing the code: Arc only generates artifacts it can fully describe, so a suppressed error means the endpoint, proxy or validation rule you expected will not exist.

If you hit ARCKSP0001 the processor itself is misconfigured rather than your code being wrong — check that the io.cratis.arc Gradle plugin is applied and that KSP is on the compile path, as described in getting started.