Skip to content

refactor(core): log a warning instead of throwing error on `OutputRef…#60293

Closed
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:output-emit-warning
Closed

refactor(core): log a warning instead of throwing error on `OutputRef…#60293
JeanMeche wants to merge 1 commit intoangular:mainfrom
JeanMeche:output-emit-warning

Conversation

@JeanMeche
Copy link
Copy Markdown
Member

….emit` when the directive is destroyed.

This should not be a hard error, as nothing bad happens but the users should be warned that no event will be emitted.

fixes #60110

@pullapprove pullapprove bot requested a review from kirjs March 9, 2025 15:05
@angular-robot angular-robot bot added the area: core Issues related to the framework runtime label Mar 9, 2025
@ngbot ngbot bot added this to the Backlog milestone Mar 9, 2025
….emit` when the directive is destroyed.

This should not be a hard error, as nothing bad happens but the users should be warned that no event will be emitted.

fixes angular#60110
@JeanMeche JeanMeche force-pushed the output-emit-warning branch from a79be56 to 780593e Compare March 9, 2025 15:39
@JeanMeche JeanMeche requested review from devversion and removed request for kirjs March 9, 2025 15:39
'Unexpected emit for destroyed `OutputRef`. ' +
'The owning directive/component is destroyed.',
console.warn(
formatRuntimeError(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you know if this will still print/expose a stack somehow?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You got me doubting. Yes the stacktrace is accessible for console warnings.

image

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Mar 9, 2025
@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Mar 10, 2025
@AndrewKushnir
Copy link
Copy Markdown
Contributor

Presubmit.

@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Mar 10, 2025
@AndrewKushnir
Copy link
Copy Markdown
Contributor

Caretaker note: the presubmit is "green" (only unrelated failures).

@AndrewKushnir
Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit e3afa24.

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

AndrewKushnir pushed a commit that referenced this pull request Mar 10, 2025
….emit` when the directive is destroyed. (#60293)

This should not be a hard error, as nothing bad happens but the users should be warned that no event will be emitted.

fixes #60110

PR Close #60293
@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 Apr 10, 2025
@JeanMeche JeanMeche deleted the output-emit-warning branch July 23, 2025 13:21
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: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NG0953 is an undocumented breaking behavior should be made optional

3 participants