-
Notifications
You must be signed in to change notification settings - Fork 728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Error Warning when using private attributes in EpoxyModel #380
Comments
Thanks for reporting. Java should accurately provide a good error message for this, but I suppose Kotlin handles it differently. I'll try to get this addressed soon |
I just checked and the same happens in Java as well. The actual error message is at the very bottom. So the problem is not that there is no proper error message, but that processor is still trying to generate something even though some error has occurred. Seems like this problem exists not only for this case but pretty much for all of them since during validation steps we are just logging errors and not throwing actual exceptions so control flow is not interrupted. |
The number of attributes doesn't really matter. It truncates because Java compiler has 100 errors limit by default. |
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. |
Fix #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 |
Hi 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
andnot a statement
. I was searching an eventual conflict in my gradle or a problem in kapt.The text was updated successfully, but these errors were encountered: