Skip to content
LogoLogo

Diagnostic code map

Diagnostic codes follow Appendix B of the specification: EK, the two-digit VIP number, then two digits for the rule. A code change does not change which programs a diagnostic rejects. Update saved diagnostic filters and expected-output assertions to the new code.

Previous codeAppendix B codeRule and repair
EK4617EK0103await does not run an Effect in an async function. Use await runPromise(program).

The language server keeps the numeric code (103) with source EK; the terminal and diagnostic references write EK0103.

Remaining renumberings

Previous codeCurrent codeRule
EK0201a do expression that ends in a declaration, a loop or an if without an else
EK0202a break or continue whose target is outside its effect block
EK4615EK0502The same diagnostic rule with Appendix B numbering
EK4605EK1903The same diagnostic rule with Appendix B numbering
EK4606EK1904The same diagnostic rule with Appendix B numbering
EK2001EK9201Legacy rule awaiting retirement by its owning VIP
EK2002EK9202Legacy rule awaiting retirement by its owning VIP
EK2003EK9203Legacy rule awaiting retirement by its owning VIP
EK2004EK9204Legacy rule awaiting retirement by its owning VIP
EK2101EK9205Legacy rule awaiting retirement by its owning VIP
EK2102EK9206Legacy rule awaiting retirement by its owning VIP
EK2103EK9207Legacy rule awaiting retirement by its owning VIP
EK3006EK9208Legacy rule awaiting retirement by its owning VIP
EK2126 (parameter count)EK2801More than four generic data parameters
EK2126 (constraint)EK2126A constrained generic data parameter

The temporary EK92xx codes preserve older checks whose numbers Appendix B reassigns to different rules. They are not new language rules. Interim EK92xx codes cannot be configured in vibe.severities: an entry is EK3006. An infallible catch expression stays valid when its interim EK9204 report retires; the separate imported lint is EK3818. Their owning VIP implementations retire them. Other older codes keep their existing numbers until their VIP implementation removes or replaces the check.

Appendix B reference

Registration reserves a code; it does not mean the compiler already implements every rule. The chapters describe the intended language; the VIP implementation lanes own remaining behavior gaps.

CodeRule
EK0101effect f() { } or async f() { } outside a class or object literal
EK0102await, for await or await using in effect code
EK0103await on an Effect in an async function
EK0104effect on a getter, setter or constructor
EK0105effect and async on one function
EK0106an effect function whose written return type is not an Effect
EK0107eval, Function, arguments, var or with in a .vibe file
EK0108a recognized effect modifier on an abstract declaration, in an ambient declare context, or on an interface or type literal member
EK0109a typed or generic bare effect arrow head; parenthesize its parameters
EK0301! beside a union, an intersection, a function type or a conditional type without parentheses
EK0401a throw or a call that may throw in a plain function whose return type is effectful, or a parameter default that may throw in any effectful function, or a local implementation whose tracked throws exceed an exposed effectful overload's implicit never bound
EK0402a function that may throw where a function type doesn't admit its thrown type
EK0403an unwrapped call, new expression or tagged template that may throw, in effect code or a plain catch handler
EK0404an unwrapped Promise-producing call, new expression, tagged template or async match in effect code
EK0405a body that throws more than its written @throws {T}
EK0501try outside effect code, the top level included
EK0502try on a value that is not an Effect
EK0503a try statement in effect code
EK0504catch outside effect code
EK0505try x catch h
EK0506e catch h where e is not an Effect
EK0507a handler whose result is a Promise or thenable
EK0508lint warning: a plain handler whose result is an Effect; use catch effect
EK0801warning: using in effect code; use acquireDisposable inside scoped
EK0901a static key without readonly, or whose initializer is not a string literal
EK0902a service member that is not a PropertySignature, MethodSignature, KeyMember or DefaultMember
EK0903a service with no derived key and no static readonly key
EK1201provide outside effect code
EK1301a constructor in an error or schema error body
EK1302a user-written static member or setter in an error or schema error body
EK1303type parameters on an error or schema error declaration
EK1304any other RejectedElement in an error or schema error body; an implements clause
EK1401a namespace name that two subpaths export, or a subpath and the root
EK1501export default schema S …; write export { S as default }
EK1502type parameters on a schema declaration; use an ordinary generic TypeScript factory
EK1603export default data D { … }; write export { D as default }
EK1701fork or join outside effect code
EK1703a fork operand that is not an Effect
EK1801a try.all operand that is not an array of Effects
EK1901a for concurrent operand that is not an Iterable
EK1902for concurrent outside effect code
EK1903break leaving a for concurrent body
EK1904return in a for concurrent body
EK1905a labeled continue naming a statement that encloses the for concurrent
EK2001for try outside effect code
EK2002return in a for try head binding initialization or body
EK2003a labeled break or continue from a for try head binding initialization or body to a statement outside it
EK2004a for try operand that is not a Stream
EK2102a producer whose written return type is not a Stream
EK2103yield* in a producer
EK2109a schema field type outside the mapping, including a shadowing type without a suitable Schema value
EK2111restore outside an uninterruptible block
EK2117an extends clause or a _tag member in an error or schema error body, or a computed schema error key whose runtime domain cannot be proved to exclude "_tag"
EK2126a constraint on a generic data type parameter
EK2201an interruption block outside effect code
EK2202restore in a for concurrent head binding initialization or body, or restore that captures an outer mask across an effect function, arrow, method, producer or block
EK2301an unparenthesized conditional at either end of a pipe, x |> f(%) ? a : b; write (x |> f(%)) ? a : b or x |> (f(%) ? a : b); vibelang --fix writes the second, the old reading
EK2801a data declaration with more than 4 type parameters
EK2803a default on a generic data type parameter
EK3001two services with the same key
EK3002a class extends a service
EK3003new on a service
EK3004instanceof a service
EK3005a generic service
EK3006an error code or an unknown code in vibe.severities; remove the entry
EK4402a value import of a Node builtin, with or without node: (node:fs, fs), or a reference to a banned platform global, in a .vibe file
EK4609lint warning: await on a Fiber in an async function; use join
EK4610lint warning: await on a Deferred in an async function; use try Deferred.await(d)
EK4701a match with no default over a finite union that misses a case; a guarded arm covers nothing

EK0510 reports an unparenthesized try, fork or join on the left of **. The editor action wraps the whole execution expression, such as (try program) ** 2, in parentheses. vibelang --fix applies the same repair when it introduces no new error. Native TypeScript unary expressions retain TS17006.