mod merge_order¶
- module merge_order¶
Order open pull requests so a shared module is built once.
Edge A -> B when a module in B’s
to_buildis an easystack entry A adds (A asks for it by name; B only reaches it), or when adepends-onrow names A asfromand B asto. An easyconfigs record has no easystack entries, so its edges are those rows: a pull request that adds a module, or one that patches a module another pull request builds a dependent of. Edges both ways form a cycle.Among pull requests with no remaining incoming edge, pick the one whose residual build set is smallest, then the lowest pull request number.
After picking, add its residual builds to the installed set and recompute residuals for the rest.
savesis that difference.A strongly connected component is reported in
cycles. Edges inside it are dropped, and rule 2 orders its pull requests with every other pull request that has no remaining incoming edge.
Variables
- const MERGE_IMPACT_SCHEMA_VERSION: u32¶
Schema of
MergeImpactReport.
- const MERGE_ORDER_SCHEMA_VERSION: u32¶
Schema of
MergeOrder.
Functions
- fn conflicts_from_records(records: &[PrRecord]) -> Vec<EasystackConflict>¶
Same collisions, read from the text stored on each record.
- fn easystack_conflicts(prs: &[PrInput]) -> Vec<EasystackConflict>¶
Collisions on one easystack. The insertion point is the 0-based index of the base line before the first added line, or -1 when the addition starts at the top of the file. Identical added lines are
same-entry.
- fn entry_module(file: &str) -> Option<String>¶
Lib-1.0-GCCcore-15.2.0.ebasks forLib/1.0-GCCcore-15.2.0.
- fn impact(records: &[PrRecord], index: &OverlapIndex, pr: u64, merged: &[u64]) -> Option<MergeImpact>¶
Pull requests a merge of
prchanges.Nonewhenpris not a record.mergedpull requests are already installed. Theirto_buildis removed from both sides before the intersection, and they are omitted fromaffected. That is the same installed setplanuses.A
depends-onrow whosetois this pull request names modules the other pull request builds. Closing over that head puts them into_buildhere, but merging this pull request does not install them, so they are not a shrink of the provider.
- fn impact_report(records: &[PrRecord], index: &OverlapIndex, numbers: &[u64], generated_at: &str, merged: &[u64]) -> Result<MergeImpactReport, u64>¶
One report for every requested pull request, in ascending number order.
The first unknown number is
Err.
- fn plan(records: &[PrRecord], index: &OverlapIndex, merged: &[u64]) -> MergeOrder¶
Order
records.mergedpull requests are already installed: theirto_buildmodules seed the residual, and they are not steps.indexsupplies the timestamp and the installed-list label.
- fn render_section(order: &MergeOrder, repo_url: &str) -> String¶
Markdown table appended to
overlap.mdwhen--merge-orderis set.
- fn unknown_merged(inputs: &[u64], merged: &[u64]) -> Option<u64>¶
The first
--mergednumber that is not one ofinputs, if any.
Structs and Unions
- struct ArchImpact¶
What merging the named pull requests does on one architecture.
- arch: String¶
- impacts: Vec<MergeImpact>¶
- struct EasystackConflict¶
Easystack edits that collide.
kindissame-insertionorsame-entry.- easystack: String¶
- prs: Vec<u64>¶
- kind: String¶
- struct MergeEffect¶
Another pull request whose build set or depends-on edge changes.
- pr: u64¶
- shrinks: Vec<String>¶
Modules that leave the other pull request’s
to_build.
- resolves: Vec<String>¶
Modules of a depends-on edge from the merged pull request to this one.
The edge is the same one
plandraws: an easystack entry the provider asks for, or adepends-onrow from the provider.
- struct MergeImpact¶
One pull request judged on its own.
- pr: u64¶
- affected: Vec<MergeEffect>¶
- struct MergeImpactReport¶
What merging one pull request does to the others, on its own.
This is not the residual after earlier steps of
plan. It treats this pull request’sto_buildas newly installed, after removing every module a--mergedpull request already builds. Those pull requests are not listed inaffected.- schema_version: u32¶
- generated_at: String¶
- impacts: Vec<MergeImpact>¶
- arches: Vec<ArchImpact>¶
Per-architecture impacts. Empty when the run used one installed list, in which case
impactsis that list.
- struct MergeOrder¶
One merge order.
mergedandconflictsstay empty until those flags run.- schema_version: u32¶
- generated_at: String¶
- installed_source: String¶
- merged: Vec<u64>¶
- cycles: Vec<Vec<u64>>¶
- conflicts: Vec<EasystackConflict>¶