Better Error Warning when using private attributes in EpoxyModel
See original GitHub issueHi there,
I wrote some attributes with the private modifier @EpoxyAttribute private lateinit var htmlText: String
(conditioned reflex, my bad) and I had a weird error that took me way too much time to link to the private modifier. I don’t know if it’s possible to verify this and display a better error than:
<identifier> expected
and not a statement
. I was searching an eventual conflict in my gradle or a problem in kapt.


Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Epoxy updating the epoxy attributes in the models once they ...
Problem. I'm not the Epoxy expert, but Epoxy models are required to be not modified after they were added to the controller.
Read more >Epoxy for Android - Airbnb Engineering & Data Science
Epoxy is an Android library for building complex screens in a RecyclerView. It abstracts the boilerplate of view holders, item types, item ids,...
Read more >How to build your complex UI with Epoxy - Factory.dev
Epoxy, tell me more about it; I am in, show me an example; Add dependencies to Library; ViewHolders bye, EpoxyModels hi; Create a...
Read more >How does Airbnb do it? Epoxy! - Medium
Let's now create our Epoxy models. This will include the use of Epoxy annotations and attributes. The annotations function as an abstraction of...
Read more >How to use Epoxy with ViewHolder (Part 2) - Iqbal Ahmed
Listing with ViewHolder is similar like Recycler. ... class KotlinEpoxyHolder that we can get from epoxy sample or from our source code.
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 Free
Top 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
Fix https://github.com/airbnb/epoxy/pull/388
The main issue was that since we didn’t have the name of the setter/getter we used “null” which made the generated code all messed up. The fix is simple. It switches the field to be accessed directly like
super.html = html
. This will give an error that html is private and can’t be accessed, but it is much clearer.Good analysis. The reason we still try to generate code even though we log this error is that without generating the code there is the possibility for hundreds of more errors where referenced generated files don’t exist, and that makes it even harder to find the original issue.
I will try to clean up the code generated in this case.