Skip to content

Conversation

atscott
Copy link
Contributor

@atscott atscott commented Aug 28, 2025

This updates the error thrown when both provideZoneChangeDetection and provideZonelessChangeDetection are both used in the application providers to be a warning instead. The reasons for this are twofold:

  1. The migration we need for using zoneless by default isn't perfect and may add provideZoneChangeDetection when the zoneless provider exists. This change will prevent that from causing an error
  2. There might be valid situations where a "default" is used in a common provider but that can be overridden by individal applications. In tests, we do allow this type of thing, where initTestEnvironment may have a default but individual tests might want to use a different one. The same logic might apply to applications in some environments.

@atscott atscott added the target: major This PR is targeted for the next major release label Aug 28, 2025
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Aug 28, 2025
@ngbot ngbot bot added this to the Backlog milestone Aug 28, 2025
This updates the error thrown when both `provideZoneChangeDetection` and
`provideZonelessChangeDetection` are both used in the application
providers to be a warning instead. The reasons for this are twofold:

1. The migration we need for using zoneless by default isn't perfect and
   may add `provideZoneChangeDetection` when the zoneless provider
   exists. This change will prevent that from causing an error
2. There might be valid situations where a "default" is used in a common
   provider but that can be overridden by individal applications. In
   tests, we do allow this type of thing, where `initTestEnvironment`
   may have a default but individual tests might want to use a different
   one. The same logic might apply to applications in some environments.
@atscott atscott force-pushed the warnonmultiplecdproviders branch from d043cdf to 2bf9861 Compare August 29, 2025 21:09
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants