Skip to content

Commit 77e9bf0

Browse files
Update Rust crate similar to v3 (#7689)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [similar](https://redirect.github.com/mitsuhiko/similar) | workspace.dependencies | major | `2.7.0` → `3.0.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/357) for more information. --- ### Release Notes <details> <summary>mitsuhiko/similar (similar)</summary> ### [`v3.1.0`](https://redirect.github.com/mitsuhiko/similar/blob/HEAD/CHANGELOG.md#310) [Compare Source](https://redirect.github.com/mitsuhiko/similar/compare/3.0.0...3.1.0) - Added `capture_diff_slices_by_key` and `capture_diff_slices_by_key_deadline` as convenience helpers for diffing slices by derived keys. - Fixed `Compact` emitting inconsistent `DiffOp` cursor positions after compaction, which could leave `Delete`/`Insert` operations with stale `new_index`/`old_index` values. - Added explicit lifetime capture (`+ use<...>`) on iterator-returning APIs to improve compatibility with Rust 2024 lifetime capture behavior. [#&#8203;93](https://redirect.github.com/mitsuhiko/similar/issues/93) ### [`v3.0.0`](https://redirect.github.com/mitsuhiko/similar/blob/HEAD/CHANGELOG.md#300) [Compare Source](https://redirect.github.com/mitsuhiko/similar/compare/2.7.0...3.0.0) - Added a Git-style Histogram diff implementation exposed as `Algorithm::Histogram`, including deadline-aware Myers fallback and comprehensive regression/behavior tests. - Raised MSRV to Rust 1.85 and moved the crate to Rust 2024 edition. - Added a Hunt-style diff implementation exposed as `Algorithm::Hunt`. - Added configurable inline refinement via `InlineChangeOptions` and `InlineChangeMode`, including semantic cleanup and new `TextDiff::iter_inline_changes_with_options*` methods. [#&#8203;92](https://redirect.github.com/mitsuhiko/similar/issues/92) - Added a global disjoint-input fast path in `algorithms::diff_deadline` to avoid pathological runtimes on large, fully distinct inputs. - Improved `Algorithm::Myers` performance on heavily unbalanced diffs to avoid pathological slowdowns. - Added `diff_deadline_raw` entrypoints in the algorithm modules to bypass shared heuristics and keep minimal intrinsic trait bounds where needed. - Added test files in `examples/diffs` that can be used with the some of the examples as input pairs. - Added `CachedLookup`, a helper for adapting virtual or computed sequences by materializing items on first access and then serving borrowed values through normal indexing. The `owned-lookup` example demonstrates this approach for issue [#&#8203;33](https://redirect.github.com/mitsuhiko/similar/issues/33). - Fixed ranged indexing in the classic LCS table algorithm. - Improved diff compaction to merge adjacent delete hunks across equal runs. - Excluded development scripts from published crate contents. [#&#8203;87](https://redirect.github.com/mitsuhiko/similar/issues/87) - `TextDiff::from_*` and `TextDiffConfig::diff_*` now accept owned inputs (`String`, `Vec<u8>`, `Cow`) in addition to borrowed inputs. This allows returning text diffs from functions without external owner lifetimes. [#&#8203;65](https://redirect.github.com/mitsuhiko/similar/issues/65) - `TextDiff` no longer exposes `old_slices` / `new_slices`. Use `old_len`, `new_len`, `old_slice`, `new_slice`, `iter_old_slices`, `iter_new_slices`, `old_lookup`, and `new_lookup` instead. - `TextDiff::iter_changes` now panics on invalid out-of-bounds `DiffOp` ranges instead of silently truncating iteration. - `utils::diff_lines_inline` now takes `&TextDiff` and options rather than `(Algorithm, old, new, options)`. - `utils::diff_lines` now avoids a second line-tokenization pass. - Renamed `get_diff_ratio` to `diff_ratio`. - Added first-class `no_std + alloc` support with an explicit default `std` feature. - Added optional `hashbrown` backend for `no_std` map storage (`default-features = false, features = ["hashbrown"]`), while the default `no_std` backend uses `alloc::collections::BTreeMap`. - Made core constructors const-ready (`Capture::new`, `Replace::new`, `NoFinishHook::new`, `InlineChangeOptions::new`, `TextDiff::configure`). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/vortex-data/vortex). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6WyJjaGFuZ2Vsb2cvY2hvcmUiXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent c87bfca commit 77e9bf0

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 18 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ serde_json = "1.0.138"
227227
serde_test = "1.0.176"
228228
sha2 = "0.11.0"
229229
simdutf8 = "0.1.5"
230-
similar = "2.7.0"
230+
similar = "3.0.0"
231231
sketches-ddsketch = "0.4.0"
232232
smol = "2.0.2"
233233
static_assertions = "1.1"

0 commit comments

Comments
 (0)