You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fineract.apache.org by "Petri Tuomola (Jira)" <ji...@apache.org> on 2021/12/31 02:12:00 UTC

[jira] [Commented] (FINERACT-1198) Gradle incremental build is broken

    [ https://issues.apache.org/jira/browse/FINERACT-1198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467063#comment-17467063 ] 

Petri Tuomola commented on FINERACT-1198:
-----------------------------------------

[~aleks] [~vorburger] I think the biggest culprit for this is the OpenJPA bytecode enhancement. What seems to happen is:

 
1. Enhance takes the classes output from compileJava and changes them
2. Because of #1, next time when we run compileJava it sees its outputs have changed and goes for a full rebuild
3. Because of #2, enhance sees its inputs have changed and changes the classes again
Etc etc
 
My first thought was that if we could make OpenJPA plug-in support incremental builds, then perhaps that would help with this issue. But I've just tried it by adding the incremental build support to OpenJPA plug-in and unfortunately it did not help: even if only a handful of classes are modified, compileJava thinks it needs to do a full rebuild. I suppose that's because of the dependencies between classes (i.e. everything depends on the domain classes, so if they have changed then everything will get rebuilt). So that approach did not get us anywhere...
 
What I'd like to do now is to see what happens if we separate the OpenJPA enhanced domain classes to a separate Gradle project / JAR file? That way only that JAR file would get rebuilt every time after enhancement, not the whole Fineract. I know this is not the separation that would make most sense in terms of making the whole application modular. But if that allows majority (i.e. non-database changing) to be done as incremental builds, then that would be great! 
 
What I'm worried about is whether the domain classes can be segregated cleanly.... it might be that too much business logic has crept in here to make that possible. But I'll have a look. 

> Gradle incremental build is broken
> ----------------------------------
>
>                 Key: FINERACT-1198
>                 URL: https://issues.apache.org/jira/browse/FINERACT-1198
>             Project: Apache Fineract
>          Issue Type: Bug
>          Components: Build
>            Reporter: Michael Vorburger
>            Assignee: Petri Tuomola
>            Priority: Blocker
>
> One of the reasons why Gradle is (supposedly) so much cooler than e.g. Maven is that it can be really support and support very fast "incremental" builds (only rebuild what has changed).
> I have the impression that doesn't really work in Fineract, and suppose that's not really Gradle's (core) fault, but some plugin which screws this up? OpenJPA Enhancer, SpotBugs... presumably they all have to "play along" for this to work perfectly?
> My Gradle foo isn't (nearly) good enough to know if it would be possible to "fix" this, and how hard this may be, but filing an issue is perhaps a start for getting input from people more knowledgeable about this.
> [~aleks] and/or [~ptuomola] perhaps you have ideas about this.
> [~aalmiray] as per chat during ApacheCon, not sure if this is the kind of thing you may enjoy helping with?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)