-
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
Use kotlin dsl marker for model building receivers #1180
Conversation
* for building models you cannot incorrectly nest models and also don't see cluttered, incorrect | ||
* code completion suggestions. | ||
*/ | ||
@DslMarker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL
@@ -1,7 +1,7 @@ | |||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | |||
buildscript { | |||
|
|||
ext.KOTLIN_VERSION = "1.4.32" | |||
ext.KOTLIN_VERSION = "1.5.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Smart fix to an annoying problem
@elihart My team recently updated to this version, which required over 500 line changes of heavily verbose code. Seeing that this breaking change was needed because "something annoyed you" seems like a good reason to start migrating away from Epoxy. |
@martymiller did you see the option to disable this change in #1185? This wasn't just because it annoyed me, it was trying to fix a problem that I expected would cause friction for many other people. If you see something you would like changed please submit a PR to improve the project; after all, it's free, open source software you're using. Regarding migrating away, please do move to Compose as it is simply better. |
I had gotten annoyed by autocomplete suggesting all of our model names inside of building another model - it makes it hard to find the applicable properties of a model as well as enables buggy behavior.
Adding the kotlin dsl marker annotation to both the ModelCollector as well as generated models prevents both of these things.
This is a breaking change if inside of a model building function you reference a property in enclosing EpoxyController - to do so now requires an explicit
this
. While being safer and more readable that might require some people to make quite a few updates for this.I was also getting R8 issues that I had to solve by making all modules target java 1.8