Skip to content

Fixes Module Initialization Order#3387

Merged
brianlagunas merged 1 commit intomasterfrom
service-reg
Mar 28, 2026
Merged

Fixes Module Initialization Order#3387
brianlagunas merged 1 commit intomasterfrom
service-reg

Conversation

@brianlagunas
Copy link
Copy Markdown
Member

@brianlagunas brianlagunas commented Mar 28, 2026

Description of Change

This change reorders the application initialization process within PrismAppBuilder to ensure that module types can be properly resolved and their services are registered before other application initialization delegates run.

A new internal AddModuleCatalogAction method and an associated collection (_moduleCatalogActions) are introduced. Module catalog configuration, where users define their application's modules, now occurs in a dedicated "Phase 1". This precedes the actual module initialization ("Phase 2"), which registers services, and finally, the general application OnInitialized delegates ("Phase 3"). This guarantees that module services are available for resolution during later initialization steps.

Additionally, some minor changes include:

  • Removes the addition of KnownInternalParameters.NavigationMode when navigating to a TabbedPage.CurrentPage.
  • Removes Android-specific code that attempted to preserve SoftInputMode when replacing the Window.Page. This workaround is no longer necessary.

Bugs Fixed

API Changes

Added:

  • internal PrismAppBuilder AddModuleCatalogAction(Action action)

Behavioral Changes

The order of execution for module catalog configuration and application OnInitialized delegates has changed. Modules are now configured and initialized earlier in the lifecycle, ensuring that services registered within modules are available when other OnInitialized delegates are invoked. This should prevent service resolution errors related to module dependencies.

@brianlagunas brianlagunas merged commit e5e7a19 into master Mar 28, 2026
5 checks passed
@brianlagunas brianlagunas deleted the service-reg branch March 28, 2026 03:29
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.

1 participant