Skip to content

refactor(platform-browser): drop BROWSER_MODULE_PROVIDERS_MARKER in production#59412

Closed
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:refactor/platform-browser-module-deps
Closed

refactor(platform-browser): drop BROWSER_MODULE_PROVIDERS_MARKER in production#59412
arturovt wants to merge 1 commit intoangular:mainfrom
arturovt:refactor/platform-browser-module-deps

Conversation

@arturovt
Copy link
Copy Markdown
Contributor

@arturovt arturovt commented Jan 7, 2025

In this commit, we switch from decorators (which also produce redundant metadata, such as in the declareFactory instruction) to the inject function to drop the BROWSER_MODULE_PROVIDERS_MARKER token in production. This token is actually provided only in development mode but is still referenced in the constructor due to the @Inject(BROWSER_MODULE_PROVIDERS_MARKER) decorator.

@pullapprove pullapprove bot requested a review from crisbeto January 7, 2025 17:21
@thePunderWoman thePunderWoman added the area: core Issues related to the framework runtime label Jan 7, 2025
@ngbot ngbot bot added this to the Backlog milestone Jan 7, 2025
@arturovt arturovt force-pushed the refactor/platform-browser-module-deps branch from 9ad7358 to 5951d8d Compare January 7, 2025 21:30
@angular-robot angular-robot bot removed the area: core Issues related to the framework runtime label Jan 7, 2025
@ngbot ngbot bot removed this from the Backlog milestone Jan 7, 2025
… production

In this commit, we switch from decorators (which also produce redundant metadata, such as in the
`declareFactory` instruction) to the `inject` function to drop the `BROWSER_MODULE_PROVIDERS_MARKER`
token in production. This token is actually provided only in development mode but is still
referenced in the constructor due to the `@Inject(BROWSER_MODULE_PROVIDERS_MARKER)` decorator.
@arturovt arturovt force-pushed the refactor/platform-browser-module-deps branch from 5951d8d to 42f78aa Compare January 7, 2025 21:59
@thePunderWoman thePunderWoman added the area: core Issues related to the framework runtime label Jan 7, 2025
@ngbot ngbot bot added this to the Backlog milestone Jan 7, 2025
@AndrewKushnir AndrewKushnir added target: patch This PR is targeted for the next patch release action: presubmit The PR is in need of a google3 presubmit labels Jan 8, 2025
@AndrewKushnir
Copy link
Copy Markdown
Contributor

Presubmit.

Copy link
Copy Markdown
Contributor

@AndrewKushnir AndrewKushnir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: public-api

This change affects the constructor signature of the BrowserModule class, but the change looks safe, since we do not support extensions of Angular-provided classes + we do not support instantiation of an NgModule via new.

Copy link
Copy Markdown
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@thePunderWoman thePunderWoman added area: platform-browser area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime area: platform-browser labels Jan 10, 2025
@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate and removed action: presubmit The PR is in need of a google3 presubmit target: patch This PR is targeted for the next patch release labels Jan 10, 2025
@AndrewKushnir AndrewKushnir removed the request for review from crisbeto January 10, 2025 16:37
@kirjs
Copy link
Copy Markdown
Contributor

kirjs commented Jan 10, 2025

This PR was merged into the repository by commit 17510be.

The changes were merged into the following branches: main, 19.1.x

kirjs pushed a commit that referenced this pull request Jan 10, 2025
… production (#59412)

In this commit, we switch from decorators (which also produce redundant metadata, such as in the
`declareFactory` instruction) to the `inject` function to drop the `BROWSER_MODULE_PROVIDERS_MARKER`
token in production. This token is actually provided only in development mode but is still
referenced in the constructor due to the `@Inject(BROWSER_MODULE_PROVIDERS_MARKER)` decorator.

PR Close #59412
@kirjs kirjs closed this in 17510be Jan 10, 2025
@arturovt arturovt deleted the refactor/platform-browser-module-deps branch January 10, 2025 17:04
PrajaktaB27 pushed a commit to PrajaktaB27/angular that referenced this pull request Feb 7, 2025
… production (angular#59412)

In this commit, we switch from decorators (which also produce redundant metadata, such as in the
`declareFactory` instruction) to the `inject` function to drop the `BROWSER_MODULE_PROVIDERS_MARKER`
token in production. This token is actually provided only in development mode but is still
referenced in the constructor due to the `@Inject(BROWSER_MODULE_PROVIDERS_MARKER)` decorator.

PR Close angular#59412
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: rc This PR is targeted for the next release-candidate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants