Skip to content

Conversation

Arlodotexe
Copy link
Member

@Arlodotexe Arlodotexe commented May 13, 2025

This PR fixes a regression introduced in #281 and CommunityToolkit/Labs-Windows#647

Uncovered in a CI run for CommunityToolkit/Labs-Windows#674, the WASM build will fail in incremental CI runs where the components changed don't support wasm, such as with MarkdownTextBlock.

The error manifests as The name 'ToolkitSampleRegistry' does not exist in the current context, which happens when no components were found by the source generator. In this case, the MultiTarget system correctly prevented the improper import.

The fix is to adjust solution generation so that Gallery heads designed to run a specific MultiTarget are only included in the solution if a component with that MultiTarget was also included.

This way, if no requested components support the available heads (wasm, uwp, wasdk), those heads aren't included in the generated solution.

Arlodotexe added a commit to CommunityToolkit/Labs-Windows that referenced this pull request May 13, 2025
@Arlodotexe Arlodotexe requested a review from michael-hawker May 13, 2025 20:12
@Arlodotexe Arlodotexe self-assigned this May 13, 2025
@Arlodotexe Arlodotexe added bug 🐛 Something isn't working build 🔥 dev loop ➰ For issues that impact the core dev-loop of building experiments regression What was working is now broke labels May 13, 2025
@Arlodotexe
Copy link
Member Author

Validated in CommunityToolkit/Labs-Windows#674

@Arlodotexe Arlodotexe enabled auto-merge May 13, 2025 21:50
michael-hawker pushed a commit to CommunityToolkit/Labs-Windows that referenced this pull request May 13, 2025
@Arlodotexe Arlodotexe merged commit 974de9e into main May 14, 2025
23 of 27 checks passed
@Arlodotexe Arlodotexe deleted the fix/multitarget/slngen/no-componentless-heads branch May 14, 2025 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something isn't working build 🔥 dev loop ➰ For issues that impact the core dev-loop of building experiments regression What was working is now broke

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants