Skip to main content

Module patch

Module patch 

Source
Expand description

Resolve the active patch set for one Cabin invocation.

The CLI calls resolve_active_patches after loading the initial workspace graph and the merged effective config. The returned ActivePatchSet is the typed input the rest of the pipeline consumes:

  • the artifact pipeline filters out patched names so a patched dep is never re-fetched from the registry;
  • the workspace loader stitches the patched manifests in via crate::PatchedPackageSource;
  • the lockfile records each entry so --locked can detect stale patch policy;
  • the metadata view reports each entry deterministically.

Validation runs eagerly: missing paths, missing cabin.toml, package-name mismatches, and version-requirement mismatches all surface as PatchResolutionError before any consumer sees the resolved set. Wording is stable so integration tests can match substrings.

Structs§

ActivePatch
One fully-resolved patch entry. Pairs the typed source with the loaded patch Package so downstream consumers do not need to re-parse the patched cabin.toml.
ActivePatchSet
Container for the active patch set. Ordered by package name for deterministic iteration.
ConfigPatchInput
One config-derived patch entry as the orchestration layer hands it off to the resolver. The orchestration layer maps cabin_config::EffectivePatch into this shape so this crate stays free of cabin-config dependency.
PatchResolutionInputs
Inputs to resolve_active_patches. Bundling them keeps the call site readable and the function signature stable as new inputs land.

Enums§

PatchResolutionError
Errors produced by resolve_active_patches. Wording is stable so integration tests can match substrings.

Functions§

collect_patched_versioned_deps
Versioned dependencies declared by the patched manifests themselves.
resolve_active_patches
Resolve the active patch set deterministically.