Add Proguard rule to prevent stripping of org.mozilla.gecko.util.DebugConfig
Categories
(GeckoView :: General, enhancement, P1)
Tracking
(firefox68 wontfix, firefox69 wontfix, firefox70 fixed)
People
(Reporter: csadilek, Assigned: agi)
References
Details
Attachments
(1 file)
We had to add a Proguard rule to Fenix to prevent stripping of DebugConfig's fields. It would be ideal if applications could just inherit this rule from GeckoView.
We ran into this when testing Fenix with the latest Raptor, which writes a *-config.yml file to specify Gecko runtime settings such as the profile dir. DebugConfig
isn't a standard POJO and its fields are not accessible from the outside. While it would be possible to refactor DebugConfig
so its fields don't get optimized way, the current solution seems better and adding an exlusion rule is preferable.
Assignee | ||
Comment 1•5 years ago
•
|
||
Anything in org.mozilla.gecko.*
is private to GeckoView, will be hidden soon and should not be relied upon, so please don't use it.
Why is it a problem that the DebugConfig
class is optimized away?
Reporter | ||
Comment 2•5 years ago
|
||
:agi Fenix and Android Components are not referencing or relying on this type, but Raptor now writes a *-config.yml file to specify Gecko runtime arguments for performance testing. The .yaml is deserialized into a DebugConfig
instance which fails if the type (or its fields) are pruned.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1533385 and https://bugzilla.mozilla.org/show_bug.cgi?id=1552519 for the background on this.
Assignee | ||
Comment 3•5 years ago
|
||
ooh I see. So it's yaml
using reflection or something similar to create the object and ProGuard is not smart enough to know about that. Sounds important.
Assignee | ||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Assigning to Agi because he posted a fix.
69=affected because we'll presumably want to uplift this fix to GV 69 Beta for Fenix testing.
Assignee | ||
Comment 6•5 years ago
|
||
Actually I don't think we need to uplift this one as Fenix has a solid workaround (they added the rule to their proguard file).
Updated•5 years ago
|
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/224e533c8f87 Add @ReflectionTarget to DebugConfig. r=csadilek,nalexander
Comment 8•5 years ago
|
||
bugherder |
Description
•