Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update rust crate gix to 0.66.0 #14477

Closed
wants to merge 1 commit into from
Closed

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 1, 2024

This PR contains the following updates:

Package Type Update Change
gix workspace.dependencies minor 0.64.0 -> 0.66.0

Release Notes

Byron/gitoxide (gix)

v0.66.0: gix v0.66.0

Compare Source

New Features
  • add objects::tree::diff::Platform::stats() to quickly obtain diff-stats.
    This function is inspired by git2 which also makes it very simple to obtain.
  • allow threaded-handling of tree-diff changes.
    This works by providing Change::detach() and ChangeDetached::attach().
  • add Reference::follow_to_object()
    It's an equivalent to git2::Reference::resolve().`
  • add Repository::diff_resource_cache_for_tree_diff()
  • add Reference::peel_to_kind()
    Make it easy to follow a ref and peel it to a given object type.
    Additional peel_to_<kind>() shortcuts are also provided, with
    the same name as in git2.
  • add Repository::find_*() methods for every object type.
  • add Repository::compute_object_cache_size_for_tree_diffs().
    With it it's easier to obtain reasonable object cache sizes as optimized
    for tree-diffs.
  • remote::Name::to_owned() to get a static version of it.
    Also, add optional serde support.
  • Reference::remote_name() now also provides valid remote names for local tracking branches.
  • add Reference::peel_to_id_in_place_packed() to allow passing a packed-buffer snapshot.
    This is useful for speeding up reference lookups as otherwise, it will have to validate the packed-buffer
    snapshot didn't change internally each time a ref is peeled.
  • add remote::Names as shortcut to the value returned for all remote names.
Bug Fixes
  • similarity detection
    Previously it would incorrectly count only the last batch of removed bytes, and now it will count all of them. This leads to realistic results with complex diffs, even though it's probably still not en-par with Git which uses more complex heuristics.

  • prevent panic in Repository::rev_parse_single() when HEAD was invalid.
    When using a refspec like HEAD:file.

  • do not automatically use a parallel directory walk.
    This reduces dependencies and can speed-up typical ref-walks as these
    don't benefit from this many threads - the overhead here usually outweighs
    the benefit.

    This can be turned back on based on the expected workload.

Other
  • make tree-diff more easily discoverable when coming from git2
Bug Fixes (BREAKING)
  • better peeling performance for reference traversal.
    This is done by keeping a packed-buffer around and reusing it, instead
    of re-checking it every time.

    For this to work, the peeled() function on the reference::Iter can now fail
    as it has to open a packed-refs snapshot.

Commit Statistics
  • 41 commits contributed to the release over the course of 28 calendar days.
  • 29 days passed between releases.
  • 16 commits were understood as conventional.
  • 2 unique issues were worked on: #​1508, #​1524
Commit Details
view details
  • #​1508
    • Reproduce panic when parsing refspecs (17bd32a)
  • #​1524
    • Add a real-world test to reproduce an issue discovered in jj (7ef1e88)
  • Uncategorized
    • Release gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 (4fe330e)
    • Release gix-attributes v0.22.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-config-value v0.14.8, gix-tempfile v14.0.2, gix-ref v0.46.0, gix-sec v0.10.8, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-pathspec v0.7.7, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 (f2b522d)
    • Release gix-glob v0.16.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-config-value v0.14.8, gix-tempfile v14.0.2, gix-ref v0.46.0, gix-sec v0.10.8, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-pathspec v0.7.7, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 (a65a17f)
    • Release gix-date v0.9.0, gix-actor v0.31.6, gix-validate v0.9.0, gix-object v0.43.0, gix-path v0.10.10, gix-attributes v0.22.4, gix-command v0.3.9, gix-packetline-blocking v0.17.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-ref v0.46.0, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0, safety bump 25 crates (d19af16)
    • Prepare changelogs prior to release (0f25841)
    • Merge branch 'improvements' (9ed2b24)
    • Similarity detection (6990afd)
    • Fix similarity detection (f8c5d9c)
    • Better peeling performance for reference traversal. (ba72ee0)
    • Merge branch 'improvements' (242fedc)
    • Use improved gix-diff API for better buffer handling (f944e49)
    • Add objects::tree::diff::Platform::stats() to quickly obtain diff-stats. (e079250)
    • Allow threaded-handling of tree-diff changes. (b291de0)
    • Add Reference::follow_to_object() (d986b2b)
    • Add Repository::diff_resource_cache_for_tree_diff() (6c6f946)
    • Add Reference::peel_to_kind() (cdaba84)
    • Adapt to changes in gix-ref (d296ee8)
    • Adapt to changes in gix-ref (5464bfb)
    • Add Repository::find_*() methods for every object type. (98bcb14)
    • Add Repository::compute_object_cache_size_for_tree_diffs(). (63c7a03)
    • Make tree-diff more easily discoverable when coming from git2 (26748dd)
    • Merge pull request #​1529 from Byron/better-copy-detection (7b7902e)
    • Remove #[momo] directive as it seems to prevent auto-completion in IDEs. (3a339da)
    • Merge pull request #​1521 from mvlabat/fix-dir-filename-tracking (12251eb)
    • Fix dir name tracking in the FileName mode (63936e5)
    • Merge branch 'fix-panic' (0b28297)
    • Prevent panic in Repository::rev_parse_single() when HEAD was invalid. (e74095e)
    • Merge branch 'improvements' (7dff447)
    • remote::Name::to_owned() to get a static version of it. (8a27454)
    • Merge branch 'improvements' (29898e3)
    • Reference::remote_name() now also provides valid remote names for local tracking branches. (6ac2867)
    • Add Reference::peel_to_id_in_place_packed() to allow passing a packed-buffer snapshot. (c612440)
    • Do not automatically use a parallel directory walk. (6f2eb91)
    • Add remote::Names as shortcut to the value returned for all remote names. (7c8f409)
    • Merge branch 'ag/jiff' (5871fb1)
    • Assure the next release is breaking (9fd1090)
    • Release gix-credentials v0.24.4 (f6a4eb9)
    • Merge branch 'fix-clean' (33eacfb)
    • Adapt to changes in gix-dir (37c2852)

v0.65.0: gix v0.65.0

Compare Source

New Features
  • add objects::tree::diff::Platform::stats() to quickly obtain diff-stats.
    This function is inspired by git2 which also makes it very simple to obtain.
  • allow threaded-handling of tree-diff changes.
    This works by providing Change::detach() and ChangeDetached::attach().
  • add Reference::follow_to_object()
    It's an equivalent to git2::Reference::resolve().`
  • add Repository::diff_resource_cache_for_tree_diff()
  • add Reference::peel_to_kind()
    Make it easy to follow a ref and peel it to a given object type.
    Additional peel_to_<kind>() shortcuts are also provided, with
    the same name as in git2.
  • add Repository::find_*() methods for every object type.
  • add Repository::compute_object_cache_size_for_tree_diffs().
    With it it's easier to obtain reasonable object cache sizes as optimized
    for tree-diffs.
  • remote::Name::to_owned() to get a static version of it.
    Also, add optional serde support.
  • Reference::remote_name() now also provides valid remote names for local tracking branches.
  • add Reference::peel_to_id_in_place_packed() to allow passing a packed-buffer snapshot.
    This is useful for speeding up reference lookups as otherwise, it will have to validate the packed-buffer
    snapshot didn't change internally each time a ref is peeled.
  • add remote::Names as shortcut to the value returned for all remote names.
Bug Fixes
  • similarity detection
    Previously it would incorrectly count only the last batch of removed bytes, and now it will count all of them. This leads to realistic results with complex diffs, even though it's probably still not en-par with Git which uses more complex heuristics.

  • prevent panic in Repository::rev_parse_single() when HEAD was invalid.
    When using a refspec like HEAD:file.

  • do not automatically use a parallel directory walk.
    This reduces dependencies and can speed-up typical ref-walks as these
    don't benefit from this many threads - the overhead here usually outweighs
    the benefit.

    This can be turned back on based on the expected workload.

Other
  • make tree-diff more easily discoverable when coming from git2
Bug Fixes (BREAKING)
  • better peeling performance for reference traversal.
    This is done by keeping a packed-buffer around and reusing it, instead
    of re-checking it every time.

    For this to work, the peeled() function on the reference::Iter can now fail
    as it has to open a packed-refs snapshot.

Commit Statistics
  • 41 commits contributed to the release over the course of 28 calendar days.
  • 29 days passed between releases.
  • 16 commits were understood as conventional.
  • 2 unique issues were worked on: #​1508, #​1524
Commit Details
view details
  • #​1508
    • Reproduce panic when parsing refspecs (17bd32a)
  • #​1524
    • Add a real-world test to reproduce an issue discovered in jj (7ef1e88)
  • Uncategorized
    • Release gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 (4fe330e)
    • Release gix-attributes v0.22.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-config-value v0.14.8, gix-tempfile v14.0.2, gix-ref v0.46.0, gix-sec v0.10.8, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-pathspec v0.7.7, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 (f2b522d)
    • Release gix-glob v0.16.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-config-value v0.14.8, gix-tempfile v14.0.2, gix-ref v0.46.0, gix-sec v0.10.8, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-pathspec v0.7.7, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0 (a65a17f)
    • Release gix-date v0.9.0, gix-actor v0.31.6, gix-validate v0.9.0, gix-object v0.43.0, gix-path v0.10.10, gix-attributes v0.22.4, gix-command v0.3.9, gix-packetline-blocking v0.17.5, gix-filter v0.12.0, gix-fs v0.11.3, gix-revwalk v0.14.0, gix-traverse v0.40.0, gix-worktree-stream v0.14.0, gix-archive v0.14.0, gix-ref v0.46.0, gix-config v0.39.0, gix-prompt v0.8.7, gix-url v0.27.5, gix-credentials v0.24.5, gix-ignore v0.11.4, gix-index v0.34.0, gix-worktree v0.35.0, gix-diff v0.45.0, gix-discover v0.34.0, gix-dir v0.7.0, gix-mailmap v0.23.6, gix-negotiate v0.14.0, gix-pack v0.52.0, gix-odb v0.62.0, gix-packetline v0.17.6, gix-transport v0.42.3, gix-protocol v0.45.3, gix-revision v0.28.0, gix-refspec v0.24.0, gix-status v0.12.0, gix-submodule v0.13.0, gix-worktree-state v0.12.0, gix v0.65.0, gix-fsck v0.5.0, gitoxide-core v0.40.0, gitoxide v0.38.0, safety bump 25 crates (d19af16)
    • Prepare changelogs prior to release (0f25841)
    • Merge branch 'improvements' (9ed2b24)
    • Similarity detection (6990afd)
    • Fix similarity detection (f8c5d9c)
    • Better peeling performance for reference traversal. (ba72ee0)
    • Merge branch 'improvements' (242fedc)
    • Use improved gix-diff API for better buffer handling (f944e49)
    • Add objects::tree::diff::Platform::stats() to quickly obtain diff-stats. (e079250)
    • Allow threaded-handling of tree-diff changes. (b291de0)
    • Add Reference::follow_to_object() (d986b2b)
    • Add Repository::diff_resource_cache_for_tree_diff() (6c6f946)
    • Add Reference::peel_to_kind() (cdaba84)
    • Adapt to changes in gix-ref (d296ee8)
    • Adapt to changes in gix-ref (5464bfb)
    • Add Repository::find_*() methods for every object type. (98bcb14)
    • Add Repository::compute_object_cache_size_for_tree_diffs(). (63c7a03)
    • Make tree-diff more easily discoverable when coming from git2 (26748dd)
    • Merge pull request #​1529 from Byron/better-copy-detection (7b7902e)
    • Remove #[momo] directive as it seems to prevent auto-completion in IDEs. (3a339da)
    • Merge pull request #​1521 from mvlabat/fix-dir-filename-tracking (12251eb)
    • Fix dir name tracking in the FileName mode (63936e5)
    • Merge branch 'fix-panic' (0b28297)
    • Prevent panic in Repository::rev_parse_single() when HEAD was invalid. (e74095e)
    • Merge branch 'improvements' (7dff447)
    • remote::Name::to_owned() to get a static version of it. (8a27454)
    • Merge branch 'improvements' (29898e3)
    • Reference::remote_name() now also provides valid remote names for local tracking branches. (6ac2867)
    • Add Reference::peel_to_id_in_place_packed() to allow passing a packed-buffer snapshot. (c612440)
    • Do not automatically use a parallel directory walk. (6f2eb91)
    • Add remote::Names as shortcut to the value returned for all remote names. (7c8f409)
    • Merge branch 'ag/jiff' (5871fb1)
    • Assure the next release is breaking (9fd1090)
    • Release gix-credentials v0.24.4 (f6a4eb9)
    • Merge branch 'fix-clean' (33eacfb)
    • Adapt to changes in gix-dir (37c2852)

Configuration

📅 Schedule: Branch creation - "before 5am on the first day of the month" (UTC), 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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@rustbot
Copy link
Collaborator

rustbot commented Sep 1, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @epage (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 1, 2024
@epage
Copy link
Contributor

epage commented Sep 3, 2024

do not automatically use a parallel directory walk.
This reduces dependencies and can speed-up typical ref-walks as these
don't benefit from this many threads - the overhead here usually outweighs
the benefit.

This can be turned back on based on the expected workload.

@Byron any thoughts on whether we should turn this on?

@epage
Copy link
Contributor

epage commented Sep 3, 2024

Ah 0.65 was yanked. That is why the two changlogs look the same.

@epage
Copy link
Contributor

epage commented Sep 3, 2024

@Byron FYI the changelog is missing a breaking change

error[E0432]: unresolved import `gix_features::progress::prodash::tree`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-0.66.0/src/progress.rs:2:9
   |
2  | pub use gix_features::progress::prodash::tree;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `tree` in the root
   |
note: found an item that was configured out
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prodash-28.0.0/src/lib.rs:42:9
   |
42 | pub mod tree;
   |         ^^^^
   = note: the item is gated behind the `progress-tree` feature
help: consider importing one of these items instead
   |
2  | pub use ::prodash::tree;
   |         ~~~~~~~~~~~~~~~
2  | pub use crate::config::tree;
   |         ~~~~~~~~~~~~~~~~~~~
2  | pub use crate::diff::tree;
   |         ~~~~~~~~~~~~~~~~~
2  | pub use crate::index::extension::tree;
   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     and 7 other candidates

@Byron
Copy link
Member

Byron commented Sep 4, 2024

@Byron any thoughts on whether we should turn this on?

I would not, and don't think any traversal is currently used in Cargo. What seems like a traversal, the directory listing, uses it's own single-threaded implementation.

@Byron FYI the changelog is missing a breaking change

error[E0432]: unresolved import `gix_features::progress::prodash::tree`
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/gix-0.66.0/src/progress.rs:2:9
   |
2  | pub use gix_features::progress::prodash::tree;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `tree` in the root
   |
note: found an item that was configured out
  --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prodash-28.0.0/src/lib.rs:42:9
   |
42 | pub mod tree;
   |         ^^^^
   = note: the item is gated behind the `progress-tree` feature
help: consider importing one of these items instead
   |
2  | pub use ::prodash::tree;
   |         ~~~~~~~~~~~~~~~
2  | pub use crate::config::tree;
   |         ~~~~~~~~~~~~~~~~~~~
2  | pub use crate::diff::tree;
   |         ~~~~~~~~~~~~~~~~~
2  | pub use crate::index::extension::tree;
   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     and 7 other candidates

This is known and the reason for anyone using the progress feature not being able to use gix v0.66. I left it up after a botched 0.65 release as this one at least works for many.
The reason for the issue was the usage of workspace dependencies - prodash was one of them and I upgraded a major version through that. However, that also means that I didn't indicate to the release-system that any of the users of that dependency changed, which led to gix-features not being marked for publishing. That's why there is a drift now.
Since then I have fixed this and the next release will not have that issue, it's planned for around the 22nd of September.

My recommendation is to skip this upgrade.

@epage epage closed this Sep 4, 2024
Copy link
Contributor Author

renovate bot commented Sep 4, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (0.66.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/gix-0.x branch September 4, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants