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
Migrate to null-safety #136
Conversation
- apply `dart migrate` - change few APIs to use `late` - cleanup codec to take advantage of null-safety to fullest
Hi @tiholic :) Could you explain the process that you took to migrate to null safety? That would be interesting and useful to know. I notice there a lot of usages of optionals, and I wanted to see if they're necessary (though it will require some work to find out which fields need to be optional). For example, all the fields of
Another example is TLDR: Though we don't have compilation failures and we used the migration tool, there could be a lot of improvements because our models are too flexible, we may be abusing nullability by using |
Hey @ben-xD! I followed this guide first to auto migrate https://dart.dev/null-safety/migration-guide, then looked into each of the implemented APIs (channel publish, subscribe, history, paginated results, etc). While I may also have touched few areas that are not implemented, we need to ensure they are appropriate while implementing them as per the spec.
A message can be received (read) or published (created). So fields like As you may have understood by now that As many languages do not have support for null safety, it might not have been considered while building the SDK developer docs to flag which property of a model is |
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.
This is very difficult to review line by line, but looks sensible to me.
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.
LGTM with comments
The failing tests have been disabled and are successfully passing (on most occasions) in #144. I'm merging this in now even though the tests fail, because the test disabling PR depends on this one. |
lib
test
example
test_integration