launchdarkly / android-client-sdk

LaunchDarkly Client-side SDK for Android
Other
45 stars 23 forks source link

LDClient#*VariationDetail returns null EvaluationReason with r8 enabled #273

Open tevjef opened 3 months ago

tevjef commented 3 months ago

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.

tanderson-ld commented 3 months ago

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.

tevjef commented 3 months ago

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

tanderson-ld commented 2 months ago

Are you able to experiment with excluding all LaunchDarkly classes?

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

sgjesse commented 1 month ago

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.