android-client-sdk icon indicating copy to clipboard operation
android-client-sdk copied to clipboard

LDClient#*VariationDetail returns null EvaluationReason with r8 enabled

Open tevjef opened this issue 1 year ago • 4 comments

Describe the bug LDClient#*VariationDetail returns null EvaluationReason with r8 enabled

Expected behavior I expect the EvaluationReason to never be null on both debug and release builds of our app.

Logs

Logging the detail and reason on release builds shows the value is null.

image

SDK version 5.3.0

Language version, developer tools

AGP 8.4.x with r8 full mode is enabled.

tevjef avatar Jun 28 '24 15:06 tevjef

HI @tevjef, thank you for reporting this. I believe this issue that is open is a semi-match and the workaround in it could potentially work for you. We have also filed an issue internally for R8 and will get to it when priorities allow. Please let me know if the workaround in that other issue works for you.

tanderson-ld avatar Jun 28 '24 17:06 tanderson-ld

@tanderson-ld Hey, adding those rule does not work for me. I see those rules are already part of the consumer-proguard rules.

tevjef avatar Jul 02 '24 18:07 tevjef

Are you able to experiment with excluding all LaunchDarkly classes?

I have also linked this issue to our internally tracked R8 Ticket, 199469

tanderson-ld avatar Jul 08 '24 14:07 tanderson-ld

Maybe stating the obvious here, but as this SDK already has consumer keep rules, they might just have a missing some rule. One thing I noticed was that these rules also have Gson rules included. However, with the release of Gson 2.11.0 I think they can be removed.

sgjesse avatar Sep 04 '24 06:09 sgjesse