-
Notifications
You must be signed in to change notification settings - Fork 49
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
Serialize UniqueId properties + support setting default property value in patches #437
Conversation
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.
Well, I'm not jazzed about how complex the code to propagate default values to all subclasses ended up (nor the additional space it uses), but I agree with the reasoning for why. Just a couple comments:
Yeah I'm not super jazzed either, but it's what we gotta do for now because the other option is committing to a broader change. We should probably prioritize it, but I don't think it's worth crying over right now. |
Last thing: I've edited the PR's title to mention that it's making UniqueId props serialize again, since we've had problems with UniqueId in the past. If this title isn't quite to your liking feel free to change it |
As discussed in #435 and previously in #418, this allows us to specify the default value for properties using patches in rbx-reflector.
In addition to that, this PR also sets a default for
Archivable
and also reverts #327 and overrides their defaults instead. Since several of these properties are onInstance
, this results in a very large change to the reflection database.We can and should in the future make it so defaults are stored in a method that respects inheritance and encourage people to use
ReflectionDatabase::find_default_property
to find defaults. The reason I'm not doing it at this moment is that historically people haven't had to care about inheritance to get defaults. Though it's not a breaking change, I feel like we should give some warning if we change it so they have to, especially for critical things likeArchivable
.