The generated enums used for events are removed by ProGuard and thus can't be used in introspection
Categories
(Toolkit :: Telemetry, defect, P3)
Tracking
()
People
(Reporter: mdroettboom, Assigned: mdroettboom)
Details
(Whiteboard: [telemetry:mobilesdk:m7])
Attachments
(2 files)
Fenix had breakage because the generated enums used by events were being removed from the app's apk by the proguard optimizer, and thus the introspection that is used in EventMetricType failed.
This PR to Fenix "fixed" the issue:
https://github.com/mozilla-mobile/fenix/pull/1521
At a minimum, we should document this proguard run requirement in glean's README.
It may also be possible to fix this at our end -- possibly by making sure those enums are "used" somewhere in the generated code (though possibly at the price of some additional build size).
Assignee | ||
Updated•6 years ago
|
Comment 1•6 years ago
|
||
(In reply to Michael Droettboom [:mdroettboom] from comment #0)
At a minimum, we should document this proguard run requirement in glean's README.
It may also be possible to fix this at our end -- possibly by making sure those enums are "used" somewhere in the generated code (though possibly at the price of some additional build size).
Good catch, this is interesting. So that's what ProGuard is for :D
I agree, at the very least we should document this in our README. I wonder if we could find a way to fix this on our end, though:
- maybe there's some annotation we could add in our generated code to prevent this?
- maybe we could change our implementation to work without reflection (if it's possible)?
Comment 2•6 years ago
|
||
(In reply to Alessio Placitelli [:Dexter] from comment #1)
I agree, at the very least we should document this in our README. I wonder if we could find a way to fix this on our end, though:
- maybe there's some annotation we could add in our generated code to prevent this?
- maybe we could change our implementation to work without reflection (if it's possible)?
Additionally:
- look if there's some way for us to export our own set of proguard rules, if the above fail.
Assignee | ||
Comment 3•6 years ago
|
||
Assignee | ||
Comment 4•6 years ago
|
||
:Dexter -- I agree these are all good ideas. I'm filing a PR just to add documentation for now. That can buy us time to investigate the other, better alternatives.
Assignee | ||
Comment 5•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Comment hidden (collapsed) |
Description
•