facebook / litho

A declarative framework for building efficient UIs on Android.
https://fblitho.com
Apache License 2.0
7.69k stars 763 forks source link

[Gradle Increment annotation] Warning for test components. #655

Open karandeep-swiggy opened 4 years ago

karandeep-swiggy commented 4 years ago

Hi, I am on the latest version of litho. Previously we use to get warnings for multiple litho annotations but now we are getting for only one. [WARN] Incremental annotation processing requested, but support is disabled because the following processors are not incremental: com.facebook.litho.specmodels.processor.testing.ComponentsTestingProcessor (NON_INCREMENTAL). Can someone from the team look into this. is this a false warning?

muraziz commented 4 years ago

@colriot does this sound related to recent robo v4 migration?

karandeep-swiggy commented 4 years ago

related: https://github.com/facebook/litho/pull/483

colriot commented 4 years ago

@muraziz nope. Migration will be reflected in the new release. @karandeep-swiggy not sure what other warnings you were getting before, but getting "only one" seems better to me than "multiple" :) Briefly speaking, ComponentsTestingProcessor does not support incremental annotation processing and warning is correct. If you'll look at #483, you'll see that only production processors were changed to support incremental AP, but not testing processors. We would gladly accept a PR on that, if you want, but I'm not sure if this warning actually should affect you as it's only for tests using @TestSpecs

pavlospt commented 4 years ago

@colriot TestingProcessors were explicitly left out of IAP support. I can add support for the rest but I am not sure if this is needed. Also I am not sure why the OP is getting a warning about a *TestingProcessor in the first place 😛 !

@karandeep-swiggy a small repro project would be nice, in order to better check this issue!

karandeep-swiggy commented 4 years ago

@pavlospt I'll try to create a project and put the github link here. till then can we keep this issue open?

colriot commented 4 years ago

@pavlospt that was fast! 😆 I saw this warning sometimes too. But I don't think this should affect the compilation time. Although, I'm not sure about the compilation of tests – wdyt?

@karandeep-swiggy of course

pavlospt commented 4 years ago

@colriot I am generally against any kind of optimizations in test APs, unless it proves to be critical regarding compilation times and the cost of having false positives or weird errors when runnings tests, is bareable 😛

colriot commented 4 years ago

@pavlospt I totally agree with that! Heisenbugs due to the non-deterministic testing setup are the worst. But do we have an option to not show these warnings for specific APs?

pavlospt commented 4 years ago

@pavlospt I totally agree with that! Heisenbugs due to the non-deterministic testing setup are the worst. But do we have an option to not show these warnings for specific APs?

I am not aware of any way to disable such warnings 😞