lipanski / mockito

HTTP mocking for Rust!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error on latest stable

clux opened this issue · comments

Pulled in 0.23.2 and getting this error on 1.41.0:

   Compiling mockito v0.23.2
error[E0603]: function `assert_json_no_panic` is private
   --> /home/clux/.cargo/registry/src/github.com-1ecc6299db9ec823/mockito-0.23.2/src/lib.rs:565:24
    |
565 | use assert_json_diff::{assert_json_no_panic, Mode};
    |                        ^^^^^^^^^^^^^^^^^^^^

error[E0603]: enum `Mode` is private
   --> /home/clux/.cargo/registry/src/github.com-1ecc6299db9ec823/mockito-0.23.2/src/lib.rs:565:46
    |
565 | use assert_json_diff::{assert_json_no_panic, Mode};
    |                                              ^^^^

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0603`.
error: could not compile `mockito`.

To learn more, run the command again with --verbose.

Seems to be caused by davidpdrsn/assert-json-diff#13

Thanks for opening the issue. #110 should fix this, hopefully once and for all.

I maintain assert-json-diff.

TLDR: mockito was using API hidden from the docs and I made a breaking change to that API. I have released a new version with public stable functionality that should be used instead.

I will submit a PR to mockito today that fixes it but for now you can pin to the previous version of assert-json-diff by putting assert-json-diff = “=1.0.2” in your Cargo.toml.

I wish the mockito maintainers would have made an issue about their need to call private API so this situation could have been avoided 😔

I know this kinda sucks for users but at least there is a workaround and a fix should ship soon.

PR with the fix #110

Released as 0.23.3

Thanks for being proactive about this @davidpdrsn 🍰