unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.52k stars 690 forks source link

feat: Add support for C# 9.0 source generators #4201

Closed jeromelaban closed 3 years ago

jeromelaban commented 3 years ago

GitHub Issue (If applicable): fixes https://github.com/unoplatform/uno/issues/3948

PR Type

What kind of change does this PR introduce?

What is the new behavior?

Adds support for C# 9.0 source generators where available.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

nventive-devops commented 3 years ago

The build 20563 found UI Test snapshots differences: android-28: 30, android-28-Snap: 21, ios: 8, ios-Snap: 22, skia-gtk-screenshots: 32, wasm: 10, wasm-automated: 8

Details * `android-28`: **30** changed over 434
🚨🚨 Comparison Details (first 20) 🚨🚨 - `ComboBoxTests_Fullscreen_Popup_Generic_Opened` - `ComboBoxTests_Fullscreen_Popup_Generic_Closed` - `CommandBar_LongTitle_Validation_CommandBar_-_LongTitle_-_4_-_Orientation_Landscape` - `Dismiss_MenuFlyout_AfterSuccess` - `Dismiss_MenuFlyout_fileMenu` - `Keyboard_Textbox_InsideScrollViewer_Validation_5_-_Remove_Focus_on_numberTextBox` - `MenuFlyoutItem_ClickTest_AfterSuccess` - `MenuFlyoutItem_ClickTest_menuShown` - `MenuFlyoutItem_ClickTest_UITests_Shared_Windows_UI_Xaml_Controls_MenuFlyoutTests_MenuFlyoutItem_Click` - `PopupWithOverlay_After` - `ComboBoxTests_ToggleDisabled_UITests_Windows_UI_Xaml_Controls_ComboBox_ComboBox_ToggleDisabled` - `Keyboard_Textbox_InsideScrollViewer_Validation_3_-_Remove_Focus_on_disabledTextBox` - `Simple_ContentDialog_06_Reuse_UITests_Shared_Windows_UI_Xaml_Controls_ContentDialogTests_ContentDialog_Simple` - `Simple_MenuFlyout_AfterSuccess` - `Simple_MenuFlyout_exitMenu` - `Simple_MenuFlyout_openMenu` - `Simple_MenuFlyout_Toggle_AfterSuccess` - `TextBox_DeleteButton_UITests_Shared_Windows_UI_Xaml_Controls_TextBoxTests_TextBox_DeleteButton_Automated` - `UIElement_ContextFlyout_opened` - `Simple_MenuFlyout_Toggle_RepeatToggleMenuFlyoutItem`
* `android-28-Snap`: **21** changed over 777
🚨🚨 Comparison Details (first 20) 🚨🚨 - `ColorPicker_ColorPickerSample_UITests_Microsoft_UI_Xaml_Controls_ColorPickerTests_ColorPickerSample` - `ComboBox_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement_UITests_Shared_Windows_UI_Xaml_Controls_ComboBox_ComboBox_DropDownPlacement` - `CommandBar_Native_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Native` - `Default_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name_UITests_Shared_Windows_UI_Xaml_Automation_AutomationProperties_Name` - `ImageBrushTestControl_ImageBrushChangingCornerRadius_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushChangingCornerRadius` - `GridTestsControl_Grid_with_MinWidth_MinHeight_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_with_MinWidth_MinHeight` - `ListView_ListViewChangeView_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewChangeView` - `ListView_HorizontalListView_Padding_SamplesApp_Windows_UI_Xaml_Controls_ListView_HorizontalListView_Padding` - `MediaPlayerElement_Using__avi_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Avi_Extension` - `MediaPlayerElement_Using__ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension` - `Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage` - `TextBlockControl_TextBlockMultilineInStarStackPanel_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlockMultilineInStarStackPanel` - `UIElement_UITests_Windows_UI_Xaml_UIElementTests_UIElement_InitializationSequence_UITests_Windows_UI_Xaml_UIElementTests_UIElement_InitializationSequence` - `WebView_WebView_Mailto_Uno_UI_Samples_Content_UITests_WebView_WebView_Mailto` - `WebView_WebView_WithHeaders_Uno_UI_Samples_Content_UITests_WebView_WebView_WithHeaders` - `Transform_Grid_With_RotateTransform_And_Button_SamplesApp_Wasm_Windows_UI_Xaml_Media_Transform_Grid_With_RotateTransform_And_Button` - `Transform_Image_With_RotateTransform_Uno_UI_Samples_Content_UITests_Transform_Image_With_RotateTransform` - `TextBox_TextBox_Selection_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Selection` - `TextBox_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll_Uno_UI_Samples_Content_UITests_TextBoxControl_PasswordBox_Reveal_Scroll` - `Time_Picker_TimePicker_TimePickerFlyoutStyle_UITests_Windows_UI_Xaml_Controls_TimePicker_TimePicker_TimePickerFlyoutStyle`
* `ios`: **8** changed over 223
🚨🚨 Comparison Details (first 20) 🚨🚨 - `WriteableBitmap_Invalidate_WriteableBitmap_Invalidate_-_Result` - `Keyboard_Textbox_InsideScrollViewer_Validation_0_-_Remove_Focus_on_normalTextBox` - `Keyboard_Textbox_NoScrollViewer_Validation_4_-_Remove_Focus_on_multilineTextBox` - `ListView_ObservableCollection_Creation_Count_Removed_above` - `ListView_ObservableCollection_Creation_Count_Scrolled1` - `ListView_ObservableCollection_Creation_Count_Scrolled2` - `Screenshots_Image_Stretch_Alignment_Equal_Mode-0` - `ListView_ObservableCollection_Creation_Count_Added_above`
* `ios-Snap`: **22** changed over 769
🚨🚨 Comparison Details (first 20) 🚨🚨 - `ImageBrushTestControl_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform` - `ListView_ListViewMarginTest_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewMarginTest` - `MediaPlayerElement_Original_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Original` - `MediaPlayerElement_Using__3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension` - `MediaPlayerElement_Using__mov_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mov_Extension` - `Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller` - `Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Uno_UI_Samples_UITests_Image_Image_Stretch` - `MediaPlayerElement_MediaPlayerElement_Stretch_Fill_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Stretch_Fill` - `Pointers_DragCoordinates_Automated_UITests_Shared_Windows_UI_Xaml_Input_Pointers_DragCoordinates_Automated` - `Progress_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRingPage` - `TextBlockControl_Progressing_TextBlock_with_inline_margin_Uno_UI_Samples_Content_UITests_TextBlockControl_Progressing_TextBlock_with_inline_margin` - `TextBlockControl_SimpleText_MaxLines_Different_Font_Size_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_SimpleText_MaxLines_Different_Font_Size` - `TextBlockControl_Simple_Contrained_Horizontal_Center_Wrap2_Uno_UI_Samples_Content_UITests_TextBlockControl_Simple_Contrained_Horizontal_Center_Wrap2` - `TextBlockControl_TextBlock_LineHeight_Inlines_Uno_UI_Samples_Content_UITests_TextBlockControl_TextBlock_LineHeight_Inlines` - `Windows_Media_MediaPlayer_UITests_Windows_Media_MediaPlayerTests` - `TextBox_Input_PasswordBox_Uno_UI_Samples_Content_UITests_TextBoxControl_Input_PasswordBox` - `UIElement_TransformToVisual_Transform_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_Transform` - `UIElement_UITests_Windows_UI_Xaml_UIElementTests_UIElement_InitializationSequence_UITests_Windows_UI_Xaml_UIElementTests_UIElement_InitializationSequence` - `TextBlockControl_TextBlock_Visibility_Arrange_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Visibility_Arrange` - `Time_Picker_TimePicker_TimePickerFlyoutStyle_UITests_Windows_UI_Xaml_Controls_TimePicker_TimePicker_TimePickerFlyoutStyle`
* `skia-gtk-screenshots`: **32** changed over 765
🚨🚨 Comparison Details (first 20) 🚨🚨 - `ColorPicker-ColorPickerSample` - `CommandBar-CommandBar_With_Long_Sentences` - `CommandBar-Native` - `ComboBox-ComboBox_ComboBoxItem_Selection` - `Image-Image_Stretch_Full_Taller` - `Image-Image_Stretch_None_ScrollViewer` - `GH Bugs-UIElement_InitializationSequence` - `Image-Image_Stretch` - `Image-Image_Stretch_Alignment_Bigger` - `ImageBrushTestControl-ImageBrushWithCompositeTransform` - `ImageBrushTestControl-ImageBrushWithRotateTransform` - `ImageBrushTestControl-ImageBrushWithScaleTransform` - `ListView-ListViewGroupedVariableHeightComplexTemplate` - `Localization-Localization_Implicit` - `ListView-ListViewResizable` - `NavigationView-NavigationView_Pane_Automated` - `Routed Events-Test Page` - `ScrollViewer-Hosted_ScrollViewer` - `ListView-ListViewGrouped` - `ListView-ListViewGroupedChanging`
* `wasm`: **10** changed over 778
🚨🚨 Comparison Details (first 20) 🚨🚨 - `UITests.Microsoft_UI_Xaml_Controls.ProgressRing.WinUIProgressRingPage` - `UITests.Shared.Windows_UI_Xaml.UIElementTests.TransformToVisual_Transform` - `UITests.Windows_UI_Xaml.UIElementTests.UIElement_InitializationSequence` - `UITests.Shared.Windows_UI_Xaml_Automation.AutomationProperties_Name` - `UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_With_ListViews_Count_Measure` - `Uno.UI.Samples.Content.UITests.Transform.Image_With_RotateTransform` - `Uno.UI.Samples.UITests.Image.Image_Margin` - `Uno.UI.Samples.UITests.Image.Image_Stretch_Alignment_Smaller` - `Uno.UI.Samples.UITests.ImageBrushTestControl.ImageBrushWithCompositeTransform` - `Uno.UI.Samples.UITests.ImageTestsControl.UniformToFill100x100`
* `wasm-automated`: **8** changed over 478
🚨🚨 Comparison Details (first 20) 🚨🚨 - `Check_CornerRadius_Border_CornerRadius=5` - `Screenshots_Image_Stretch_Algmnt_Inf_Vertical_Mode-1` - `Screenshots_Image_Stretch_Alignment_Bigger_Mode-1` - `Screenshots_Image_Stretch_Alignment_Taller_Mode-0` - `Screenshots_Image_Stretch_Alignment_Equal_Mode-0` - `Screenshots_Image_Stretch_Alignment_SizeOnControl_Mode-0` - `When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer` - `WriteableBitmap_Invalidate_WriteableBitmap_Invalidate_-_Result`