Skip to main content

Module validate

Module validate 

Source
Expand description

Manifest validation (B1).

load_manifest collapses the multiple package.toml dialects ([package_info] vs [identity]+[package]) into a single PackageManifest, but it is lenient: a manifest with an empty name or a kind/runtime mismatch still loads. This module turns that implicit tolerance into explicit, severity-rated findings so the runtime can warn at startup and a future weft package lint command can surface them.

Validation is pure (no I/O); callers that want to check the on-disk entry file pass entry_exists explicitly.

Structs§

ManifestIssue
A single validation finding for one manifest.

Enums§

Severity
Severity of a validation finding.

Functions§

has_errors
Convenience: true if any finding is an error.
validate_manifest
Validates a parsed manifest. entry_exists is the caller’s check of whether the resolved entry file is present on disk (pass None to skip that check, e.g. when validating in-memory without a package dir).