mod report

module report

Operator-facing reports from a solved stack lock: ordered build list and baseline-vs-solved markdown stack diff.

Functions

fn classify_stack_diff(baseline: &StackLock, solved: &StackLock) -> Vec<PackageChange>

Classify every logical package (by name) between baseline and solved locks.

Result is sorted by package name for stable markdown.

fn format_build_list(lock: &StackLock, dep_map: &HashMap<String, Vec<String>>) -> String

Format a plain-text build list: one easyconfig path per line, deps first.

fn format_build_list_excluding(lock: &StackLock, dep_map: &HashMap<String, Vec<String>>, provided: &StackLock) -> String

The build list without the modules provided already installs.

A module counts as provided when name, version, toolchain and versionsuffix all match one in provided; a different version of the same name is still built. The order is that of format_build_list with the provided modules taken out, which keeps every remaining dependency ahead of what needs it.

fn format_stack_diff_markdown(baseline: &StackLock, solved: &StackLock) -> String

Human-reviewable markdown comparing baseline lock to solved lock.

Pasteable into a pull request: per-package status, versions, and easyconfig paths on each side that exists.

fn ordered_build_paths(lock: &StackLock, dep_map: &HashMap<String, Vec<String>>) -> Vec<String>

Return co-selected easyconfig paths in dependency order (deps before apps).

dep_map keys are lock identities (name, version, versionsuffix, toolchain), or a package name when the lock has one module of that name. Values are the same kind of token and cover runtime and build edges. Only dependencies that are also co-selected participate. Ties break by lock identity, which starts with the package name, so the order is deterministic.

fn ordered_packages<'a>(lock: &'a StackLock, dep_map: &HashMap<String, Vec<String>>) -> Vec<&'a LockPackage>

Packages in install order (same topology as ordered_build_paths).

fn provides(provided: &StackLock, p: &LockPackage) -> bool

Whether provided holds the same module as p: name, version, toolchain and versionsuffix all equal.

Enums

enum PackageChangeKind

Classification of one logical package between baseline and solved locks.

Unchanged

Present in both locks at the same version.

Added

In the solved lock only: the solve pulled it in.

Removed

In the baseline only. The markdown calls this “baseline not in this layer”: the solve did not select it. Self::as_str stays removed.

VersionBumped

In both, at different versions. The direction is not implied; read baseline_version against solved_version to see which way it moved.

Implementations

impl PackageChangeKind

Functions

fn as_str(self) -> &'static str

The stable kebab-case name used in reports and machine-read output.

removed stays this token so a consumer of the kind string keeps working. The markdown stack diff uses Self::markdown_label.

fn markdown_label(self) -> &'static str

Label printed in the human stack diff.

Baseline-only rows are modules the baseline has and this solve did not select. They are not a list of modules to delete.

Structs and Unions

struct PackageChange

One logical package’s baseline-vs-solved change for human review.

name: String

Logical package name, the key the two locks are matched on.

kind: PackageChangeKind

Which side of the comparison this package fell on.

baseline_version: Option<String>

Version in the baseline lock. None when the package is Added.

solved_version: Option<String>

Version in the solved lock. None when the package is Removed.

baseline_easyconfig_path: Option<String>

Easyconfig backing the baseline version, when that lock recorded one. Absent for an Added package and for a lock written without paths.

solved_easyconfig_path: Option<String>

Easyconfig backing the solved version, on the same terms.