refactor(core): guards stringify calls with ngDevMode#66958
Merged
thePunderWoman merged 3 commits intoangular:mainfrom Feb 20, 2026
Merged
refactor(core): guards stringify calls with ngDevMode#66958thePunderWoman merged 3 commits intoangular:mainfrom
thePunderWoman merged 3 commits intoangular:mainfrom
Conversation
SkyZeroZx
commented
Feb 7, 2026
| } | ||
|
|
||
| return new R3Injector(providers, parent || getNullInjector(), name || null, scopes); | ||
| return new R3Injector(providers, parent || getNullInjector(), source || null, scopes); |
Contributor
Author
There was a problem hiding this comment.
This value, as I understand it, is only used in dev
angular/packages/core/src/di/r3_injector.ts
Lines 401 to 410 in 63d828a
SkyZeroZx
commented
Feb 7, 2026
| try { | ||
| if (record.value === CIRCULAR) { | ||
| throw cyclicDependencyError(stringify(token)); | ||
| throw cyclicDependencyError(ngDevMode ? stringify(token) : ''); |
Contributor
Author
There was a problem hiding this comment.
We have a similar case here; the value is only used for dev mode.
angular/packages/core/src/render3/errors_di.ts
Lines 24 to 27 in 63d828a
SkyZeroZx
commented
Feb 7, 2026
hovo333
reviewed
Feb 8, 2026
JeanMeche
reviewed
Feb 9, 2026
JeanMeche
reviewed
Feb 9, 2026
JeanMeche
approved these changes
Feb 19, 2026
Member
JeanMeche
left a comment
There was a problem hiding this comment.
That change looks mostly good to me.
Member
|
A rebase on main should "fix" the linting issue. |
The `stringify` function is only needed for debugging purposes and should not be called in production mode.
e06f4c2 to
81add45
Compare
Member
Member
|
caretaker note: The failed test is a known flake. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The
stringifyfunction is only needed for debugging purposes and should not be called in production mode.