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
{{ message }}
Repository navigation
bundle HotTesting into uno.template with MVUX #3211
Uno.HotTesting.Reactive joins the existing Extensions group, so it shares UnoExtensionsVersion. The SDK references it implicitly with UnoFeatures=MVUX, only when Optimize isn't true (Debug, by default), the same way Uno.UI.HotDesign is gated. That follows the HotTesting spec: the mocking package is dev/test-only and should never be referenced by a published app.
The Uno.Templates updater never adds packages to a group that already exists, so this takes two PRs.
PrivateAssets="all": the package doesn't flow to projects that reference yours, nor into the nuspec of a library packed in Debug.
UnoDisableHotTesting: an opt-out, registered in the buildschema.
AvailableSince: honored by ImplicitPackagesResolver. The package is skipped, with the new message UNOB0028, when the Extensions version is older than 7.4, is a floating version or a range, or has no entry in the manifest. In that last case it is skipped rather than fetched from nuget.org, so the two PRs can land in either order.
Docs: a new "MVUX feed mocks in non-optimized builds" section in using-the-uno-sdk.md, a migration row in migrating-to-uno-7.md, and UNOB0028 in the build error codes.
Validation:
SDK resolver probe: Debug includes the package. Release, Optimize=true, the opt-out, old, floating and range versions, and a missing manifest entry all leave it out.
Recommended MVUX template app, Debug on desktop and Android: builds with 0 warnings.
Same app in Release: the package is absent from both restore and output.
Debug restore followed by build -c Release --no-restore on an app: fails fast with UNOB0019, the existing DevServer guard.
7.4.0-dev.81 is the newest build whose dependencies (Uno.WinUI 6.8, Toolkit 8.4, Markup 5.3) stay within uno's current Toolkit and C# Markup pins. All 24 group packages plus HotTesting are published at that version.
src/Uno.Sdk/packages.json: append Uno.HotTesting.Reactive as the last entry of Extensions. It goes last so that Uno.Extensions.Authentication.WinUI stays the package the updater uses to detect the version. The version stays at 8.0.0-dev.72, which already includes HotTesting.
Mirror the same entry in the manifest copy embedded in src/Uno.Sdk/ReadMe.md.
Validation:
build/Verify-NuGetDependenciesOnNuGetOrg.ps1 -ManifestPath src/Uno.Sdk/packages.json passes, and the ReadMe copy matches packages.json;
end to end: the CI MVUX template matrix, once the bot moves Uno.Sdk.Private past the uno change.
Order: either PR can merge first. Until both are in, MVUX Debug builds skip HotTesting with UNOB0028 instead of failing.
No release/stable/* backports: HotTesting has no stable build yet.
uno.extensions follow-ups are in the comments below.
Follow-ups for uno.extensions (from the review of the uno SDK change)
The uno side now references Uno.HotTesting.Reactive for UnoFeatures=MVUX when Optimize isn't true, with PrivateAssets="all", an UnoDisableHotTesting opt-out, and a skip when UnoExtensionsVersion is older than 7.4. Because of that, the package's generator now runs in every Debug build of an MVUX project, class libraries included. The items below can only be fixed here.
It is a legacy ISourceGenerator with no cancellation.Execute reruns over the whole compilation on every design-time compile and every Hot Reload delta. The "Reactive not referenced" early exit never fires in an MVUX project. Port it to IIncrementalGenerator, or at least call ThrowIfCancellationRequested while walking types and models. MVUX's own FeedsGenerator has the same shape, so this adds a second full pass.
The source namespace tree is walked twice per run. The first walk calls GetAttributes() on every type. A syntax pre-filter plus a single walk would keep the cost flat for apps with few or no models.
IsAlreadyDeclared looks up every model in every compilation.References. It doesn't use the MayDeclareModels filter used elsewhere, so the cost is models × references on every run.
Diagnostics
MOCK0001 and MOCK0003 are Warning. Apps that never asked for mocking now get them in Debug only. Under TreatWarningsAsErrors that means a Debug-only build break, while Release still passes. Consider Info, or reporting only when the project actually uses mocking.
Generated surface
Mock accessibility follows the model's accessibility. So {Model}Mock, Create and SetMock are public for public models. In an MVUX class library they become public API in Debug and are missing in Release. Consider generating them internal, or only when the project opts into mocking explicitly.
Release train
No stable Extensions release ships Uno.HotTesting.Reactive yet. Users who pin UnoExtensionsVersion to a stable 7.x won't get it: the SDK skips it below 7.4. It needs to be in the 7.4 stable, with the HotTesting fixes backported.
Docs (doc/Reference/Reactive/testing.md)
Say where code that uses HotTesting types must live. The implicit reference exists only in non-optimized builds, so that code must not compile in Release (e.g. #if DEBUG).
Say how test projects get the package. They don't receive it through a ProjectReference to the app, so they need their own PackageReference.
Open question
Spec 013's primary consumer is an external test project that references the app. The SDK's implicit reference doesn't serve that project: it's PrivateAssets="all", and test projects typically don't set UnoFeatures=MVUX. In practice it serves Hot Design previews and the single-project path (D13). Can you confirm that's the intended scope of "bundle with MVUX"?
More uno.extensions follow-ups (second review round + real-app check)
Real-app check. I generated a recommended MVUX app (dotnet new unoapp -preset recommended -presentation mvux, Uno.Sdk 6.8.0-dev.51, UnoExtensionsVersion 7.4.0-dev.81). I added Uno.HotTesting.Reactive 7.4.0-dev.81 the way the SDK change will, and added IState<int> and IFeed<string> members to MainModel.
Debug builds cleanly for desktop and Android, with 0 warnings.
FeedsMockGenerator loads and runs (~5 ms with ReportAnalyzer), but it emits no source and no diagnostics.
The app assembly has no reference to Uno.HotTesting.Reactive.
Spec 013 (D13) says a single-project app that references the package directly gets mocks from source analysis. Either that path doesn't trigger for the template's MainModel, or it needs something the template doesn't have. Worth checking against servicing/7.4 and main.
Mocks generated in the app vs. in a test project.
IsAlreadyDeclared skips any mock that a referenced assembly already declares. Once every MVUX app generates mocks in Debug, a test project that references the app will reuse the app's mocks instead of generating its own.
Those mocks were compiled against the app's HotTesting version, while the test project runs with whatever version it references. Mocks of internal models also stay inaccessible to the test project without InternalsVisibleTo.
Please confirm this is intended, and document how a test project should version its Uno.HotTesting.Reactive reference. On the SDK side, the docs now say to match the app's Uno.Extensions version.
What the SDK now does, for reference:
The implicit reference is skipped, with message UNOB0028, when the Extensions version is older than 7.4, is a floating version or a range, or is missing from the manifest.
our uno.templates changes pr isnt necessary, we are waiting for routine bot pr to sync it naturally instead. (otherwise, it will overwrite our pr)
keeping that open as an "item/reminder" to check back later
see unoplatform/uno.templates#2305 (comment) regarding what we are waiting for
Verification: Debug vs. Release with Uno.Sdk 7.0.0-dev.54
I built a desktop app with UnoFeatures=MVUX;SkiaRenderer, pinned to Uno.Sdk7.0.0-dev.54 in both Debug and Release. Both built with 0 warnings and 0 errors.
Version source: the SDK manifest lists Uno.HotTesting.Reactive as the last entry of the Extensions group, at 8.0.0-dev.76. That is the version Debug resolves.
Reference shape in Debug:autoReferenced: true, suppressParent: All. This matches PrivateAssets="all", so the package doesn't flow to referencing projects.
Release: the item is excluded by the Optimize != true condition, before the AvailableSince/UNOB0028 path.
Not covered: generator output. The app has no MVUX model with feeds, so these builds don't show whether mocks get generated. That is still the open point from the real-app check above.
Activity
Xiaoy312 commentedon Oct 7, 2026
Plan
Updated after two review rounds and a real-app check. Status: PRs open: unoplatform/uno#25095 and unoplatform/uno.templates#2305.
Uno.HotTesting.Reactivejoins the existingExtensionsgroup, so it sharesUnoExtensionsVersion. The SDK references it implicitly withUnoFeatures=MVUX, only whenOptimizeisn't true (Debug, by default), the same wayUno.UI.HotDesignis gated. That follows the HotTesting spec: the mocking package is dev/test-only and should never be referenced by a published app.The Uno.Templates updater never adds packages to a group that already exists, so this takes two PRs.
1. unoplatform/uno — branch
dev/xygu/20261007/sdk-mvux-bundle-hottestingsrc/Uno.Sdk/packages.json,Extensionsgroup:7.3.0-dev.102→7.4.0-dev.81;Uno.HotTesting.Reactiveas the last entry.src/Uno.Sdk/targets/Uno.Extensions.Implicit.Packages.ProjectSystem.targets,mvuxItemGroup:<_UnoProjectSystemPackageReference Include="Uno.HotTesting.Reactive" ProjectSystem="true" PrivateAssets="all" AvailableSince="7.4" Condition=" '$(Optimize)' != 'true' AND '$(UnoDisableHotTesting)' != 'true' " />PrivateAssets="all": the package doesn't flow to projects that reference yours, nor into the nuspec of a library packed in Debug.UnoDisableHotTesting: an opt-out, registered in the buildschema.AvailableSince: honored byImplicitPackagesResolver. The package is skipped, with the new messageUNOB0028, when the Extensions version is older than 7.4, is a floating version or a range, or has no entry in the manifest. In that last case it is skipped rather than fetched from nuget.org, so the two PRs can land in either order.using-the-uno-sdk.md, a migration row inmigrating-to-uno-7.md, andUNOB0028in the build error codes.Optimize=true, the opt-out, old, floating and range versions, and a missing manifest entry all leave it out.build -c Release --no-restoreon an app: fails fast withUNOB0019, the existing DevServer guard.7.4.0-dev.81is the newest build whose dependencies (Uno.WinUI 6.8, Toolkit 8.4, Markup 5.3) stay within uno's current Toolkit and C# Markup pins. All 24 group packages plus HotTesting are published at that version.2. unoplatform/uno.templates — branch
dev/xygu/20261007/sdk-mvux-bundle-hottestingsrc/Uno.Sdk/packages.json: appendUno.HotTesting.Reactiveas the last entry ofExtensions. It goes last so thatUno.Extensions.Authentication.WinUIstays the package the updater uses to detect the version. The version stays at8.0.0-dev.72, which already includes HotTesting.src/Uno.Sdk/ReadMe.md.build/Verify-NuGetDependenciesOnNuGetOrg.ps1 -ManifestPath src/Uno.Sdk/packages.jsonpasses, and the ReadMe copy matchespackages.json;Uno.Sdk.Privatepast the uno change.Order: either PR can merge first. Until both are in, MVUX Debug builds skip HotTesting with
UNOB0028instead of failing.No
release/stable/*backports: HotTesting has no stable build yet.uno.extensions follow-ups are in the comments below.
Xiaoy312 commentedon Oct 7, 2026
Follow-ups for uno.extensions (from the review of the uno SDK change)
The uno side now references
Uno.HotTesting.ReactiveforUnoFeatures=MVUXwhenOptimizeisn't true, withPrivateAssets="all", anUnoDisableHotTestingopt-out, and a skip whenUnoExtensionsVersionis older than 7.4. Because of that, the package's generator now runs in every Debug build of an MVUX project, class libraries included. The items below can only be fixed here.Generator (
src/Uno.HotTesting.Reactive.Generator/FeedsMockGenerator.cs)ISourceGeneratorwith no cancellation.Executereruns over the whole compilation on every design-time compile and every Hot Reload delta. The "Reactive not referenced" early exit never fires in an MVUX project. Port it toIIncrementalGenerator, or at least callThrowIfCancellationRequestedwhile walking types and models. MVUX's ownFeedsGeneratorhas the same shape, so this adds a second full pass.GetAttributes()on every type. A syntax pre-filter plus a single walk would keep the cost flat for apps with few or no models.IsAlreadyDeclaredlooks up every model in everycompilation.References. It doesn't use theMayDeclareModelsfilter used elsewhere, so the cost is models × references on every run.Diagnostics
MOCK0001andMOCK0003areWarning. Apps that never asked for mocking now get them in Debug only. UnderTreatWarningsAsErrorsthat means a Debug-only build break, while Release still passes. ConsiderInfo, or reporting only when the project actually uses mocking.Generated surface
{Model}Mock,CreateandSetMockarepublicfor public models. In an MVUX class library they become public API in Debug and are missing in Release. Consider generating theminternal, or only when the project opts into mocking explicitly.Release train
Uno.HotTesting.Reactiveyet. Users who pinUnoExtensionsVersionto a stable 7.x won't get it: the SDK skips it below 7.4. It needs to be in the 7.4 stable, with the HotTesting fixes backported.Docs (
doc/Reference/Reactive/testing.md)#if DEBUG).ProjectReferenceto the app, so they need their ownPackageReference.Open question
PrivateAssets="all", and test projects typically don't setUnoFeatures=MVUX. In practice it serves Hot Design previews and the single-project path (D13). Can you confirm that's the intended scope of "bundle with MVUX"?Xiaoy312 commentedon Oct 7, 2026
More uno.extensions follow-ups (second review round + real-app check)
Real-app check. I generated a recommended MVUX app (
dotnet new unoapp -preset recommended -presentation mvux, Uno.Sdk 6.8.0-dev.51,UnoExtensionsVersion7.4.0-dev.81). I addedUno.HotTesting.Reactive7.4.0-dev.81 the way the SDK change will, and addedIState<int>andIFeed<string>members toMainModel.FeedsMockGeneratorloads and runs (~5 ms withReportAnalyzer), but it emits no source and no diagnostics.Uno.HotTesting.Reactive.Spec 013 (D13) says a single-project app that references the package directly gets mocks from source analysis. Either that path doesn't trigger for the template's
MainModel, or it needs something the template doesn't have. Worth checking against servicing/7.4 and main.Mocks generated in the app vs. in a test project.
IsAlreadyDeclaredskips any mock that a referenced assembly already declares. Once every MVUX app generates mocks in Debug, a test project that references the app will reuse the app's mocks instead of generating its own.internalmodels also stay inaccessible to the test project withoutInternalsVisibleTo.Uno.HotTesting.Reactivereference. On the SDK side, the docs now say to match the app's Uno.Extensions version.What the SDK now does, for reference:
UNOB0028, when the Extensions version is older than 7.4, is a floating version or a range, or is missing from the manifest.PrivateAssets="all".UnoDisableHotTestingturns it off.feat(sdk): Bundle Uno.HotTesting.Reactive with MVUX
feat(sdk): Add HotTesting opt-out, version floor and asset guard
fix(sdk): Skip HotTesting when its Extensions version can't ship it
Xiaoy312 commentedon Oct 8, 2026
our uno.templates changes pr isnt necessary, we are waiting for routine bot pr to sync it naturally instead. (otherwise, it will overwrite our pr)
keeping that open as an "item/reminder" to check back later
see unoplatform/uno.templates#2305 (comment) regarding what we are waiting for
Xiaoy312 commentedon Oct 9, 2026
last piece(hot-testing id entry) of the puzzle is completed in unoplatform/uno.templates#2310
Xiaoy312 commentedon Oct 9, 2026
Verification: Debug vs. Release with Uno.Sdk 7.0.0-dev.54
I built a desktop app with
UnoFeatures=MVUX;SkiaRenderer, pinned toUno.Sdk7.0.0-dev.54in both Debug and Release. Both built with 0 warnings and 0 errors.obj/project.assets.jsonUno.HotTesting.Reactive/8.0.0-dev.76Uno.HotTesting.Reactive.Generator.dll)Uno.HotTesting.Reactive.dllinbin/.deps.jsonentryUno.HotTesting.Reactiveas the last entry of theExtensionsgroup, at8.0.0-dev.76. That is the version Debug resolves.autoReferenced: true,suppressParent: All. This matchesPrivateAssets="all", so the package doesn't flow to referencing projects.Optimize != truecondition, before theAvailableSince/UNOB0028path.feat(sdk): Bundle Uno.HotTesting.Reactive with MVUX
feat(sdk): Add HotTesting opt-out, version floor and asset guard
fix(sdk): Skip HotTesting when its Extensions version can't ship it