Skip to content

fix(reactive): enable MVUX hot reload on Android - #3235

Merged
kazo0 merged 1 commit into
mainfrom
dev/sb/mvux-hr-android-entry-assembly
Oct 15, 2026
Merged

kazo0 merged 1 commit into
mainfrom
dev/sb/mvux-hr-android-entry-assembly

Conversation

@kazo0

@kazo0 kazo0 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

GitHub Issue (If applicable): related to unoplatform/uno#25417 (not auto-closing: the fix is validated on an emulator, but not against the reporter's app)

PR Type

  • Bugfix

What is the current behavior?

On Android, C# edits to an MVUX model are reported as applied by Hot Reload but have no effect; the app keeps running the old code (unoplatform/uno#25417).

ModuleFeedConfiguration.ConfigureHotReload only applies the generated module initializer's setting when the module matches Assembly.GetEntryAssembly(). On Android (MonoVM and CoreCLR) that returns null (also documented in PlatformHelper.GetAppAssembly), so no module ever matches and FeedConfiguration.EffectiveHotReload stays Disabled. The delta does reach the runtime (the MainModel#1 shadow type shows up in the navigation warning), but BindableViewModelBase.HotPatch exits early and only logs at Info level, so nothing is swapped and nothing visible is logged.

On desktop the count resetting to 0 after an edit is the MVUX model swap (fresh Count state on the new MainModel#1 instance), not a page recreation.

What is the new behavior?

  • When there is no entry assembly, the first module to call ConfigureHotReload is taken as the app (claimed atomically). The app's module initializer runs before any code of the libraries it references.
  • A model update arriving while MVUX hot reload is disabled is now logged as a Warning naming the model type, instead of a silent Info message.
  • The "already configured by another module" message, which was wrong when nothing had configured it, now says the module isn't the application module.

PR Checklist

  • Tested code with current supported SDKs: Uno.Extensions.Reactive.Tests in Release, 1490 passed / 19 skipped (pre-existing); Reactive builds warning-free
  • Docs have been added/updated: N/A (internal behavior)
  • Unit Tests for the changes have been added: Given_ModuleFeedConfiguration (When_EntryAssemblyKnown_Then_OnlyMatchingModuleIsApp, When_NoEntryAssembly_Then_FirstModuleIsApp). The second fails against the previous logic and passes with the fix.
  • Wasm UI Tests: N/A
  • Contains NO breaking changes: the new IsAppModule helper is internal
  • Updated the Release Notes
  • Associated with an issue

Other information

🤖 Generated with Claude Code

https://claude.ai/code/session_01RANiUytmxJBFCkZycSG3TE

- `Assembly.GetEntryAssembly()` is null on Android (MonoVM and CoreCLR), so no module matched and MVUX hot reload stayed disabled: model edits were applied to the runtime but never hot-patched into the bindables
- When there is no entry assembly, take the first module to configure as the app (its module initializer runs before any referenced library code)
- Log a warning instead of an info message when a model update arrives while MVUX hot reload is disabled
- Fix the misleading "already configured by another module" message

Refs unoplatform/uno#25417

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RANiUytmxJBFCkZycSG3TE
@kazo0

kazo0 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

Hold before merging: possible iOS regression.

CI on the mobile hot-reload lanes (#3238), combined with this PR in draft #3239:

  • Android: this fixes the 5 MVUX hot-reload tests (9/14 → 14/14 locally, 5 → 0 MVUX failures on CI), as intended.
  • iOS simulator: with this PR, the test app hung in 2 of 2 runs. It never completes the DevServer handshake and no test runs. Without it, the app completes in 3 of 3 runs.

Since this PR only changes behavior when Assembly.GetEntryAssembly() is null, this suggests iOS has no entry assembly either, and that enabling MVUX hot reload there triggers a hang. Details and next steps: #3240.

Suggest not merging until #3240 explains the iOS hang, or narrowing this change to Android until then.

@kazo0

kazo0 commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

#3238 now excludes the five MVUX hot-reload tests on Android under this PR, so the lanes can merge first. When this PR lands, remove the five & !When_... entries from AndroidTestFilters in build/ci/stage-runtime-tests-mobile-hotreload.yml so the Android lane covers them. iOS is tracked in #3240.

@mergify

mergify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@kazo0
kazo0 merged commit e059b8d into main Oct 15, 2026
22 of 23 checks passed
@kazo0
kazo0 deleted the dev/sb/mvux-hr-android-entry-assembly branch October 15, 2026 16:20
kazo0 added a commit that referenced this pull request Oct 15, 2026
- Root cause of the 5 iOS failures (#3240): on iOS/Mono, Assembly.GetEntryAssembly() is null until Main starts, so ModuleFeedConfiguration captured null inside the app's module initializer and MVUX hot reload stayed disabled
- #3235's first-caller rule already handles it (the app's module initializer runs before Main, ahead of every library); document iOS next to Android in ModuleFeedConfiguration, its test and PlatformHelper
- Remove the five #3240 exclusions from IosTestFilters (41/41 locally on an iOS 18.5 simulator)
- Call App.InitializeLogging() from the iOS and Android RuntimeTests heads, with Uno.Extensions.Reactive at Information, so mobile CI failures leave logs
- Add specs/016-ios-mvux-hr-entry-assembly/progress.md with the evidence

Refs #3240

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VZVenoDKLuwSmGT7wKNGSV
kazo0 added a commit that referenced this pull request Oct 15, 2026
- Root cause of the 5 iOS failures (#3240): on iOS/Mono, Assembly.GetEntryAssembly() is null until Main starts, so ModuleFeedConfiguration captured null inside the app's module initializer and MVUX hot reload stayed disabled
- #3235's first-caller rule already handles it (the app's module initializer runs before Main, ahead of every library); document iOS next to Android in ModuleFeedConfiguration, its test and PlatformHelper
- Remove the five #3240 exclusions from IosTestFilters (41/41 locally on an iOS 18.5 simulator)
- Call App.InitializeLogging() from the iOS and Android RuntimeTests heads, with Uno.Extensions.Reactive at Information, so mobile CI failures leave logs
- Add specs/016-ios-mvux-hr-entry-assembly/progress.md with the evidence

Refs #3240

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VZVenoDKLuwSmGT7wKNGSV
kazo0 added a commit that referenced this pull request Oct 15, 2026
- Root cause of the 5 iOS failures (#3240): on iOS/Mono, Assembly.GetEntryAssembly() is null until Main starts, so ModuleFeedConfiguration captured null inside the app's module initializer and MVUX hot reload stayed disabled
- #3235's first-caller rule already handles it (the app's module initializer runs before Main, ahead of every library); document iOS next to Android in ModuleFeedConfiguration, its test and PlatformHelper
- Remove the five #3240 exclusions from IosTestFilters (41/41 locally on an iOS 18.5 simulator)
- Call App.InitializeLogging() from the iOS and Android RuntimeTests heads, with Uno.Extensions.Reactive at Information, so mobile CI failures leave logs
- Add specs/016-ios-mvux-hr-entry-assembly/progress.md with the evidence

Refs #3240

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VZVenoDKLuwSmGT7wKNGSV
agneszitte added a commit that referenced this pull request Nov 3, 2026
- Backport of #3235 to servicing/7.4, applied without changes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
agneszitte added a commit that referenced this pull request Nov 3, 2026
…6.7-sr3

fix: get servicing/7.4 ready for 6.7 SR3 (backport #3228, #3231, #3235, #3249, #3254, #3259; Uno floor 6.7.65)
ehtick pushed a commit to ehtick/uno.extensions that referenced this pull request Nov 6, 2026
- Tag the diagnostics code block as text (MD040)
- Reword the line starting with "unoplatform#3235's" so it isn't parsed as a heading (MD018)
- Both fail the Markdown Validation stage for every PR built against main

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DfEL4A7BqL6zLvko22CdCA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run the hot-reload runtime tests on Android and iOS in CI

2 participants