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

Code generator does not play nice with mockito #78

Open
NicolaVerbeeck opened this issue Dec 20, 2021 · 1 comment
Open

Code generator does not play nice with mockito #78

NicolaVerbeeck opened this issue Dec 20, 2021 · 1 comment
Labels
bug Something isn't working kiwi generator kiwi_generator package

Comments

@NicolaVerbeeck
Copy link

Consider the following code:

  @Register.singleton(DeepLinkViewModel, from: MockDeepLinkViewModel)
  void registerViewModelFactories();

In this case MockDeepLinkViewModel is generated by mockito using @GenerateMocks. This results in the following generated kiwi code:

   ..registerSingleton<DeepLinkViewModel>((c) => DeepLinkViewModel());
@vanlooverenkoen
Copy link
Collaborator

Thinking out loud. I think we need to configure the order in which build_runner should run. We had the same problem with moor

@vanlooverenkoen vanlooverenkoen added bug Something isn't working kiwi generator kiwi_generator package labels Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kiwi generator kiwi_generator package
Projects
None yet
Development

No branches or pull requests

2 participants