fix(deps): update rust crate gix-diff to 0.67 - autoclosed - #904
ferrlabs-renovate[bot] wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
What changed: gix-diff 0.66→0.67. Upstream marks it breaking only for the tree-merge API (new ResolutionFailure variants from an exhaustive match). No other API removed/renamed.
What breaks here — Blocking: FerrFlow doesn't use tree-merge at all, only the plain two-way gix_diff::tree() walk in src/git/diff.rs:95-97, matching recorder::Change::{Addition,Deletion,Modification} — untouched by the documented breaking change. The real problem is a version-skew diamond: gix 0.86 (unchanged here) still depends on gix-diff 0.66.0 → gix-object 0.63.0, while the direct gix-diff dependency is now pinned to 0.67.0 → gix-object 0.64.1 (both versions coexist in Cargo.lock, along with duplicated gix-actor/gix-date/gix-error). gix-diff::tree()'s signature takes a concrete TreeRefIter<'_> tied to its gix-object, but src/git/diff.rs:3,96-97 passes gix::objs::TreeRefIter, which is the gix-object 0.63.0 type re-exported through gix. These are two different, incompatible concrete types — this does not compile.
Why CI fails: Test and Coverage both fail (build-dependent jobs), consistent with the type-mismatch compile error above; the non-build jobs (zizmor, osv-scanner, gitleaks, snyk) stay green as expected.
This bump shouldn't land as-is: it needs gix itself to raise its internal gix-diff/gix-object requirement first (or an explicit re-pin of the whole gix-* family to a mutually-compatible set), not just bumping the standalone gix-diff line in Cargo.toml. Recommend holding this PR until the gix release that picks up gix-diff 0.67 lands.
16a32c0 to
360c257
Compare
SonarQube — aucune nouvelle issueComparaison entre le projet bac à sable de cette PR et la branche par défaut : SonarQube Community n'analyse pas les PR, ce delta est calculé côté CI. Détail |
cb4785b to
77977a1
Compare
77977a1 to
0a37340
Compare
Pull request was closed
This PR contains the following updates:
0.66→0.67Release Notes
GitoxideLabs/gitoxide (gix-diff)
v0.67.1: gix-diff v0.67.1Compare Source
Commit Statistics
Commit Details
view details
0f837c0)169ae96)7192d9a)b8914ff)v0.67.0: gix-diff v0.67.0Compare Source
Changed (BREAKING)
Refactor tree-merge change matching and resolution.
Breaking because of added
ResolutionFailurevariants.The tree-merge implementation previously combined side-diff collection,
path matching, scheduling, and the complete conflict-resolution matrix in a
single function. It also duplicated change collection for both sides and
represented pair outcomes with independent boolean flags.
Keep the public tree() entry point as a small facade and move the merge
engine into focused private modules. Collect each ancestor-to-side diff
through one helper that constructs a SideState containing the flat change
list and its matching tree together. Isolate path and rename candidate
matching, including identical-change suppression, from classification into
pairs that the resolution matrix understands.
Represent the result of handling each paired change explicitly as a
ChangeDisposition. This preserves the important distinction between a
change that was merely processed and one whose effect is present in the
editor, without duplicating the final state transition in the scheduler.
Replace the type-specific side-picking helpers with generic pick() and
pick_mut() helpers as well.
These boundaries make the state machine easier to review and reduce the
chance that a future rename or forced-resolution fix accidentally changes
collection, matching, and application at once. They also remove duplicated
setup while keeping the exhaustive resolution match in one place, where
its symmetry remains visible. The public API and all recorded merge results
remain unchanged.
Fixes and Improvements
Tree merging combines a flat change schedule with per-side path indexes. Valid
Git operations can therefore arrive in different orders or expose structural
relationships before the leaf changes that ultimately apply them. Several
resolver branches treated those relationships as physical occupancy or as
content changes for the same identity, leading to hangs, assertions, duplicate
entries, lost siblings, or merge results that depended on diff and side order.
Separate unique-path occupancy from PassedRewrittenDirectory scheduling so a
side-qualified name can terminate below directory rewrites. Prune empty path
nodes back to the root, and allow a deferred rewrite to insert only its new
destination because its source is already indexed.
Resolve the structural cases at their actual identity boundaries:
resolution and defer early descendants until their parent deletion runs;
directory replacements at their explicit sources;
an empty compatible merge base;
vacated by directory renames;
directory in place and moving only the blocking file;
collapsing identical rewrites to one clean shared destination; and
made exactly once.
Forced Ancestor and Ours resolution continues to apply only the selected side.
Git-backed baselines cover both directions, forced policies, modes, symlinks,
gitlinks, nested directories, and documented index-only deviations. The
resulting suite contains 155 directional baseline cases, and the Cartesian
model reaches 210/210 Git/gix agreement for trees and path/mode results.
More Hardening
Deferred tree changes may be reconsidered after another conflict has already
consumed or pruned the same path-tree node. This is valid when rename detection
has ambiguous identical sources, when structural conflicts overlap, or when a
change follows a detected directory rename. The editor and conflict records
still contain the required state, but strict bookkeeping removals and older
same-path assertions turned these schedules into debug panics, hangs, or
side-order-dependent duplicate content.
Make cleanup idempotent wherever absence is already the required end state:
add/add type conflicts, same-source rewrites, blocking conflict destinations,
delete/rewrite sources, and changes deferred through directory renames. Accept
cross-path structural matches from ambiguous rewrite candidates and let the
existing conservative unknown-conflict fallback handle them.
Preserve each rewrite input mode when blob content is identical so executable
mode changes remain visible to the merge. Make unique-path selection respect
childless tracked directories and qualify the first blocking file component,
which guarantees termination instead of varying an ineffective descendant
suffix forever. Finally, when a deferred addition is relocated to a unique
conflict path, remove its temporary original path from the side index before
marking it processed so a later descendant cannot relocate the same content a
second time.
The minimized and accumulated fuzz inputs now complete without failure.
Git-backed regressions cover ambiguous sources, consumed nodes, repeated
rename/delete candidates, mode-only rewrite collisions, unique paths below
files, and nested rename destinations in both side orderings. The final tree
baseline contains 165 directional cases with 130 intentionally skipped forced
resolution checks, and reversing the nested relocation case retains exactly
a/a/aanda~Awithout inventinga~A_0.Test
I want to add similar tests for
gix-blameas well, but first I want toproperly understand this part of the
gix-diffmachinery.Bug Fixes
support shell commands in external blob diffs
Treat configured external diff commands as shell command lines instead of
executable paths that require manual argument splitting.
Git diff drivers may contain a program followed by arguments. Passing such
values through the shell-aware gix-command preparation path preserves that
configuration while still appending Git diff arguments and environment variables
in the established platform code.
Add coverage for a configured command containing an argument so custom diff
drivers and text-conversion commands are launched as configured.
Commit Statistics
Commit Details
view details
ebe9095)7424676)5c8d935)227619a)5e600cb)6ade0d4)f3bbfad)752f16f)gix-testtools(0cbe539)gix_object::tree::name_orderinstead of copy of the same function (db1f7d4)2a4d996)Store::at()where possible (17fea2a)f33e250)43cf77f)cc3ee80)ab4fcb0)ae8845a)Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR has been generated by Mend Renovate CLI.