Skip to content

crates-index-diff 0.11.2 had breaking changes #23

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

Closed
jonhoo opened this issue Sep 28, 2022 · 1 comment
Closed

crates-index-diff 0.11.2 had breaking changes #23

jonhoo opened this issue Sep 28, 2022 · 1 comment

Comments

@jonhoo
Copy link

jonhoo commented Sep 28, 2022

crates-index-diff 0.11.2 bumped git-repository to major version 0.24, but since Index::repository returns git_repository::Repository, this change is backwards-incompatible.

In particular, I hit this in a crate with:

[dependencies]
crates-index-diff = "0.11"
git-repository = "0.23"
fn count_versions(rep: &git_repository::Repository) { ... }
fn main() {
  let index = crates_index_diff::...;
  count_versions(index.repository());
}

which failed to build after running cargo update with:

error[E0308]: arguments to this function are incorrect
   --> src/incremental.rs:339:18
    |
339 |         exist += count_versions(index.repository(), &e)?;
    |                  ^^^^^^^^^^^^^^ ------------------  -- expected struct `git_repository::object::tree::EntryRef`, found struct `git_repository::object::tree::iter::EntryRef`
    |                                 |
    |                                 expected struct `git_repository::Repository`, found struct `git_repository::types::Repository`
    |
    = note: expected reference `&git_repository::Repository`
               found reference `&git_repository::types::Repository`
    = note: perhaps two different versions of crate `git_repository` are being used?
    = note: expected reference `&git_repository::object::tree::EntryRef<'_, '_>`
               found reference `&git_repository::object::tree::iter::EntryRef<'_, '_>`
    = note: perhaps two different versions of crate `git_repository` are being used? 
@Byron
Copy link
Owner

Byron commented Sep 29, 2022

Thanks for letting me know!

I will try to be more careful with that. I got a bit over-reliant on cargo smart-release which takes care of version bumps, but only based on commit messages that do indicate something is breaking. Thus, when upgrading git-repository it was upon me to recognize this as breaking change, but that didn't happen.

In any case, v11.2 has been yanked and v12.0 as been released in its place.

@Byron Byron closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants