Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): add missing info about a component in the "pipe could not be found" error message #44081

Conversation

rohan-pednekar
Copy link
Contributor

@rohan-pednekar rohan-pednekar commented Nov 5, 2021

Add error handling for pipe with component class name in which it has a problem. Add it in ngDevMode, so that it will be a tree-shake away from the production bundle.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: 43855

What is the new behavior?

Before

Currently Angular throws the following error message at runtime when a pipe can not be found. However there is no information on which component has this problem, which makes debugging harder.

The pipe 'testMissingPipe' could not be found!

After

Add error message for pipe with component class name in which it has a problem.

The pipe 'testMissingPipe' could not be found  in the 'TestComponent' component!

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@AndrewKushnir AndrewKushnir self-assigned this Nov 5, 2021
Copy link
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.

@rohan-pednekar thanks for creating this PR! Please see comments below.

packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/test/acceptance/pipe_spec.ts Outdated Show resolved Hide resolved
packages/core/src/render3/pipe.ts Show resolved Hide resolved
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime core: di hotlist: error messages labels Nov 5, 2021
@ngbot ngbot bot modified the milestone: Backlog Nov 5, 2021
@AndrewKushnir AndrewKushnir added the target: minor This PR is targeted for the next minor release label Nov 5, 2021
Copy link
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.

Thanks for the updates @rohan-pednekar. The changes look good and we are very close to landing this PR! There are few remaining items:

  • I've left a comment to move a whitespace in the error message, please have a look
  • We'd need all commits to be merged into one and let's call it fix(core): add missing info about a component in the "pipe could not be found" error message instead of feat(core): ...
  • The "lint" CI job indicates that one of the files requires formatting. Could you please rebase this PR on top of the latest master and run the command from the "lint" CI job?
  • The legacy-unit-tests-saucelabs fails for unrelated reasons: it uses old JIT compiler, thus the error message is different. We are working on fixing that, so there are no extra fixes are needed in this PR to solve that.

Thank you.

packages/core/src/render3/pipe.ts Outdated Show resolved Hide resolved
@rohan-pednekar
Copy link
Contributor Author

Thanks for the updates @rohan-pednekar. The changes look good and we are very close to landing this PR! There are few remaining items:

  • I've left a comment to move a whitespace in the error message, please have a look
  • We'd need all commits to be merged into one and let's call it fix(core): add missing info about a component in the "pipe could not be found" error message instead of feat(core): ...
  • The "lint" CI job indicates that one of the files requires formatting. Could you please rebase this PR on top of the latest master and run the command from the "lint" CI job?
  • The legacy-unit-tests-saucelabs fails for unrelated reasons: it uses old JIT compiler, thus the error message is different. We are working on fixing that, so there are no extra fixes are needed in this PR to solve that.

Thank you.

Sure. I'll add all the suggested changes. Thank you @AndrewKushnir

@rohan-pednekar rohan-pednekar changed the title feat(core): improve the pipe could not be found error message fix(core): add missing info about a component in the "pipe could not be found" error message Nov 14, 2021
@AndrewKushnir
Copy link
Contributor

FYI this PR is blocked by #43884 (the lagacy-unit-tests-saucelabs is failing due to VE vs Ivy error message format).

@AndrewKushnir AndrewKushnir added state: blocked target: patch This PR is targeted for the next patch release and removed target: minor This PR is targeted for the next minor release labels Nov 16, 2021
Copy link
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.

@rohan-pednekar thanks for the updates, the changes look good 👍

I've started tests in Google's codebase and will let you know if there are any issues.

@AndrewKushnir AndrewKushnir added the action: presubmit The PR is in need of a google3 presubmit label Nov 16, 2021
@rohan-pednekar
Copy link
Contributor Author

@rohan-pednekar thanks for the updates, the changes look good 👍

I've started tests in Google's codebase and will let you know if there are any issues.

Thank you @AndrewKushnir

…be found" error message

Add error handling for pipe with component class name in which it has a problem. Add it in ngDevMode, so that it will be a tree-shake away from the production bundle.
@AndrewKushnir
Copy link
Contributor

@rohan-pednekar FYI, this PR is now unblocked (after landing #43884) and I've rebased it on top of the most recent version of the master branch. The tests in Google's codebase went well, so the only remaining step is to get one more review. I will take care of it and let you know. Thank you.

@rohan-pednekar
Copy link
Contributor Author

@rohan-pednekar FYI, this PR is now unblocked (after landing #43884) and I've rebased it on top of the most recent version of the master branch. The tests in Google's codebase went well, so the only remaining step is to get one more review. I will take care of it and let you know. Thank you.

Sure. Thank you @AndrewKushnir 👍😊

Copy link
Contributor

@jessicajaniuk jessicajaniuk left a comment

Choose a reason for hiding this comment

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

LGTM 🍪

@jessicajaniuk jessicajaniuk removed action: review The PR is still awaiting reviews from at least one requested reviewer action: presubmit The PR is in need of a google3 presubmit labels Nov 24, 2021
@AndrewKushnir AndrewKushnir added the action: merge The PR is ready for merge by the caretaker label Nov 24, 2021
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit b06e398.

jessicajaniuk pushed a commit that referenced this pull request Nov 24, 2021
…be found" error message (#44081)

Add error handling for pipe with component class name in which it has a problem. Add it in ngDevMode, so that it will be a tree-shake away from the production bundle.

PR Close #44081
@AndrewKushnir
Copy link
Contributor

@rohan-pednekar just want to let you know that your PR was merged and the change will be available as a part of the v13.0.3 release (likely next week). Thanks for contributing to Angular! 👍

@rohan-pednekar
Copy link
Contributor Author

@rohan-pednekar just want to let you know that your PR was merged and the change will be available as a part of the v13.0.3 release (likely next week). Thanks for contributing to Angular! 👍

Wow! 😍 Without your help and support, this would not have been possible. Thank you once again @AndrewKushnir ❤.

@rohan-pednekar
Copy link
Contributor Author

Also thanks to @jessicajaniuk, @splincode 👍😊

@angular-automatic-lock-bot
Copy link

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 Dec 26, 2021
dimakuba pushed a commit to dimakuba/angular that referenced this pull request Dec 28, 2021
…be found" error message (angular#44081)

Add error handling for pipe with component class name in which it has a problem. Add it in ngDevMode, so that it will be a tree-shake away from the production bundle.

PR Close angular#44081
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 cla: yes core: di hotlist: error messages target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants