Repository navigation
ADFA-5500: Keep the app libraries the layout editor plugin still loses to R8 - #2094
Daniel-ADFA wants to merge 1 commit into
Conversation
…s to R8 The GlitchTip issue (CODEONTHEGO-F2, and F3/F4/G4/GQ with the same cause) is a layout editor view failing to inflate in release builds: NoSuchMethodException on NavigationRailView(Context, AttributeSet), then the "Missing required view" NPE from the plugin's view binding. Plugins load parent-first, so they get the app's shrunk copy of a library it shares with them. ADFA-5731 (#1830) fixed that class by keeping com.google.android.material whole; all 178 events come from releases built before it. The same failure is still on stage for other shared libraries. Checking layout-editor.cgp's references against the stage release dex, and against an unshrunk debug dex to rule out version skew, finds members R8 strips that the plugin reaches: - sora CodeEditor(Context, AttributeSet), inflated by the Show XML screen: the same inflation failure and NPE as this issue - CardView(Context) and ViewPager(Context), constructed by the CardView and ViewPager palette items: NoSuchMethodError - 14 sora members (Span.setExtra, Logger, ...) called by the plugin's bundled TextMate highlighter: NoSuchMethodError Keep io.github.rosemoe.sora, androidx.cardview and androidx.viewpager.widget whole, like the other shared libraries.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. 4 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 Summary
WalkthroughThe ProGuard configuration adds rules to keep all classes and members in the ChangesProGuard Configuration
Priority: ⬆️ High Estimated code review effort: 1 (Trivial) | ~3 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The host dex will retain the shared-library members needed by the layout editor plugin. No actionable merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
A rabbit checks the rules in place Comment |
ADFA-5500
The GlitchTip NPE is a layout editor view failing to inflate in release builds. R8 strips constructors the app never calls, and plugins load the app's shrunk copy of shared libraries. The reported cause,
NavigationRailView(Context, AttributeSet), was fixed by ADFA-5731 (#1830): all 178 events across F2/F3/F4/G4/GQ come from releases built before it.The same failure is still on stage for other libraries. Checking
layout-editor.cgp's references against the stage release dex finds R8-stripped members the plugin reaches. An unshrunk debug dex was used as a control to rule out version skew.CodeEditor(Context, AttributeSet): the Show XML screen fails to inflate, then the same NPE as this issueCardView(Context),ViewPager(Context): the CardView and ViewPager palette items throwNoSuchMethodErrorThis keeps
io.github.rosemoe.sora,androidx.cardviewandandroidx.viewpager.widgetwhole. After the change, all 17 of those members resolve, for +328 KiB of dex.Left alone: 115 more stripped members referenced only by the plugin's bundled copies of library classes (Glide, preference, transition, ...), none referenced directly by the plugin's own code or layouts. Also 31 version-skew members (newer activity/lifecycle/coroutines in the plugin than the app ships), which R8 doesn't cause.