pub enum ToolchainError {
GleamSpawn {
gleam_path: PathBuf,
source: Error,
},
TypeCheck {
diagnostics: String,
},
DependencyLayer {
diagnostics: String,
},
Packaging(PackagingError),
Io {
path: PathBuf,
source: Error,
},
InvalidProject {
message: String,
},
}Expand description
Failures produced while compiling, type-checking, and packaging Gleam
workflow source through the external gleam binary.
Variants§
GleamSpawn
The configured gleam binary could not be spawned (not found on the
configured path, not executable, or the OS refused the process).
This is an operator-configuration fault, never a caller-correctable source error: it names the path that was invoked.
Fields
TypeCheck
gleam build exited non-zero: the submitted source did not compile or
type-check. The captured compiler output travels back verbatim so the
author sees the real type error inline.
No .aion is produced and no partial package is returned on this path.
Fields
DependencyLayer
gleam exited non-zero from inside its own dependency layer — a
fetch, a Hex API call, unpacking a downloaded tarball, or a version
solve that could not reach the registry.
🔴 The submitted source was never compiled, so nothing has been
established about it. This variant exists because every such failure
used to be reported as Self::TypeCheck, which is a structured claim
that type-checking happened and produced diagnostics — telling an
author their code failed to type-check when a registry was unreachable.
The wording was not the defect; the variant was (#125).
Callers must not present this as a source error. It is transient, it is the operator’s or the network’s to fix, and it is worth retrying.
Fields
Packaging(PackagingError)
The submitted source compiled and type-checked, but assembling the
.aion archive from the built project failed.
Io
A filesystem operation against the project root failed (reading the descriptor, writing the submitted source, or resolving a path).
Fields
InvalidProject
The project root is not a usable Gleam workflow project, or a request
field was malformed before any build ran (no gleam.toml, no
workflow.toml, an entry module that escapes the project src/
directory, or an entry module name that is not a safe logical name).
Trait Implementations§
Source§impl Debug for ToolchainError
impl Debug for ToolchainError
Source§impl Display for ToolchainError
impl Display for ToolchainError
Source§impl Error for ToolchainError
impl Error for ToolchainError
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()