Repository navigation
ADFA-5500: Keep the app libraries the layout editor plugin still loses to R8 - #2094
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.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title clearly identifies the issue and the primary change: keeping app libraries that the layout editor plugin loses to R8. |
| Description check | ✅ Passed | The description directly explains the R8 issue, affected libraries, observed failures, scope, and expected dex-size impact. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0… |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Autopilot is currently an internal CodeRabbit preview.
A rabbit checks the rules in place
Three packages keep their classes safe
No names are trimmed away
Their members stay in place
Then hops through fields of green today
Comment @coderabbitai help to get the list of available commands.
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.