You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The toolkit supports the following targets, each supporting a specific WinUI version:
MultiTarget
WinUI
uwp
2
wasdk
3
wasm
2, 3
android
2, 3
ios
2, 3
macos
2, 3
linuxgtk
2, 3
wpf
2, 3
netstandard
n/a
Intended Behaviors
Packaging should "just work" regardless of combination of supported targets, such as:
uwp
wasdk
netstandard
uwp,netstandard
wasdk,netstandard
uwp,wasdk
uwp,netstandard,wasdk
The CI currently builds WinUI 2 and 3 simultaneously, creating package variants for both:
CommunityToolkit.Uwp.* (uwp multitarget)
CommunityToolkit.WinUI.* (wasdk multitarget)
Problems
Some components support only one of uwp or wasdk, plus a non-winui target like netstandard, such as uwp,netstandard or wasdk,netstandard. This creates a race condition:
Building wasdk first can produce a package with netstandard but without uwp.
Building uwp first can produce a package with netstandard but without wasdk.
Further, packages with neither uwp nor wasdk (e.g. targeting netstandard only) won't be built via CI at all, since our "packaging step" only targets WinUI 2 and 3 with its matrix.
Solutions
One of the listed problems could be patched by deciding to build either UWP or WinUI first instead of doing it simultaneously, but there's a few reasons we don't. To understand why, consider:
A component supporting uwp,netstandard could be fixed by not allowing wasdk to build first.
A component supporting wasdk,netstandard could be fixed by not allowing uwp to build first.
Both cannot be done, meaning we must fix the issues with concurrent builds directly.
We'll need two things:
An added CI matrix for packaging netstandard-only components properly.
When building WinUI 2 or 3, skip unsupported components.
Skip building any component that targets only netstandard.
Skip building uwp,netstandard components if packaging for wasdk.
Don't skip building wasdk,netstandard components if packaging for wasdk.
Skip building wasdk,netstandard components if packaging for uwp.
Don't skip building uwp,netstandard components if packaging for uwp.
These can be split into two tickets, only the latter is high priority right now as it unblocks AppServices in Labs.
The text was updated successfully, but these errors were encountered:
Arlodotexe
changed the title
Invalid CI packaging setup, race condition in multitarget matrix
Invalid CI packaging setup, race condition / missing multitarget matrix
Jan 27, 2025
Background
MultiTargets & WinUI support
The toolkit supports the following targets, each supporting a specific WinUI version:
Intended Behaviors
Packaging should "just work" regardless of combination of supported targets, such as:
The CI currently builds WinUI 2 and 3 simultaneously, creating package variants for both:
CommunityToolkit.Uwp.*
(uwp
multitarget)CommunityToolkit.WinUI.*
(wasdk
multitarget)Problems
Some components support only one of
uwp
orwasdk
, plus a non-winui target likenetstandard
, such asuwp,netstandard
orwasdk,netstandard
. This creates a race condition:wasdk
first can produce a package withnetstandard
but withoutuwp
.uwp
first can produce a package withnetstandard
but withoutwasdk
.Further, packages with neither
uwp
norwasdk
(e.g. targetingnetstandard
only) won't be built via CI at all, since our "packaging step" only targets WinUI 2 and 3 with its matrix.Solutions
One of the listed problems could be patched by deciding to build either UWP or WinUI first instead of doing it simultaneously, but there's a few reasons we don't. To understand why, consider:
uwp,netstandard
could be fixed by not allowingwasdk
to build first.wasdk,netstandard
could be fixed by not allowinguwp
to build first.Both cannot be done, meaning we must fix the issues with concurrent builds directly.
We'll need two things:
netstandard
-only components properly.netstandard
.uwp,netstandard
components if packaging forwasdk
.wasdk,netstandard
components if packaging forwasdk
.wasdk,netstandard
components if packaging foruwp
.uwp,netstandard
components if packaging foruwp
.These can be split into two tickets, only the latter is high priority right now as it unblocks AppServices in Labs.
The text was updated successfully, but these errors were encountered: