Crate eb_stack#
- crate eb_stack#
EasyBuild stack lock: parse
.ebfiles, resolvo SAT co-select, planned SBOM.Modules
Re-exports
eb_stack::hierarchy::resolve_dep_versions_in_hierarchy_stricteb_stack::package_solve::solve_package_profile_with_hierarchy
Functions
- fn detect_foreign_format(path: &Path) -> Option<ForeignFormat>#
Detect format from path basename / extension.
- fn filter_baseline_candidates(base_cands: &[Candidate], policy_toolchain: &Toolchain, explicit_baseline_version: Option<&str>) -> Result<Vec<Candidate>>#
Filter baseline candidates to one generation of the policy toolchain family.
When the tree only contains the policy target version (single generation), candidates are left unchanged. When other versions of the same toolchain name exist, applies
select_baseline_generation(optional explicit override, else nearest lower).
- fn load_json_file<T: serde::de::DeserializeOwned>(path: &Path) -> Result<T>#
- fn package_plan_from_foreign(recipe: &ForeignRecipe, toolchain: &Toolchain) -> PackagePlan#
- fn parse_foreign_path(path: &Path, format: Option<ForeignFormat>) -> Result<ForeignRecipe, ForeignError>#
Parse from path; format auto-detected unless
formatis Some.
- fn parse_foreign_str(format: ForeignFormat, text: &str) -> Result<ForeignRecipe, ForeignError>#
Parse foreign recipe text for the given format.
- fn select_baseline_generation(versions: impl IntoIterator<Item = impl AsRef<str>>, target_version: &str, explicit: Option<&str>) -> std::result::Result<String, BaselineGenError>#
Choose the baseline toolchain version for a same-family multi-generation tree.
If explicit is set, that version must appear in versions and is used as-is. Otherwise select the nearest lower generation than target_version under cmp_version ordering (greatest version strictly less than the target).
This replaces an earlier first-non-target in BTreeSet sort order pick, which is wrong when more than one non-target generation is present (for example 2024b before 2025a when the target is 2025b).
- fn solve_from_easyconfigs(easyconfigs_roots: &[&Path], policy_path: &Path, baseline_easyconfigs: Option<&Path>, lock_out: &Path, sbom_out: Option<&Path>) -> Result<StackLock>#
Parse easyconfigs dir(s), filter to policy toolchain, solve with resolvo, write lock (and optional CycloneDX SBOM when
sbom_outisSome).easyconfigs_rootsmay list multiple trees; later paths override earlier ones for the same name+version+toolchain (site overlay on upstream).When
baseline_easyconfigsis set and that tree holds multiple generations of the policy toolchain family, the baseline generation is chosen byselect_baseline_generation: optionalbaseline_toolchain_versionoverride, else the nearest lower generation than the policy target.
- fn solve_from_easyconfigs_with_baseline_version(easyconfigs_roots: &[&Path], policy_path: &Path, baseline_easyconfigs: Option<&Path>, baseline_toolchain_version: Option<&str>, lock_out: &Path, sbom_out: Option<&Path>) -> Result<StackLock>#
Like
solve_from_easyconfigs, with an optional explicit baseline toolchain version.
- fn solve_from_easyconfigs_with_baseline_version_and_extras(easyconfigs_roots: &[&Path], policy_path: &Path, baseline_easyconfigs: Option<&Path>, baseline_toolchain_version: Option<&str>, lock_out: &Path, sbom_out: Option<&Path>, extra: SolveExtraOut<'_>) -> Result<StackLock>#
Full form: explicit baseline toolchain generation selection (see
select_baseline_generation) plus optional operator artifacts (build list / stack diff, seeSolveExtraOut). SBOM is written only whensbom_outisSome.Multiple
easyconfigs_rootsare merged with later-path overlay precedence.
- fn solve_from_easyconfigs_with_extras(easyconfigs_roots: &[&Path], policy_path: &Path, baseline_easyconfigs: Option<&Path>, lock_out: &Path, sbom_out: Option<&Path>, extra: SolveExtraOut<'_>) -> Result<StackLock>#
Like
solve_from_easyconfigs, optionally writing build-list and stack-diff files.
- fn write_json_pretty(path: &Path, value: &impl serde::Serialize) -> Result<()>#
- fn write_text(path: &Path, text: &str) -> Result<()>#
Enums
- enum BaselineGenError#
Errors when choosing which toolchain generation is the baseline.
- ExplicitNotFound(String)#
--baseline-toolchain-version(or equivalent) is not present in the tree.
- enum ForeignFormat#
Origin of a foreign recipe.
- CondaForge#
- Spack#
Implementations
- impl ForeignFormat#
Functions
- fn as_str(self) -> &'static str#
Structs and Unions
- struct ForeignDep#
One dependency name (and optional pin) drawn from a foreign recipe.
- name: String#
- pin: Option<String>#
Pin / constraint as written in the foreign recipe when present.
- role: String#
Role:
build,host,run, or Spack type string when known.
- original_spec: Option<String>#
Complete upstream dependency spec before EasyBuild name mapping.
- condition: ConditionExpr#
Selector /
when=expression represented structurally.
- provenance: Vec<Provenance>#
- struct ForeignRecipe#
Syntax-normalized fields shared by all foreign recipe formats.
- format: ForeignFormat#
- name: String#
- version: String#
- homepage: Option<String>#
- source_url: Option<String>#
Preferred / primary source (first expanded URL or preferred Spack version).
- source_filename: Option<String>#
- sha256: Option<String>#
- sources: Vec<ForeignSource>#
All sources when the foreign recipe lists multiple (conda multi-source, etc.).
- summary: Option<String>#
- description: Option<String>#
Longer description when available (conda about.description, Spack docstring).
- license: Option<String>#
- dependencies: Vec<ForeignDep>#
- build_system_hints: Vec<String>#
Build-system / base-class hints (e.g. Spack
MesonPackage,CMakePackage).
- configopts: Option<String>#
Mechanically extracted configure flags (e.g. Spack meson_args / cmake_args literals).
- patches: Vec<String>#
Patch filenames / URLs recorded from foreign recipe (not applied).
- variants: Vec<ForeignVariant>#
Spack variants (and residual conda features when recorded).
- rules: Vec<ForeignRule>#
Spack
conflicts()andrequires()directives.
- notes: Vec<String>#
Human notes from the parser.
- struct ForeignRule#
- kind: ForeignRuleKind#
- spec: String#
- when: Option<String>#
- condition: ConditionExpr#
- message: Option<String>#
- provenance: Provenance#
- struct ForeignSource#
One source artifact (URL/git + optional checksum).
- url: Option<String>#
- filename: Option<String>#
- sha256: Option<String>#
- git: Option<String>#
- tag: Option<String>#
- commit: Option<String>#
- target_directory: Option<String>#
Conda
target_directoryor Spack resource destination folder.