-
Notifications
You must be signed in to change notification settings - Fork 18
Refactor MultiTarget scripts for checking component support #288
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
Refactor MultiTarget scripts for checking component support #288
Conversation
…nt MultiTarget / WinUI checks via Test-Component-Support.ps1
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.
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."
…nly changed components that support the current WinUI/MultiTarget configuration. Includes changes from CommunityToolkit/Tooling-Windows-Submodule#288
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. |
…mponent testing with WinUI
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 So, appears good? |
AppServices and Notifications don't support any WinUI3-capable MultiTargets, they're UWP only.
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 |
This PR:
Build-Toolkit-Components.ps1
into a dedicated scriptTest-Component-Support.ps1
.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.