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_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).

Edges come from dep_map (package name → co-stack dependency names). Only dependencies that are also co-selected participate. Tie-break is stable by 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).

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: nothing in the solved stack needs it.

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.

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.