Closed stoyicker closed 7 years ago
Hi, interesting case.
It should not affect proguard as most of the generated code is used directly (without reflection). However as I can see maybe there is some interesting combination of Kotlin, proguard, generated code.
I didn't heavily test Reductor on how it works with Kotlin yet, but probably I should.
Can you create a minimal project to reproduce this issue?
Unfortunately I have this setup at work and can't share the source, but I will create an mwe as soon as I have time home.
Thanks, that would be great! I will try to reproduce it by myself.
Thank you! I'll check the issue soon.
On Thu, 1 Dec 2016, 09:11 Jorge Antonio Díaz-Benito Soriano, < notifications@github.com> wrote:
https://github.com/stoyicker/reductor-issue-16-mwe
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Yarikx/reductor/issues/16#issuecomment-264119739, or mute the thread https://github.com/notifications/unsubscribe-auth/AALPt4czm1x5nke_6-ecNdOUOSaCNAYRks5rDo9VgaJpZM4LAFqH .
Ok, Now I see what the issue is about.
The problem is that you defined the class AppStateReducer
which is also generated.
As you annotated your state with @CombinedState
that means that reductor will generate reducer that delegates actions to sub reducers.
And as I can see you are doing this manually in AppStateReducer
So in your case, you can either
AppStateReducer
, as generated one doing exactly the same.@CombinedState
from AppState
, so you will not generated reducer for this class.That makes a lot of sense, thanks.
With ProGuard enabled, I get this error:
Warning: MyAppStateReducer$Builder: can't find referenced method 'MyAppStateReducer(com.yheriatovych.reductor.Reducer,MyAppStateReducer$1)' in program class MyAppStateReducer
which I find interesting because my code for MyAppStateReducer is just a dummy and it does not have a sub-class nor a constructor taking two parameters:
It compiles without ProGuard though which I don't undestand because although a Builder class is created, there is still no two-parameter constructor.