pub enum CodegenError {
Show 22 variants
Config(PackagingError),
ProjectName {
name: String,
reason: String,
},
InterfaceParse {
source: Error,
},
TypesModuleMissing {
module: String,
},
TypesModuleNotTypesOnly {
module: String,
offenders: Vec<String>,
},
TypesModuleEmpty {
module: String,
},
UnsupportedType {
module: String,
type_name: String,
field: Option<String>,
found: String,
hint: String,
},
SchemaStray {
path: PathBuf,
},
SchemasDirRead {
path: PathBuf,
source: Error,
},
UnsupportedConstruct {
file: PathBuf,
pointer: String,
construct: String,
},
Write {
path: PathBuf,
source: Error,
},
CheckMissing {
path: PathBuf,
},
CheckDrift {
path: PathBuf,
},
CheckRead {
path: PathBuf,
source: Error,
},
ManifestParse {
source: Error,
},
InvalidActivityName {
name: String,
reason: String,
},
DuplicateActivity {
name: String,
},
UnknownTier {
value: String,
},
ActivityTypeMissing {
activity: String,
role: &'static str,
type_name: String,
module: String,
},
GoldenTypeUnresolved {
root_type: String,
missing: String,
file: PathBuf,
},
EntrySourceRead {
path: PathBuf,
source: Error,
},
ScaffoldFacts {
path: PathBuf,
reason: String,
},
}Expand description
Errors produced while generating codecs, schemas, and activity plumbing from a workflow project’s authored types module.
Variants§
Config(PackagingError)
The project descriptor (workflow.toml) or a schema it references
failed to load.
ProjectName
The project’s gleam.toml declares a package name that cannot prefix
a generated Gleam module.
InterfaceParse
The gleam export package-interface JSON did not parse into the
expected shape. The format is owned by the Gleam compiler; an unknown
shape fails loudly rather than being guessed at.
TypesModuleMissing
The exported interface has no types module for the package.
TypesModuleNotTypesOnly
The types module exports functions, constants, or type aliases.
Fields
TypesModuleEmpty
The types module declares no public types.
UnsupportedType
A type in the types module falls outside the supported v1 subset.
Fields
SchemaStray
A hand-authored (unmarked) *.json file sits in the schemas/
directory, which holds generated artifacts only.
SchemasDirRead
The schemas/ directory could not be listed.
Fields
UnsupportedConstruct
A schema uses a construct outside the supported v1 subset (the aion input skeleton walks the emitted schema documents).
Fields
Write
A generated file could not be written.
Fields
CheckMissing
--check failed: a generated file does not exist on disk.
CheckDrift
--check failed: an on-disk file differs from the generated output.
CheckRead
An on-disk file could not be read for --check comparison.
Fields
ManifestParse
The activity manifest JSON emitted by the package’s manifest() export
is not a valid declaration array.
InvalidActivityName
A declared activity name cannot name an engine activity or a generated artifact (empty, or carrying a path separator, backslash, or the deployed-name separator).
DuplicateActivity
Two declarations share an activity name; names must be unique within a
package so the generated wrappers, registration entries, and
workflow.toml list are unambiguous.
UnknownTier
A declaration carries a tier outside the supported set.
ActivityTypeMissing
A declared activity references a value type not declared in the types module, so its codec cannot be generated.
Fields
GoldenTypeUnresolved
While deriving a wire-compat golden, a value type referenced a named Gleam type absent from its boundary-type definitions. The interface front-end collects every referenced definition into the closure, so this signals a generator invariant violation rather than bad author input.
Fields
EntrySourceRead
The test-scaffold generator could not read the workflow’s entry-module source, which it needs to derive the typed entry function and timer count.
Fields
ScaffoldFacts
The workflow’s entry-module source does not yield the facts the test
scaffold needs (no aion/workflow import, no define call, or an
unidentifiable typed entry function).
Trait Implementations§
Source§impl Debug for CodegenError
impl Debug for CodegenError
Source§impl Display for CodegenError
impl Display for CodegenError
Source§impl Error for CodegenError
impl Error for CodegenError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()