-
Notifications
You must be signed in to change notification settings - Fork 486
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
[Generator] Refactor TypeManager and add nullability. #17559
[Generator] Refactor TypeManager and add nullability. #17559
Conversation
This has several small changes: 1. Move the maps to the TypeManager which makes more sense. 2. Enable nullability which triggers a number of changes, the biggest one, in a dict TKey is not nullable (makes perfect sense).
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/bgen/TypeManager.cs
Outdated
@@ -152,149 +237,154 @@ public Type GetUnderlyingNullableType (Type type) | |||
return type.GenericTypeArguments [0]; | |||
} | |||
|
|||
public void Initialize (BindingTouch binding_touch, Assembly api, Assembly corlib, Assembly platform) | |||
public void Initialize (BindingTouch bindingTouch, Assembly api, Assembly corlib, Assembly platform) |
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.
If you make this a constructor, you can avoid a lot of the nullable fields, since you'd be setting them in a constructor.
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.
@rolfbjarne is not that easy, the time manager is used by the Generator, and making such a change would make me do a lot of changes they way in which the main method is deal with. I would not like to touch that code yet until we have tests for all this.
This comment has been minimized.
This comment has been minimized.
…ue/xamarin-macios into generator-type-manager-maps
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
new (System_nfloat, ".NFloatValue"), | ||
new (System_nint, ".NIntValue"), | ||
new (System_nuint, ".NUIntValue"), |
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.
nit:
new (System_nfloat, ".NFloatValue"), | |
new (System_nint, ".NIntValue"), | |
new (System_nuint, ".NUIntValue"), | |
new ( System_nfloat, ".NFloatValue" ), | |
new ( System_nint, ".NIntValue" ), | |
new ( System_nuint, ".NUIntValue" ), |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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, but note that there are failing tests.
Co-authored-by: Alex Soto <alex@alexsoto.me> Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ue/xamarin-macios into generator-type-manager-maps
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Ventura (13.0) failed ❌Failed tests are:
Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 225 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. [attempt 2] Html Report (VSDrops) Download Pipeline on Agent |
This has several small changes: