mod package_catalog¶
- module package_catalog¶
Public layered package-source catalog for recursive package-closure planning.
Catalog data maps a canonical EasyBuild provider identity onto authoring inputs needed when the robot tree has no compatible candidate. Two provider kinds are supported:
CatalogProviderKind::Foreign(TOMLforeign, the default): conda-forge or Spack recipe path, optional format, package-config layers, positional source checksums, and product profile.CatalogProviderKind::EasyBuildBump(TOMLeasybuild-bump): an existing.ebrecipe retargeted through the annual-bump pipeline. Foreign-only fields are rejected; at most one source checksum is allowed.
Paths resolve relative to the catalog file. Package names never appear as Rust control flow.
Variables
- const PACKAGE_CATALOG_SCHEMA_VERSION: u32¶
Schema version of a package catalog.
Functions
- fn resolve_package_catalog_layers(layers: &[PackageCatalogLayer]) -> Result<PackageSourceCatalog, PackageCatalogError>¶
Merge layered catalog patches into unique resolved providers.
Later layers override earlier fields for the same identity (
normalized name+ optional version). Within a single layer, a repeated identity is an error.
Enums
- enum CatalogProviderKind¶
How a catalog entry authors a missing EasyBuild provider.
Public TOML spellings are
foreign(default) andeasybuild-bump.- Foreign¶
Plan from a conda-forge or Spack recipe (default for schema-1 entries).
- EasyBuildBump¶
Retarget an existing EasyBuild recipe through the annual-bump pipeline.
Implementations
- impl CatalogProviderKind¶
Functions
- fn as_str(self) -> &'static str¶
The stable kebab-case name used in configuration and output.
- enum PackageCatalogError¶
Why a catalog could not be read or resolved.
- UnsupportedSchema(u32)¶
The catalog declares a schema this build does not read.
- Toml(toml::de::Error)¶
The catalog is not valid TOML.
- Io(String, std::io::Error)¶
A catalog file could not be read.
- EmptyPackageName¶
An entry has no package name.
- MissingToolchain¶
An entry names no toolchain and none could be inferred.
- name: String¶
Entry with no toolchain.
- IncompleteProvider¶
An entry is missing something it needs to be usable.
- name: String¶
Entry that is unusable.
- reason: String¶
What it is missing.
- IncompatibleBumpField¶
A bump entry sets a field that only applies when generating anew.
- name: String¶
Bump entry at fault.
- field: String¶
Field that does not apply to a bump.
- MultipleBumpChecksums¶
A bump entry gave more than one checksum; a bump has one source.
- name: String¶
Bump entry at fault.
- DuplicateProvider¶
Two entries provide the same package and version.
- name: String¶
Package declared twice.
- version: String¶
Version they both claim.
Structs and Unions
- struct PackageCatalogLayer¶
One public TOML layer of package-source providers.
- schema_version: u32¶
Must equal
PACKAGE_CATALOG_SCHEMA_VERSION.
- packages: Vec<PackageSourcePatch>¶
Declared providers, merged by name across layers.
- base_directory: Option<PathBuf>¶
Directory used to resolve relative paths when this layer was loaded from disk.
Implementations
- impl PackageCatalogLayer¶
Functions
- fn from_path(path: &Path) -> Result<Self, PackageCatalogError>¶
Parse a catalog from a file, resolving relative paths against it.
- fn from_toml_str(input: &str) -> Result<Self, PackageCatalogError>¶
Parse a catalog from TOML text.
- struct PackageSourceCatalog¶
Resolved catalog of unique package-source providers.
Implementations
- impl PackageSourceCatalog¶
Functions
- fn lookup(&self, name: &str, version: Option<&str>) -> Result<&PackageSourceProvider, PackageCatalogError>¶
Look up a provider by EasyBuild name and optional exact version.
Names match after case/punctuation normalization. When
versionisNone, exactly one catalog entry must match the name.
- fn providers(&self) -> &[PackageSourceProvider]¶
Every resolved provider, in declaration order.
- struct PackageSourcePatch¶
Partial or complete provider description inside a catalog layer.
- name: String¶
Package this entry provides.
- provider: Option<CatalogProviderKind>¶
Provider kind; omitted entries resolve to
CatalogProviderKind::Foreign.
- version: Option<String>¶
Version it provides, when the entry pins one.
- source: Option<String>¶
Recipe to generate from.
- format: Option<ForeignFormat>¶
Format of that recipe, when it cannot be detected.
- package_config: Vec<String>¶
Configuration layers applied when generating.
- source_checksums: Vec<String>¶
Positional source checksums for the generated package.
- profile: Option<String>¶
Profile to build. Defaults to the package’s own default.
- stack_policy: Option<String>¶
Optional stack-policy TOML/JSON path used when planning this provider.
- struct PackageSourceProvider¶
Fully resolved provider ready for recursive package planning.
- name: String¶
Package provided.
- provider: CatalogProviderKind¶
Whether this generates a new package or bumps an existing one.
- version: Option<String>¶
Version provided, when pinned.
- source: PathBuf¶
Recipe to generate from.
- format: Option<ForeignFormat>¶
Format of that recipe.
- package_config: Vec<PathBuf>¶
Configuration layers, resolved to paths.
- source_checksums: Vec<String>¶
Positional source checksums.
- profile: String¶
Profile to build.
- stack_policy: Option<PathBuf>¶
Stack policy governing this provider’s own solve.