Skip to content
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

fix(hr): Fix invalid code gen when using x:bBind on resource #19269

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

dr1rrb
Copy link
Member

@dr1rrb dr1rrb commented Jan 18, 2025

PR Type

What kind of change does this PR introduce?
Fix invalid code gen when using x:bBind on resource

What is the current behavior?

When using x:Bind on a resource (out of a DataTemplate), gen'ed code does not compile

What is the new behavior?

🙃

PR Checklist

Please check if your PR fulfills the following requirements:

@dr1rrb dr1rrb marked this pull request as ready for review January 18, 2025 01:50
@dr1rrb dr1rrb enabled auto-merge January 18, 2025 01:50
@github-actions github-actions bot added the area/code-generation Categorizes an issue or PR as relevant to code generation label Jan 18, 2025
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19269/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19269/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 152518 has failed on Uno.UI - CI.

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-19269/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-19269/index.html

@nventive-devops
Copy link
Contributor

The build 152705 found UI Test snapshots differences: android-28-net8: 22, android-28-net8-Snap: 37, ios: 6, ios-Snap: 37, skia-gtk-screenshots: 64, skia-linux-screenshots: 62, skia-windows-screenshots: 59, wasm: 99, wasm-automated-net9.0-UWP-Default-automated: 25, wasm-automated-net9.0-UWP-RuntimeTests-0: 0, wasm-automated-net9.0-UWP-RuntimeTests-1: 0, wasm-automated-net9.0-UWP-RuntimeTests-2: 0, wasm-automated-net9.0-WinUI-Benchmarks-automated: 0, wasm-automated-net9.0-WinUI-RuntimeTests-0: 0, wasm-automated-net9.0-WinUI-RuntimeTests-1: 0, wasm-automated-net9.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net8: 22 changed over 829

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • Popup_PlacementTest_3Default_HCVC_Uno_UI_Samples_Content_UITests_Popup_Popup_HVAlignments
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • UpDownTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • WebView_NavigateToAnchor_Initial
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • When_Clipped_Rounded_Corners_UITests_Windows_UI_Xaml_Clipping_Clipping4273
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • android-28-net8-Snap: 37 changed over 1071

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Icons_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Icons
    • ListView_ListView_FirstLastCacheIndex_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_FirstLastCacheIndex
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • MediaPlayerElement_Sources_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Sources
    • MediaPlayerElement_Using_3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavPage_MUXControlsTestApp_NavigationViewTopNavPage
    • TeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipBasicPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipBasicPage
    • TeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage
    • Scrolling_MUXControlsTestApp_ScrollViewWithScrollControllersPage_MUXControlsTestApp_ScrollViewWithScrollControllersPage
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • MUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Toolkit_UITests_Toolkit_VisibleBoundsPadding_Modal_Test_UITests_Toolkit_VisibleBoundsPadding_Modal_Test
    • ToolTip_TextOnlyToolTipSample_UITests_Shared_Windows_UI_Xaml_Controls_ToolTip_TextOnlyToolTipSample
    • ToolTip_ToolTip_CollapsedHost_UITests_Windows_UI_Xaml_Controls_ToolTip_ToolTip_CollapsedHost
    • ToolTip_ToolTip_DynamicContent_UITests_Windows_UI_Xaml_Controls_ToolTip_ToolTip_DynamicContent
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • NavigationView_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
  • ios: 6 changed over 267

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • ios-Snap: 37 changed over 1062

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ListView_ListViewLargeHeader_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewLargeHeader
    • Icons_UITests_Windows_UI_Xaml_Controls_IconSourceTests_IconSourceElementTests_UITests_Windows_UI_Xaml_Controls_IconSourceTests_IconSourceElementTests
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • Keyboard_UITests_Windows_UI_Xaml_Input_Keyboard_Keyboard_Events_UITests_Windows_UI_Xaml_Input_Keyboard_Keyboard_Events
    • Brushes_ImageBrushLocalAsset_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushLocalAsset
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
    • NavigationView_NavigationViewSample_SamplesApp_Samples_NavigationViewSample_NavigationViewSample
    • Brushes_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform
    • MUX_MUXControlsTestApp_DropDownButtonPage_MUXControlsTestApp_DropDownButtonPage
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats
    • PullToRefresh_UITests_Microsoft_UI_Xaml_Controls_RefreshContainerTests_RefreshContainerHorizontalScroll_UITests_Microsoft_UI_Xaml_Controls_RefreshContainerTests_RefreshContainerHorizontalScroll
    • TextBlock_Attributed_text_FontSize_Changing_Uno_UI_Samples_Content_UITests_TextBlockControl_Attributed_text_FontSize_Changing
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Alignment_SizeOnControl
    • ListView_ListView_Image_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListView_Image
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Scrolling_MUXControlsTestApp_ScrollViewsWithSimpleContentsPage_MUXControlsTestApp_ScrollViewsWithSimpleContentsPage
    • WebView_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_NavigationProperties
    • Windows_System_Display_DisplayRequest_UITests_Shared_Windows_System_Display_DisplayRequest
  • skia-gtk-screenshots: 64 changed over 2232

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png
    • ButtonClippingTestsControl.png-dark
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • ImageSourceUrlMsAppDataScheme.png-dark
    • DropDownButtonPage.png-dark
    • Popup_Simple.png-dark
    • Popup_Simple.png
    • ClipboardTests.png-dark
    • Examples.png
    • ImageSourceUrlMsAppDataScheme.png
    • Native.png-dark
    • Native.png
    • UIElement_Layout_Bug2879.png-dark
    • ImageBrushAlignmentXY2.png-dark
    • ImageBrushAlignmentXY2.png
    • RepeatButton_Automated.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • BorderImageBrush.png-dark
  • skia-linux-screenshots: 62 changed over 2232

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Buttons.png-dark
    • Buttons.png
    • ButtonClippingTestsControl.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • BorderImageBrush.png-dark
    • BorderImageBrushRelativeTransform.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ImageInStackPanel.png-dark
    • ImageInStackPanel.png
    • BorderImageBrush.png
    • Examples.png
    • ImageBrush_UniformToFill.png-dark
  • skia-windows-screenshots: 59 changed over 2232

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • BorderImageBrushRelativeTransform.png
    • BorderImageBrushRelativeTransform.png-dark
    • Buttons.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • ContentPresenter_NativeEmbedding.png-dark
    • ContentPresenter_NativeEmbedding.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ImageBrush_UniformToFill.png-dark
    • ImageBrush_UniformToFill.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • Examples.png
  • wasm: 99 changed over 1042

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_Corners
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewChangeViewArbitrary
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_VirtualizePanelAdaptaterIdCache
    • UITests.Shared.Windows_UI_Input.GestureRecognizerTests.DoubleTappedTests
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_ComboBoxItem_Selection
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_DropDownPlacement
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_With_ListViews_Count_Measure
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView_OwnContainer_Virtualized
    • UITests.Shared.Windows_UI_Xaml_Controls.Flyout.Flyout_OverlayInputPassThroughElement
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Windows_UI_Xaml_Controls.SwipeControlTests.SwipeControl_ListView_ItemClick
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_MultiLoad
    • MUXControlsTestApp.SwipeControlPage2
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Changing_Text
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item
    • UITests.Windows_UI_Xaml_Controls.MenuFlyoutTests.MenuFlyout_Nested_5639
    • MUXControlsTestApp.RadialGradientBrushPage
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.HorizontalListViewGrouped
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Last_Item_Large
  • wasm-automated-net9.0-UWP-Default-automated: 25 changed over 1951

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • Default_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_TestPage_UITests_Windows_UI_Xaml_DragAndDrop_DragDrop_TestPage
    • Border_OnepxThicknessandRadiusAndTextBlock_Uno_UI_Samples_UITests_BorderTestsControl_OnepxThicknessandRadiusAndTextBlock
    • Default_StrokeThickness_MyPolyline
    • Border_NonUniformThicknessandRadius_Uno_UI_Samples_UITests_BorderTestsControl_NonUniformThicknessandRadius
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Default_StrokeThickness_MyRect_0_StrokeThickness
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • MediaPlayerElement_Using_mp3_Audio_only_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Mp3_Extension
    • MediaPlayerElement_Using_ogg_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Ogg_Extension
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • MediaPlayerElement_Sources_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Sources
    • MediaPlayerElement_Using_3gp_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_3gp_Extension
    • Default_StrokeThickness_MyPolygon
    • Expander_WinUIExpanderPage_UITests_Shared_Microsoft_UI_Xaml_Controls_ExpanderTests_WinUIExpanderPage
    • Pointers_UITests_Windows_UI_Input_PointersTests_HitTest_GeometryGroup_UITests_Windows_UI_Input_PointersTests_HitTest_GeometryGroup
    • MUX_MUXControlsTestApp_RefreshContainerOnImagePage_MUXControlsTestApp_RefreshContainerOnImagePage
    • WebView_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_Basic_UITests_Microsoft_UI_Xaml_Controls_WebView2Tests_WebView2_Basic
  • wasm-automated-net9.0-UWP-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-UWP-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-UWP-RuntimeTests-2: 0 changed over 1

  • wasm-automated-net9.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-2: 0 changed over 1

@dr1rrb dr1rrb merged commit 3f3e328 into master Jan 21, 2025
115 checks passed
@dr1rrb dr1rrb deleted the dev/dr/xBindRes branch January 21, 2025 12:56
@jeromelaban
Copy link
Member

@Mergifyio backport release/stable/5.6

Copy link
Contributor

mergify bot commented Jan 21, 2025

backport release/stable/5.6

✅ Backports have been created

jeromelaban added a commit that referenced this pull request Jan 21, 2025
…5.6/pr-19269

fix(hr): Fix invalid code gen when using x:bBind on resource (backport #19269)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation Categorizes an issue or PR as relevant to code generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants