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

Bump mockall from 0.8.3 to 0.10.2 #956

Merged
merged 3 commits into from
Sep 16, 2021
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 15, 2021

Bumps mockall from 0.8.3 to 0.10.2.

Changelog

Sourced from mockall's changelog.

[ 0.10.2 ] - 2021-07-12

Fixed

  • Fix mocking specializing methods of non-generic structs, a regression in v0.10.0. (#309)

  • Fix mocking generic methods of generic structs returning nonstatic, a regression in v0.10.0. (#312)

[ 0.10.1 ] - 2021-07-01

Fixed

  • Fix mocking trait methods whose return values have lifetime parameters, a regression in v0.10.0. (#304)

[ 0.10.0 ] - 2021-06-27

Added

  • mock! will now allow both methods and trait impls to be gated with #[cfg()]] attributes. The attributes will be forwarded to all generated code. This allows for example only mocking certain traits on certain OSes. (#297)

  • automock will now automatically generate Debug implementations for traits and structs. mock! will to, if you put #[derive(Debug)] above the struct's name. (#289)

  • Added support for specific impls. A specific impl is an implementation of a trait on a generic struct with specified generic parameters. For example, impl Foo for Bar<i32> as opposed to impl<T> Foo for Bar<T>. Mockall does not yet support generic methods in such traits. (#274)

Changed

  • Mockall is pickier now about how you mock a trait on a generic struct. Previously you could usually omit the generics. Now, they're required. i.e.,
    mock!{
        MyStruct<T: Bounds> {...}
        impl Foo for MyStruct {...}

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [mockall](https://github.com/asomers/mockall) from 0.8.3 to 0.10.2.
- [Release notes](https://github.com/asomers/mockall/releases)
- [Changelog](https://github.com/asomers/mockall/blob/master/CHANGELOG.md)
- [Commits](https://github.com/asomers/mockall/commits/v0.10.2)

---
updated-dependencies:
- dependency-name: mockall
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Sep 15, 2021
@jcape
Copy link
Contributor

jcape commented Sep 15, 2021

This will need code changes to the mock! macro invocation before it can be merged, will take a crack at that in an independent PR.

@jcape jcape added this to In progress in Consensus via automation Sep 15, 2021
@jcape jcape self-assigned this Sep 15, 2021
@jcape jcape requested review from a team September 16, 2021 17:16
@@ -23,7 +23,7 @@ use mockall::*;

mock! {
pub ConsensusEnclave {} // This is used to generate a MockConsensusEnclave struct.
trait ConsensusEnclave {
impl ConsensusEnclave for ConsensusEnclave {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

impl X for X feels weird, but if it works I'm not gonna complain.

Copy link
Contributor

@jcape jcape Sep 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, totally with you on that one. They're silently adding a "Mock" prefix to everything, so if you want a MockConsensusEnclave to implement the ConsensusEnclave trait, this is how you have to do it.

Consensus automation moved this from In progress to Reviewer approved Sep 16, 2021
@jcape jcape merged commit 72d1450 into master Sep 16, 2021
@jcape jcape deleted the dependabot/cargo/mockall-0.10.2 branch September 16, 2021 20:51
Consensus automation moved this from Reviewer approved to Done Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
No open projects
Consensus
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants