mod bump_companion¶
- module bump_companion¶
Companion bumps: the dependency recipes a version bump needs and the tree does not have.
A recipe that writes a dependency version in terms of its own, as
('Boost', version)or('protobuf', version[2:]), asks for a new dependency version every time it moves. When the robot has that name in the target hierarchy at another version, the dependency is bumped too, from that recipe, into the same overlay, and the root is solved against it. A dependency with no recipe of that name anywhere in the hierarchy is left to the root bump, which records it as before.Functions
- fn companion_requests(request: &BumpPackageRequest, options: &PackageEmitOptions) -> Result<Vec<(BumpPackageRequest, String)>, PackageWorkflowError>¶
The bump request for each dependency the bumped recipe needs at an exact version no candidate has, when the tree has that dependency in the target hierarchy at another version to bump from.
- fn plan_package_bump_with_companions(request: &BumpPackageRequest, options: &PackageEmitOptions, client: Option<&dyn RegistryClient>) -> Result<BumpWithCompanions, PackageWorkflowError>¶
Plan a bump and every companion bump it needs.
clientfetches each new source and writes its checksum, as--fetch-checksumsdoes for the root;Noneplans without fetching.
- fn plan_package_bump_with_companions_deciding(request: &BumpPackageRequest, options: &PackageEmitOptions, client: Option<&dyn RegistryClient>, decisions: &crate::source_fetch::BumpDecisions) -> Result<BumpWithCompanions, PackageWorkflowError>¶
plan_package_bump_with_companionswith the operator’s decisions for the root bump. A companion takes none of them: a dropped patch names a file of the root recipe, not of the recipes it pulls in.
- fn write_companions(root: &PackageBundle, companions: &[CompanionBump], out_dir: &std::path::Path) -> Result<WrittenCompanions, PackageWorkflowError>¶
Write each companion into
out_dir: its plan, SBOM and lock under packages/<name>-<version>-<toolchain>/, its recipe and patches into the sharedeasyconfigs/overlay the root is written to.build-order.jsonlists the companions before the root, so a campaign builds them first.
Structs and Unions
- struct BumpWithCompanions¶
A bump together with the companions it needed, dependencies first.
- root: PackageBundle¶
The bump that was asked for.
- fetched: Vec<SourceFetch>¶
What fetching the root’s new source found.
- companions: Vec<CompanionBump>¶
Companion bumps in build order.
- struct CompanionBump¶
One dependency bumped because the root needs a version the tree lacks.
- required_by: String¶
The package that asked for it.
- request: BumpPackageRequest¶
The request the companion was planned from.
- bundle: PackageBundle¶
The planned companion.
- fetched: Vec<SourceFetch>¶
What fetching its new source found, when sources were fetched.
Implementations
- impl CompanionBump¶
Functions
- fn record(&self) -> CompanionRecord¶
The record of this companion for
companions.json.
- struct CompanionRecord¶
The record written beside a bundle that carries companions.
- name: String¶
Companion package name.
- version: String¶
Version it was bumped to.
- toolchain: String¶
Toolchain it was bumped on.
- source: String¶
The recipe it was bumped from.
- required_by: String¶
The package whose recipe asked for this version.