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

Help popular annotation processors adopt incremental processing #5277

Closed
oehme opened this issue May 5, 2018 · 70 comments
Closed

Help popular annotation processors adopt incremental processing #5277

oehme opened this issue May 5, 2018 · 70 comments

Comments

@oehme
Copy link
Contributor

@oehme oehme commented May 5, 2018

Please submit PRs to update the list of annotation processors that support incremental annotation processing:

https://github.com/gradle/gradle/blob/master/subprojects/docs/src/docs/userguide/java_plugin.adoc#state-of-support-in-popular-annotation-processors

@dimsuz
Copy link

@dimsuz dimsuz commented May 5, 2018

Toothpick: Open issue

@Javernaut
Copy link

@Javernaut Javernaut commented May 5, 2018

Realm: Open issue

@technoir42
Copy link

@technoir42 technoir42 commented May 7, 2018

Glide: Open issue

@simtel12
Copy link
Contributor

@simtel12 simtel12 commented May 8, 2018

In addition to Room's compiler, mentioned by @TWiStErRob, Lifecycle has a compiler too
https://developer.android.com/topic/libraries/architecture/lifecycle (android.arch.lifecycle:compiler)

LoganSquare: https://github.com/bluelinelabs/LoganSquare
AutoValue extensions: rharter/auto-value-gson#179, rharter/auto-value-parcel#131

@masc3d
Copy link

@masc3d masc3d commented May 11, 2018

Requery: Open issue
Parceler: Open issue

@tprochazka
Copy link

@tprochazka tprochazka commented May 12, 2018

Butterknife is already implemented but we need some feedback for the implementation ;-)

@tprochazka
Copy link

@tprochazka tprochazka commented May 15, 2018

evernote/android-state#48 is missing on your list

@cckroets
Copy link

@cckroets cckroets commented May 30, 2018

GreenRobot's EventBus: Open issue

@pjakubczyk
Copy link

@pjakubczyk pjakubczyk commented Jun 5, 2018

@oehme Re Glide:
Linked ticked is Closed
please use bumptech/glide#2983

@ngattusohw
Copy link

@ngattusohw ngattusohw commented Jun 13, 2018

@oehme Hi -- I am currently having this issue where I want to enabling compile avoidance for my project, but I am using the gradle hibernate ORM plugin with annotations, and it recompiles my entire project everytime (takes 15+ minutes to build) .. wondering if anyone could help me out. I am unsure if the hibernate ORM plugin supports compile avoidance or not, as I couldn't find it in their documentation
found here ... http://docs.jboss.org/hibernate/orm/5.1/userguide/html_single/Hibernate_User_Guide.html#BytecodeEnhancement-enhancement-gradle

Thanks!

@jjlueck-tock
Copy link

@jjlueck-tock jjlueck-tock commented Jun 13, 2018

I am also interested in where Hibernate is with moving over to an annotation processor jar that will inform the gradle incremental compilation process. I haven't found them on any list of projects that are in the works for patching.

Think they'll accept a community-driven PR over at https://github.com/hibernate/hibernate-orm/pulls
?

@oehme
Copy link
Contributor Author

@oehme oehme commented Jun 13, 2018

@jjlueck-tock @ngattusohw As far as I can see, Hibernate doesn't do annotation processing, but post-processes the classes after compilation. I don't know why that would cause compilation to rerun. A reproducible example project would probably help them. How about you open an issue for them and ask them to improve the situation?

A terminology sidenote: Compile avoidance is a different feature from incremental compilation. Compile avoidance is always on and means that only API changes will lead to recompilation of downstream projects.

@tprochazka
Copy link

@tprochazka tprochazka commented Jun 18, 2018

I asked Google team about DataBinding support
https://issuetracker.google.com/issues/110061530
Sadly it is planned for 3.3

@masc3d
Copy link

@masc3d masc3d commented Jun 18, 2018

@tprochazka it can be mitigated by using instant run, except if you <include> more than one databinding layout, then it's triggering https://issuetracker.google.com/issues/79362720

@ngattusohw
Copy link

@ngattusohw ngattusohw commented Jun 18, 2018

I just noticed this in my build.gradle output... "All input files are considered out-of-date for incremental task ':Web:compileJava'." .. where my build.gradle compileJava looks like this
compileJava {
doFirst {
apply plugin: 'org.hibernate.orm'

	hibernate {
		enhance {
			enableLazyInitialization= true
			enableDirtyTracking = true
			enableAssociationManagement = true
		}
	}
}

}

@oehme Any direction appreciated, thanks

@oehme
Copy link
Contributor Author

@oehme oehme commented Jun 18, 2018

As mentioned before, this is not annotation processing related. Hibernate uses bytecode enhancement. Please file a bug for their plugin.

@ngattusohw
Copy link

@ngattusohw ngattusohw commented Jun 18, 2018

@oehme okay thank you. Sorry for bothering and thank you for your responsiveness!

@jnehlmeier
Copy link

@jnehlmeier jnehlmeier commented Jun 25, 2018

EclipseLink: Open Issue

@khaidinh
Copy link

@khaidinh khaidinh commented Jul 1, 2018

@farrault
Copy link

@farrault farrault commented Jul 12, 2018

Hi @oehme,
FYI : Lombok 1.16.22 and 1.8.0 fail with Gradle 4.8 in incremental mode : see projectlombok/lombok#1716

It seems to be corrected but not released yet.

@oehme
Copy link
Contributor Author

@oehme oehme commented Jul 12, 2018

I see, they were a little too closely coupled to the Filer class hierarchy. The change looks good, much more robust. I pinged them for a release.

@oehme
Copy link
Contributor Author

@oehme oehme commented Jul 12, 2018

@khaidinh Can you please open an issue for immutables that I can reference here?

@betorcs
Copy link

@betorcs betorcs commented Jul 16, 2018

PermissionsDispatcher: Open issue

@harliedharma
Copy link

@harliedharma harliedharma commented Jan 29, 2019

Litho: Open issue

@dlemures dlemures mentioned this issue Jan 31, 2019
23 of 23 tasks complete
@IvanShafran
Copy link

@IvanShafran IvanShafran commented Feb 1, 2019

Moxy: Open issue

@stephanenicolas
Copy link

@stephanenicolas stephanenicolas commented Feb 1, 2019

@oehme we're glad to announce that ToothPick 2 is released with incap support !
stephanenicolas/toothpick#320

@stephanenicolas
Copy link

@stephanenicolas stephanenicolas commented Feb 5, 2019

@oehme the butterknife PR will probably never get merged. The main author is not very supportive of the idea. So, we had to fork it to enable incremental annotation processing.

We're happy to release butterfork : https://github.com/stephanenicolas/butterknife
Hopefully we can maintain the fork working as new versions of butterknife are released.

@hungvietnguyen
Copy link

@hungvietnguyen hungvietnguyen commented Feb 6, 2019

@oehme Could you add Auto Service to the list of supported incremental APs (google/auto#667)? And update the status of Data Binding also (https://issuetracker.google.com/110061530#comment28)? :) Thanks!

@hungvietnguyen
Copy link

@hungvietnguyen hungvietnguyen commented Feb 14, 2019

@oehme Looks like Glide has just become incremental too: bumptech/glide#2983

@oehme
Copy link
Contributor Author

@oehme oehme commented Feb 14, 2019

Let me know when there is a release, so I can link that above :)

@tprochazka
Copy link

@tprochazka tprochazka commented Feb 15, 2019

Databinding has already a version with experimental support of the incremental compilation
https://issuetracker.google.com/issues/110061530#comment28

@oehme
Copy link
Contributor Author

@oehme oehme commented Feb 15, 2019

Databinding is already checked off above.

@tprochazka
Copy link

@tprochazka tprochazka commented Feb 15, 2019

Do you have anybody some new information about Room incremental support? It is still valid this ' Unlikely to be incremental in its default mode, as it generates files using java.io'? And it is an explanation from somebody from google team? There is no public issue for it?

@technoir42
Copy link

@technoir42 technoir42 commented Feb 15, 2019

Glide 4.9.0 was released with support for incremental AP https://github.com/bumptech/glide/releases/tag/v4.9.0

@autonomousapps
Copy link
Contributor

@autonomousapps autonomousapps commented Mar 20, 2019

Kotlin 1.3.30 will support incremental annotation processing with kapt! https://youtrack.jetbrains.com/issue/KT-23880

It requires opting in with kapt.incremental.apt=true in gradle.properties.

@kakai248
Copy link

@kakai248 kakai248 commented Mar 21, 2019

Epoxy: Open issue

@hungvietnguyen
Copy link

@hungvietnguyen hungvietnguyen commented Mar 22, 2019

@oehme, @big-guy: We are working on making Room and Lifecycle incremental. Could you please update the list above and the user guide with links to track this work:

@big-guy big-guy added this to the 5.4 RC1 milestone Mar 22, 2019
@big-guy
Copy link
Member

@big-guy big-guy commented Mar 22, 2019

We've moved the table of annotation processors that support incremental annotation processing to our user manual. This'll show up in 5.4 or you can check a nightly.

If you have an update about an annotation processor and want it included in our docs, please submit a PR to update the table found here:
https://github.com/gradle/gradle/blob/master/subprojects/docs/src/docs/userguide/java_plugin.adoc#state-of-support-in-popular-annotation-processors

Please take a look at our contribution guidelines.

Thanks!

@big-guy big-guy closed this Mar 22, 2019
@isker
Copy link
Contributor

@isker isker commented Apr 10, 2019

@big-guy some of the links in that table 404. For example: https://developer.android.com/topic/libraries/architecture/room)

@big-guy
Copy link
Member

@big-guy big-guy commented Apr 10, 2019

Thanks @isker - I've fixed it for the next nightly build

@markchristopherng
Copy link

@markchristopherng markchristopherng commented Jun 30, 2019

@oehme

Hi Stephen, the engineers at airBnb don't use gradle and they have mentioned this is not a priority for them however they have 2 very popular android frameworks that don't support incremental annotation processing. Judging by the comment in epoxy issue its sounds like epoxy could involve a bit of work to support incremental annotation processing however on the other hand the airbnb engineer also mentions that deeplinkDispatch framework might not need any code changes at all. Are you are able to look at the deeplinkDispatch framework and possibly do a PR if it is a very easy fix.

airbnb deeplinkDispatch - airbnb/DeepLinkDispatch#247
airbnb epoxy - airbnb/epoxy#423

@oehme
Copy link
Contributor Author

@oehme oehme commented Jul 1, 2019

Sorry, I won't have time to look into that. Maybe someone else following this thread would be interested in doing so.

@graemerocher
Copy link

@graemerocher graemerocher commented Sep 3, 2019

@oehme I have started a PR for Micronaut with some changes to support this micronaut-projects/micronaut-core#2071

However I could do with some help to verify the correctness of this change and how it relates to what Micronaut does.

@simtel12
Copy link
Contributor

@simtel12 simtel12 commented Sep 11, 2019

@oehme Just FYI, it looks like Room has added support in version 2.2.0 - hidden behind a flag. The issuetracker ticket has more info.

Room 2.2.0 will be an incremental annotation processing when enabled via the option 'room.incremental = true'

Similar with Lifecycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet