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
Multi Database Modules works on 3.0.1 but not on 3.1.1 #979
Comments
Those are simply warning and will not cause your build to fail. Because of the way the Filer api works you can not overwrite a file that was generated in previous generation rounds. As such these classes that are deferred to the final round need to be aware of all models, converters etc are not generated until the final round of processing. The generated classes them selves do not have annotations that are inputs to other tools so it causes no issue. |
so what is the reason that compiler can't find the generated helper class when trying to build the project ? this is the exact error given in gradle:
this is what I'm trying to do and the compiler doesn't seem to be able to find FordGeneratedDatabaseHolder class; but i can see that the file is generated. i tested this on 2 different projects and the same thing happened but it works fine on version 3.0.1 I can't figure out what causes the problem build.gradle:
|
Any follow up on this ? |
have you tried 4.0.0-beta3? |
will reopen if issue still persists on that version. |
I'm running into this issue on 4.0.2. Using annotationProcessor instead of apt. Edit: should add that in addition to SomeNameGeneratedDatabaseHolder not importable, I'm also seeing the issue where only 1 database holder when multiple modules are specified. |
This issue exists for me.'
I was using 3.0.1, wanted to update to 4.0.3 (yes, really behind, I know!). I have two separate GenertedDatabaseHolders, both build fine on version 3.0.1 In order to find out which version update was causing the issue, I tried updating version one by one, towards 4.0.3 from builds 3.0.1. It started to fail building the second database holder on 3.1.1 and on all versions after. I shall try to revert and try using apt and upgrade to 4.0.3 and see if it works. UPDATE : |
I have the same issue. Module specific |
Went back to 3.0.1, gradle 2.2.1 and apt since I need multiple modules. Still can't get multiple generated database holders. @yeduRaghav or anyone else, do you have any sample code of it working? |
@jackwang1 is your configuration something similar the setup below? build.gradle (Module 1)
build.gradle (Module 2)
then wherever you are initializing your DBflow from
The setup on the project I'm working on it's similar the setup above and it's working fine with Apt and Dbflow 3.0.1. |
I have the following structure: Root build.gradle - what you have in app One requirement I have is app has module as dependency. Same problem I'm seeing with 4.0.3, which is database holder only generated for app, and not module. |
@jackwang1 are you building you FlowManager like below?
I have the same dependency requirement as you. |
Yes, though cannot add the second module since database holder for it is not generating. Oh, and my second module is a background service. |
the information in this issue thread is mostly un-actionable. When it comes to build failures like this your best bet would be to make a demo project that exhibits the issue. If it is a runtime issue fork and issue a pr with failing tests. |
Was finally able to get 3.0.1 working with multiple modules. Seems ordering of dependencies in build.gradle matters. @trevjonez Haven't looked at the unit tests, but here's a repo I quickly put together to show difference between 3.0.1 and 4.0.3. |
@jackwang1 I made a small change to the timing that the processor outputs files. It is beyond me why it was necessary but should resolve your problem (assuming it gets merged). Until then you can target my develop snapshots. this patch file can be applied to your example project to show you what all I changed. |
Thanks @trevjonez |
Thanks @trevjonez |
@andriipanasiuk @trevjonez @jackwang1 can anyone tell me how to use the |
the workaround that jackwang is using is to depend on a jitpack of my fork from the develop branch.
|
@yeduRaghav master branch of my example project is using develop-SNAPSHOT https://github.com/jackwang1/DBFlow-SQLCipher |
Thank you guys, one last question, so this is equivalent to the latest DBFlow version? |
as of about 8 days ago, yes. |
DBFlow Version: 3.1.1
Bug: Multi module no longer works
Description:
when using version 3.0.1 multi module works fine but when updated to version 3.1.1 i get this error and it can't find the generated database holder class (it exists in android studio i can open it but can't build the project)
The text was updated successfully, but these errors were encountered: