litho icon indicating copy to clipboard operation
litho copied to clipboard

[Gradle Increment annotation] Warning for test components.

Open karandeep-swiggy opened this issue 4 years ago • 9 comments

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?

karandeep-swiggy avatar Apr 30 '20 08:04 karandeep-swiggy

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

muraziz avatar Apr 30 '20 09:04 muraziz

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

karandeep-swiggy avatar Apr 30 '20 09:04 karandeep-swiggy

@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

colriot avatar Apr 30 '20 09:04 colriot

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

pavlospt avatar Apr 30 '20 09:04 pavlospt

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

karandeep-swiggy avatar Apr 30 '20 09:04 karandeep-swiggy

@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

colriot avatar Apr 30 '20 09:04 colriot

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

pavlospt avatar Apr 30 '20 10:04 pavlospt

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

colriot avatar Apr 30 '20 10:04 colriot

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

pavlospt avatar Apr 30 '20 11:04 pavlospt