"Don't run resource union in MiniAapt" #2086 appears to break resource merging
See original GitHub issuehttps://github.com/facebook/buck/pull/2086 appears to have broken our app’s resource merging.
Specific breakage I noticed (the earliest breakage): we have an ids.xml
with a placeholder id
in a package com.my.package
The generated class appears to be found in buck-out/bin/common/my/other/package/lib__src_debug#dummy_r_dot_java__scratch/classes/com/my/package/containerconstants/R$id.class
class file, but compiling the app fails with error: cannot find symbol
when referenced from another package.
After reverting this change, our app compiles normally with Buck again.
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
"Don't run resource union in MiniAapt" #2086 appears to break ...
"Don't run resource union in MiniAapt" #2086 appears to break resource merging. ... appears to have broken our app's resource merging.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@raviagarwal7 @kageiit I have a branch that reproduces the error we are seeing: https://github.com/uber/okbuck/pull/826
@artem-zinnatullin, does this shows the behaviour that broke with the pr #2086?
If resource union is needed doing union in
MergeAndroidResourcesStep
is the right way to go which handles styleable correctly. I think theresource_union
flag can be removed fromandroid_resource
(missed removing it in that pr) and needs to be added toandroid_binary
androbolectric_test
.setting
resourceUnion
would enable resource union with the original package otherwise uses the specified package. settingresourceUnionPackage
uses this as the union package.Seems like gradle has the same default behaviour and I think this change in BUCK will make it work similarly.
So, this requires 2 changes:
android_resource
.resource_union
fromandroid_resource
and output correctly according to the above change.From OkBuck docs.
feel free to create PR’s and cc me on it.