-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow nullable types in collections #708
Conversation
d0d28e3
to
913c3ae
Compare
913c3ae
to
6f90e44
Compare
ba2de2f
to
2b55f66
Compare
84e90e7
to
de556d3
Compare
ec9a8a9
to
68c1632
Compare
Pull Request Test Coverage Report for Build 3037342011
💛 - Coveralls |
167636f
to
8ebdcb7
Compare
87414c8
to
e8fa087
Compare
e8fa087
to
9fd65e1
Compare
9fd65e1
to
1ec063c
Compare
Use workaround for dart-lang/build#2634 by @eernstg
This is done in preparation to move RealmObject interface to realm_common package.
c7ae7af
to
549af93
Compare
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.
I think we are doing too much in this PR. We definitely need to have a discussion about the changes around the generator. I think we are putting too much responsibility into the generator which was designed to be lightweight and something we plan to replace in the future.
There is no more logic in the generator than before, it is just as fast as it has always been. It just lays out the generated code in a smarter way. It allows the runtime to skip work, because more is known compile time. I don't see how this in anyway will make it more difficult to transition to static meta-programming once it lands. |
@nielsenko Hello. When i try to have a field of Type List<String?> it is throwing sync error. Is it the expected behavior or I am missing something here? |
That is correct. The server team does plan to eventually add support but it hasn't been a highly requested feature and thus we don't have any timeframe for when we'll get to it. If it's important for your app, definitely reach out to your AE to clarify your requirements. |
@nirinchev Thanks for Clarification. |
Ultimately this is about supporting nullable primitive elements on realm lists, ie.
In the process I refactored how the generator lays out the schema, so it is now all done compile time with const constructable objects, so the above will generate
Player
:Notice how
schema
is const constructed, and the strongly typed property types.Dynamic realms, use
_DynamicSchemaProperty
and benefits by allowing me to dropgetList<T>
for justget<List<T>>
, ie. not special property access needed for lists.Resolves #163