Skip to content

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented Jun 6, 2025

This PR:

  • Extracts MultiTarget/WinUI code checks from Build-Toolkit-Components.ps1 into a dedicated script Test-Component-Support.ps1.
  • Adds a new script Filter-Supported-Components.ps1 as a one-liner for filtering (or populating) a list of toolkit components based on whether they support the given WinUI and MultiTarget preferences.

@Arlodotexe Arlodotexe self-assigned this Jun 6, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors component support checks by extracting WinUI and MultiTarget verifications into separate scripts and adding a filtering script for incremental builds.

  • Extracts multi-target support checks from the main build script into Test-Component-Support.ps1.
  • Adds a new one-liner script, Filter-Supported-Components.ps1, to filter components by support.
  • Updates Get-MultiTargets.ps1 to ignore empty entries and simplifies Build-Toolkit-Components.ps1 by delegating support checks.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
MultiTarget/Test-Component-Support.ps1 Contains refactored logic for validating component multi-target support and WinUI.
MultiTarget/Get-MultiTargets.ps1 Updates multi-target extraction to filter out empty entries.
MultiTarget/Filter-Supported-Components.ps1 Introduces a new script to filter components based on support criteria.
Build-Toolkit-Components.ps1 Removes duplicated support-check logic and integrates the new Test-Component-Support.ps1.
Comments suppressed due to low confidence (1)

MultiTarget/Test-Component-Support.ps1:109

  • The error message references '$MultiTargets', which is not defined in this context; consider changing it to '$RequestedMultiTargets' to accurately reflect the requested targets.
$Reason = "None of the requested MultiTargets '$MultiTargets' are enabled for this component."

@Arlodotexe Arlodotexe added enhancement New feature or request dev loop ➰ For issues that impact the core dev-loop of building experiments powershell For issues related to PowerShell runtime or scripts labels Jun 6, 2025
Arlodotexe added a commit to CommunityToolkit/Labs-Windows that referenced this pull request Jun 6, 2025
…nly changed components that support the current WinUI/MultiTarget configuration.

Includes changes from CommunityToolkit/Tooling-Windows-Submodule#288
@michael-hawker
Copy link
Member

The Labs PR which tests this is failing as well.

We may want to investigate some PowerShell tests or something for some of these smaller scripts, not sure how easy it'd be to mock up some projects or something.

@michael-hawker
Copy link
Member

Looks like CommunityToolkit/Labs-Windows#681 passed now, just been looking at the output.

Future: realizing it could be nice for some scripts to output more info (like which components changed (Get-Changed-Components), the validated package names, etc...) so that we have a few more easy spots in the CI to see what's happening where.

I saw DependencyInjection went for netstandard (0) step
I saw AppServices and Notifications went with UWP in (2) step but not in (3) - what's the piece which decides where they go?

So, appears good?

@Arlodotexe
Copy link
Member Author

Arlodotexe commented Jun 9, 2025

I saw DependencyInjection went for netstandard (0) step I saw AppServices and Notifications went with UWP in (2) step but not in (3) - what's the piece which decides where they go?

AppServices and Notifications don't support any WinUI3-capable MultiTargets, they're UWP only.

Future: realizing it could be nice for some scripts to output more info (like which components changed (Get-Changed-Components), the validated package names, etc...) so that we have a few more easy spots in the CI to see what's happening where.

It's tricky to have additional stdout here, since Actions pipes it to the variables we're setting. We can see the result in the very next step, as input to the Build-Toolkit-Components.ps1 script.

@Arlodotexe Arlodotexe merged commit 2547f8a into main Jun 9, 2025
11 checks passed
@Arlodotexe Arlodotexe deleted the refactor/multitarget/scripts/check-component-support branch June 9, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev loop ➰ For issues that impact the core dev-loop of building experiments enhancement New feature or request powershell For issues related to PowerShell runtime or scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants