#[non_exhaustive]pub enum LinkDiagnostics {
MissingLean {
tried: Vec<String>,
},
MissingHeader {
path: PathBuf,
},
MissingLib {
name: String,
search_dirs: Vec<PathBuf>,
},
VersionMismatch {
expected: String,
actual: String,
},
AllowlistFailure {
name: &'static str,
},
FixtureArtifactMissing {
path: PathBuf,
recovery: &'static str,
},
UnsupportedToolchain {
active: String,
supported_window: String,
},
LakeTargetMissing {
project_root: PathBuf,
target_name: String,
},
LakeUnavailable {
project_root: PathBuf,
target_name: String,
detail: String,
},
LakeBuildFailed {
project_root: PathBuf,
target_name: String,
status: String,
detail: String,
},
LakeOutputUnresolved {
project_root: PathBuf,
target_name: String,
reason: String,
},
}Expand description
Reasons the Lean toolchain or its linkage could not be resolved.
Variants carry enough context to produce a single actionable diagnostic.
The enum is #[non_exhaustive] — adding a new failure mode is not a
breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MissingLean
No discovery probe could locate a Lean prefix containing include/lean/lean.h.
MissingHeader
A discovered prefix is missing the expected header file.
MissingLib
A required Lean library was not found in any search directory.
Fields
VersionMismatch
The discovered Lean version disagrees with the build-baked one.
Fields
AllowlistFailure
A symbol in the required-symbols allowlist failed to resolve.
FixtureArtifactMissing
A built Lake fixture artifact is missing.
Fields
UnsupportedToolchain
The active Lean toolchain is outside the supported window
declared by lean_rs_sys::SUPPORTED_TOOLCHAINS.
Fields
supported_window: StringComma-joined versions arrays from each
SupportedToolchain entry,
rendered as ["4.23.0", "4.24.0", "4.24.1"], ["4.25.0", ...], ....
LakeTargetMissing
The requested Lake target was not declared in the project’s lakefile.
Fields
The lake executable could not be started.
LakeBuildFailed
lake build <target>:shared exited unsuccessfully.
Fields
LakeOutputUnresolved
Lake completed, but lean-toolchain could not resolve the expected dylib path.
Trait Implementations§
Source§impl Debug for LinkDiagnostics
impl Debug for LinkDiagnostics
Source§impl Display for LinkDiagnostics
impl Display for LinkDiagnostics
Source§impl Error for LinkDiagnostics
impl Error for LinkDiagnostics
1.30.0 · 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()