Diagnostics
Every diagnostic of the toolchain has a stable code and a page: what happened, an example, how to fix it. Errors stop the build; warnings are configured in [lint] of oxl.toml (Standard III.2).
| Code | Level | Standard | Description |
|---|---|---|---|
ab-test-decl | error | [§18.5] | invalid `test ab` declaration: variants, split, metrics, guards or traffic (§18.5) |
actor-cycle | warning | [§8.8] | possible cyclic wait between actors |
actor-not-hosted | error | [§12.1, §12.5] | sharded actor is hosted by no role (§12.1) |
ambiguous-embed | error | [§4.7] | name promoted from two embedded types |
arg-count | error | [§6.1] | wrong number of arguments |
atomic-db-effects | error | [§11.2] | atomic(db) body has an effect other than db (net, io) (§11.2) |
atomic-effects | error | [§8.9] | atomic body must be pure except TVar operations |
attribute-not-applicable | error | [§10.2] | attribute does not apply to this kind of rpc (§10.2) |
bad-allow | error | [III.4] | malformed @allow(lint: rule, reason: "...") (reason is required) |
bad-format-spec | error | [§1.5] | invalid format specifier in a string interpolation (§1.5) |
bad-import-root | error | [§2.2] | first path segment must be std, self, super or a dependency |
bad-init | error | [§4.3] | init must return Self or a union containing Self |
bad-label | error | [§1.3] | unknown loop label |
bad-manifest | error | [III.2] | invalid oxl.toml |
blocking-in-task | warning | [§8.1] | blocking FFI call without blocking { } |
borrow-conflict | error | [§7.2] | conflicting borrows |
borrow-escape | error | [§7.2] | borrow stored in a field, escaping closure, task or outlives value |
bound-not-satisfied | error | [§4.8] | generic bound not satisfied |
break-value | error | [§5.6] | break with value is only allowed in loop |
cache-not-readonly | error | [§10.2] | @cache needs @readonly (§10.2) |
cannot-infer | error | [§3] | type cannot be inferred; add an annotation |
chained-comparison | error | [§5.2] | comparison operators are non-associative (a < b < c) |
cluster-auth | error | [§12.1, §13.2] | invalid `auth` provider of the cluster (§12.1, §13.2) |
cluster-decl | error | [§12.1] | invalid cluster declaration (§12.1) |
cluster-needs | error | [§12.1] | invalid `needs` requirement of a role (§12.1) |
cluster-seeds | error | [§12.1] | invalid `seeds` clause of the cluster (§12.1) |
comptime-error | error | [§15.1] | error during compile-time evaluation |
config-type | error | [§14.1] | config field type cannot be read from configuration text |
contract | error | [§6.7] | invalid requires/ensures/invariant |
cross-shard-tx | warning | [§11.2] | a database transaction uses different shard keys, or asks for cross_shard (§11.2) |
data-rights | error | [§13.4] | invalid @owner / @visible (§13.4) |
dep-checksum | error | [III.2] | a package does not match its checksum in oxl.lock or the registry index |
dep-conflict | error | [III.2] | conflicting version requirements for one package (MVS, [С III.2]) |
dep-not-found | error | [III.2] | a dependency cannot be found, fetched or loaded ([С III.2]) |
deprecated | warning | [§4.9] | use of a deprecated item |
duplicate-decl | error | [§2.1] | name declared twice in the same scope |
duplicate-impl | error | [§10.1] | service has more than one impl (§10.1) |
duplicate-provide | error | [§12.7] | two provides of the same type for one role (§12.7) |
effects | error | [§6.2] | call to a function with an effect not allowed here |
explicit-interface | error | [§4.6] | @explicit interface requires impl or @derive |
fail-type | error | [§6.5] | error type is not part of the function return type |
ffi-import | error | [§16.1] | cannot import C header |
fixture-yield | error | [§18.2] | fixture has no `yield` (§18.2) |
generic-args | error | [§4.8] | wrong generic arguments |
glob-import | warning | [§2.2] | glob import in a library |
global-mutable | error | [§4.1] | static must be frozen or sync |
impl-foreign-type | error | [§4.5] | impl for a type declared in another package |
impl-signature-mismatch | error | [§10.1] | rpc signature in impl differs from the service (§10.1) |
import-conflict | error | [§2.2] | two imports bring the same name and it is used |
import-skip | warning | [§16.3] | rpc of an imported .proto file was skipped |
interface-not-satisfied | error | [§4.6] | type does not satisfy interface |
invalid-char | error | [§1.6] | unexpected character |
invalid-char-literal | error | [§1.5] | malformed character literal |
invalid-date | error | [§1.5] | malformed date/time literal |
invalid-duration | error | [§1.5] | malformed duration literal (units must strictly decrease) |
invalid-escape | error | [§1.5] | invalid escape sequence |
invalid-number | error | [§1.5] | malformed numeric literal |
invalid-utf8 | error | [§1.1] | source is not valid UTF-8 or starts with a BOM |
invalid-window | error | [§10.2] | @window needs a positive credit count (§10.2) |
io-error | error | [§1.1] | cannot read file or directory |
it-outside-chain | error | [§8.4] | `it` used outside of a chain step |
lint-plugin | warning | [III.4] | diagnostic of a user lint plugin ([lint] plugins, std.comptime) |
literal-overflow | error | [§1.5] | integer literal does not fit the inferred type |
lock-outdated | error | [III.2] | oxl.lock is missing or out of date under --locked / --frozen |
magic-literal | warning | [IV.1] | repeated literal in attributes/arguments; move to const |
missing-annotation | error | [§3] | pub function must declare parameter and return types |
missing-field | error | [§4.3] | struct literal is missing a field without default |
missing-impl | error | [§10.1] | service has no impl (§10.1) |
missing-override | error | [§4.7] | method shadows an open method without override |
missing-policy | error | [§13.4, ч. III.4] | rpc is reachable by nobody: no allow rule, @public or @allow, not @internal, called by no role (§13.4) |
missing-provide | error | [§12.7] | dep without a provide for a role that runs the code (§12.7) |
missing-rpc-impl | error | [§10.1] | impl does not implement every rpc of the service (§10.1) |
mock-decl | error | [§18.3] | invalid `mock` block, `S.calls(.m)` or `provide` in a test (§18.2, §18.3) |
module-cycle | error | [§2.1] | cyclic dependency between modules |
must-close | error | [§4.3] | @must_close value may leave scope without close() |
mutate-immutable | error | [§4.1] | cannot mutate an immutable binding |
n-plus-one | warning | [III.4] | query in a loop over the result of another query (N+1) |
named-arg | error | [§6.1] | bad named argument / positional after named |
naming | warning | [IV.2] | name does not follow the naming convention (IV.2) |
no-entry-point | error | [§2.4] | program has no fn main, cluster or service |
non-exhaustive | error | [§5.5] | match is not exhaustive |
not-assignable | error | [§5.1] | left side of assignment is not a mutable place |
not-callable | error | [§5.3] | expression is not callable |
not-comptime | error | [§15.1] | expression is not a compile-time constant |
not-implemented | error | [§0.3] | construct is valid OxL but not supported by this implementation stage |
not-overloadable | error | [§5.3] | operator cannot be overloaded |
not-serializable | error | [§9.1] | type cannot be serialized (§9.1) |
operator-decl | error | [§5.3] | invalid operator declaration |
outside-loop | error | [§5.6] | break/continue outside of a loop |
override-without-open | error | [§4.7] | override of a method that is not open |
pattern-bindings | error | [§5.5] | alternatives bind different names |
pipeline-idempotency | warning | [§10.6] | a durable pipeline step calls an rpc that is not @idempotent (§10.6) |
placement-conflict | error | [§12.1] | conflicting placement clauses of roles (§12.1) |
positional-literal | error | [§4.3] | positional literal not allowed (more than 4 required fields or invisible fields) |
prefix-literal | error | [§15.3] | prefix literal handler rejected the literal |
private-in-public | error | [§2.3] | type in signature is less visible than the declaration |
publish-refused | error | [III.1, III.2] | oxl publish refused: SemVer or schema check against the last published version failed |
query-not-sql | error | [§5.9, §12.8] | expression in a database query cannot be translated to SQL (§5.9) |
question-context | error | [§6.5] | `?` used where errors cannot propagate |
range-not-iterable | error | [§5.3] | only integer and char ranges can be iterated |
refinement-violated | error | [§3.6] | constant value violates a refined type predicate |
respond-twice | error | [§10.6] | `respond` appears more than once in a pipeline, or in a stream pipeline (§10.6) |
respond-type | error | [§10.6] | the value of `respond` does not match the result type of the pipeline (§10.6) |
retry-not-idempotent | error | [§10.2] | @retry needs @idempotent or @readonly (§10.2) |
rpc-attr | error | [§10.2] | unknown rpc attribute or malformed attribute arguments (§10.2) |
saga-decl | error | [§11.3] | invalid saga or pipeline declaration (§10.6, §11.3) |
saga-idempotency | error | [§11.3] | a saga step or compensation calls an rpc that is not @idempotent (§11.3) |
saga-without-role | error | [§12.1] | saga without a role that `runs sagas` and has `journal` (§12.1) |
scatter-gather | warning | [IV.6] | query on a sharded table without the shard key runs on every shard |
schema-attr | error | [§9.2, §9.5] | invalid serialization attribute (@tag, @v, @since, @removed, @renamed, @zigzag, @repr, @codec) |
schema-break | error | [§9.2, прил. C] | incompatible schema change relative to oxl.schema.lock (§9.2, прил. C) |
schema-lock | error | [прил. C] | oxl.schema.lock is malformed, or --locked and the schema changed (прил. C) |
sealed-literal | error | [§4.3] | @sealed type can only be constructed through init |
secret-json | error | [§9.3] | secret<T> cannot be encoded as JSON (§9.3) |
secret-leak | error | [§13.3] | secret.reveal() flows into a log, string or response |
send | error | [§7.3] | non-transferable value sent to another task |
service-not-served | error | [§12.1] | service with an impl is served by no role of the cluster (§12.1) |
shard-count-clamped | warning | [§12.8] | a table asks for more shards than any database the program opens (§12.8) |
spawn-outside-scope | error | [§8.5] | spawn is only allowed inside scope { } |
syntax | error | [App. A] | syntax error |
table-schema | error | [§12.8] | invalid @table declaration or use of a type that is not a table (§12.8) |
task-reuse | error | [§8.3] | Task is single-use and was already consumed |
test-decl | error | [§18.1] | invalid `test` declaration: parameters, kind or environment (§18.1) |
time-mix | error | [§17.2] | mixing different kinds of time |
topic-without-journal | error | [§10.5, §12.1] | topic without a role that has `journal` (§10.5, §12.1) |
type-mismatch | error | [§3.5] | expression has the wrong type |
unhandled-error | error | [§6.5] | result with error is ignored |
unknown-field | error | [§4.2] | type has no such field |
unknown-lint | error | [III.4] | @allow names an analyzer rule that does not exist |
unknown-method | error | [§4.5] | type has no such method |
unknown-policy-target | error | [§13.4] | policy rule names an rpc the service does not declare (§13.4) |
unknown-role | error | [§12.1, §10.6, §12.7] | name of a role the cluster does not declare (§12.1) |
unknown-rpc | error | [§10.1] | impl implements an rpc the service does not declare (§10.1) |
unknown-type | error | [§3.4] | type is not defined |
unreachable-arm | warning | [§5.5] | match arm is unreachable |
unresolved-import | error | [§2.2] | import path does not resolve |
unresolved-name | error | [§2.2] | name is not defined |
unsafe-required | error | [§7.5] | operation requires an unsafe block |
unterminated-comment | error | [§1.1] | block comment is not terminated |
unterminated-string | error | [§1.5] | string literal is not terminated |
unused | warning | [III.4] | unused import, variable or dep |
use-after-move | error | [§3.9] | value used after it was moved |
visibility | error | [§2.3] | item is not visible here |
yield-outside-stream | error | [§10.3] | yield is only allowed in a function returning stream<T, E> |