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
Assignees
Labels
a:chore Minor issue without significant impact in:jvm-ecosystem
Milestone

Comments

@oehme
Copy link
Contributor

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 commented May 5, 2018

Toothpick: Open issue

@Javernaut
Copy link

Realm: Open issue

@TWiStErRob
Copy link
Contributor

TWiStErRob commented May 6, 2018

https://github.com/johncarl81/parceler
https://github.com/Raizlabs/DBFlow
https://developer.android.com/topic/libraries/architecture/room

@technoir42
Copy link

Glide: Open issue

@simtel12
Copy link
Contributor

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 commented May 11, 2018

Requery: Open issue
Parceler: Open issue

@tprochazka
Copy link

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

@tprochazka
Copy link

tprochazka commented May 15, 2018

https://github.com/evernote/android-state/issues/48 is missing on your list

@cckroets
Copy link

GreenRobot's EventBus: Open issue

@pjakubczyk
Copy link

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

@ngattusohw
Copy link

@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

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 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

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

@masc3d
Copy link

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

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 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

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

@jnehlmeier
Copy link

EclipseLink: Open Issue

@khaidinh
Copy link

khaidinh commented Jul 1, 2018

Immutables: https://immutables.github.io

@farrault
Copy link

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 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 commented Jul 12, 2018

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

@betorcs
Copy link

betorcs commented Jul 16, 2018

PermissionsDispatcher: Open issue

@harliedharma
Copy link

Litho: Open issue

@IvanShafran
Copy link

Moxy: Open issue

@stephanenicolas
Copy link

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

@stephanenicolas
Copy link

@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

@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

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

@oehme
Copy link
Contributor Author

oehme commented Feb 14, 2019

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

@tprochazka
Copy link

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 commented Feb 15, 2019

Databinding is already checked off above.

@tprochazka
Copy link

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

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

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

Epoxy: Open issue

@hungvietnguyen
Copy link

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 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 as completed Mar 22, 2019
@isker
Copy link
Contributor

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 commented Apr 10, 2019

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

@markchristopherng
Copy link

@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 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

@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 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.

@ColtonIdle
Copy link
Contributor

ColtonIdle commented Nov 2, 2019

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

Updated url: https://docs.gradle.org/current/userguide/java_plugin.html#state_of_support_in_popular_annotation_processors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:chore Minor issue without significant impact in:jvm-ecosystem
Projects
None yet
Development

No branches or pull requests