litho
litho copied to clipboard
litho-core contains widget resources
The widget_attrs.xml is currently part of litho-core but should obviously live in litho-widget.
It's not as easy as moving it to the other package and updating the references to com.facebook.litho.widget.R as we create another cycle since litho-testing depends on some of the styleable attributes defined in there.
We need to find a way to untangle this. Another stand-alone resource package sounds like something we would want to avoid. Get creative!
@passy so what about keeping only the styleable attribtes at are needed for litho-testing, inside litho-core and moving the rest over to litho-widget? I think i can prepare a PR if that's what's needed.
@passy why does litho-testing rely on widget_attrs.xml? What are the dependencies?
@IanChilds The only dependency is the ComponentsRule that includes the hack currently needed to make Buck work with the styleable attributes.
@pavlospt I think (but might be wrong here) that this actually includes all attributes currently listed in there.
The best way to solve this would clearly be to fix the buck hack but this has proved to be rather difficult. I'll try and find out what the process of importing the fix for this is (https://github.com/facebook/buck/pull/879).
The only dependency is the ComponentsRule that includes the hack currently needed to make Buck work with the styleable attributes.
This is no longer true, so perhaps we can remove this dependency now?