pub enum PackagingError {
Show 21 variants
ConfigMissing {
root: PathBuf,
},
ConfigRead {
path: PathBuf,
source: Error,
},
ConfigParse {
path: PathBuf,
source: Error,
},
ConfigInvalid {
field: String,
reason: String,
},
SchemaRead {
path: PathBuf,
source: Error,
},
SchemaParse {
path: PathBuf,
source: Error,
},
ProjectNotBuilt {
missing: PathBuf,
},
GleamTomlMissing {
path: PathBuf,
},
GleamMetadataRead {
path: PathBuf,
source: Error,
},
GleamMetadataParse {
path: PathBuf,
source: Error,
},
DependencyUnresolved {
package: String,
},
BeamRead {
path: PathBuf,
source: Error,
},
ModuleNameNotUtf8 {
path: PathBuf,
},
DuplicateModule {
module: String,
first: String,
second: String,
},
EntryModuleNotFound {
module: String,
searched: PathBuf,
},
SourceRead {
path: PathBuf,
source: Error,
},
PathEscapesRoot {
field: String,
path: PathBuf,
},
OutputConflict {
first: String,
second: String,
path: PathBuf,
},
OutputOverrideAmbiguous {
count: usize,
},
OutputWrite {
path: PathBuf,
source: PackageError,
},
Package(PackageError),
}Expand description
Errors produced while packaging a built Gleam workflow project.
Every variant carries the offending path, field, or module as structured
data — not just formatted text — so callers can map variants to actionable
guidance (for example, PackagingError::ProjectNotBuilt maps to “run
gleam build”).
Variants§
ConfigMissing
The project root contains no workflow.toml packaging descriptor.
ConfigRead
The workflow.toml descriptor exists but could not be read.
Fields
ConfigParse
The workflow.toml descriptor is not valid TOML for the schema.
The wrapped error carries unknown-key detail: every table rejects unrecognised keys, naming the key and its location.
Fields
ConfigInvalid
The workflow.toml descriptor parsed but failed semantic validation.
Fields
SchemaRead
A declared JSON-Schema file could not be read.
Fields
SchemaParse
A declared JSON-Schema file is not valid JSON.
Fields
ProjectNotBuilt
The compiled Erlang output required for packaging does not exist.
GleamTomlMissing
The project root contains no gleam.toml, so it is not a Gleam project.
GleamMetadataRead
A Gleam metadata file (gleam.toml or the manifest.toml lockfile)
could not be read.
Fields
GleamMetadataParse
A Gleam metadata file could not be parsed as the expected TOML shape.
Fields
DependencyUnresolved
A production dependency named in gleam.toml is absent from the
manifest.toml lockfile, so the dependency closure cannot be computed.
BeamRead
A compiled .beam module (or its containing directory) could not be read.
Fields
ModuleNameNotUtf8
A compiled module filename is not valid UTF-8 and cannot become a logical module name.
DuplicateModule
Two Gleam packages in the production dependency closure provide the same logical module name.
Fields
EntryModuleNotFound
A declared workflow entry module is absent from the compiled output.
Fields
SourceRead
A first-party Gleam source file could not be read for inclusion.
Fields
PathEscapesRoot
A workflow.toml-declared path is absolute or escapes the project
root after lexically folding . and .. components.
Only descriptor-sourced paths (output, input_schema,
output_schema) are confined to the root; the programmatic
PackageOptions::output_override is the
caller’s own path and is intentionally exempt.
Fields
OutputConflict
Two workflows resolve to the same output archive path.
Fields
OutputOverrideAmbiguous
An output override was supplied for a project declaring multiple workflows.
OutputWrite
A workflow’s .aion archive could not be built or written to its
resolved output path.
Unlike the transparent PackagingError::Package variant, this one
names the output path, so “No such file or directory”-style I/O
failures identify the file that could not be written.
Fields
source: PackageErrorPackage-format failure reported while building or writing.
Package(PackageError)
A package-format failure surfaced while building, writing, or re-loading an archive (reserved module names, write I/O, verify-after-write).
Trait Implementations§
Source§impl Debug for PackagingError
impl Debug for PackagingError
Source§impl Display for PackagingError
impl Display for PackagingError
Source§impl Error for PackagingError
impl Error for PackagingError
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()