-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update mappers instead of replacing field values #13836
Conversation
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
4db28df
to
5cba950
Compare
🚨 API change(s) detected @davidbritch FYI |
/rebase |
935ee7a
to
f557eaa
Compare
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
1 similar comment
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
This comment was marked as outdated.
This comment was marked as outdated.
a0d35b1
to
405ce17
Compare
…apper-field-ordering
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 kicked off some extra UI Tests here
https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=8126594&view=results
If those don't seem to have any additional fails beyond what we're currently fixing, then I'd say merge.
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.
Would be great to see doc comments for the new mappers, but I don't want to block a merge because of it.
I will start mapper docs here: #16296 Still need to figure out the best way... 🧑🤝🧑 |
PENDING PRs:
Description of Change
Update mappers instead of replacing field values to prevent field/type reference ordering to influence the way mappers are set.
Currently we assume that UseMauiApp is the first part of MAUI that updates the mappers, however we can directly influence that very easily:
By first forcing all the Core types to load, the Controls mappers are not correctly set up to handle changes later on. Because we first load Button.ControlsButtonMapper and then Element.ControlsElementMapper, the properties in Element are not available to Button.
This PR removes the need for ordering and makes sure that Button is chained to Element so we can ADD to Element and Button automatically gets the new properties.
Context: #11662 (comment)
BREAKING
There is technically a breaking change in that we are no longer use the
Controls*Mapper
fields anymore since they actually break with AOT as they would run in random orders (hence this PR). So as a result, if someone did this, it would no longer work:The reason for this is that we don't use this field and thus would never reach the handlers. However, I am not sure this way is common as most people should have been using the base mapper:
To help avoid and catch any of these issues, I have marked it as obsolete so that there is a build warning. However, regardless of what version of maui you are using, always use the base handler mappers.
Issues Fixed
Fixes #11662
Tasks