X Tutup
The Wayback Machine - https://web.archive.org/web/20220309171913/https://github.com/angular/angular/pull/44081
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

@google-cla google-cla bot added the cla: yes label Nov 5, 2021
@pullapprove pullapprove bot requested a review from jessicajaniuk Nov 5, 2021
@AndrewKushnir AndrewKushnir self-assigned this Nov 5, 2021
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

@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
Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

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

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

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 force-pushed the 43855-improve-pipe-error-message branch from b1e3ce2 to c66b3c7 Nov 14, 2021
@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

@AndrewKushnir AndrewKushnir commented Nov 16, 2021

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

Copy link
Contributor

@AndrewKushnir AndrewKushnir left a comment

@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.

@rohan-pednekar
Copy link
Contributor Author

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

@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 AndrewKushnir force-pushed the 43855-improve-pipe-error-message branch from c66b3c7 to 32fc310 Nov 24, 2021
@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Nov 24, 2021

@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 rohan-pednekar commented Nov 24, 2021

@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

LGTM 🍪

@jessicajaniuk
Copy link
Contributor

@jessicajaniuk jessicajaniuk commented Nov 24, 2021

This PR was merged into the repository by commit b06e398.

jessicajaniuk added a commit that referenced this issue 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

@AndrewKushnir AndrewKushnir commented Nov 24, 2021

@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 rohan-pednekar commented Nov 25, 2021

@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

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

Also thanks to @jessicajaniuk, @splincode 👍😊

@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Dec 26, 2021

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 added a commit to dimakuba/angular that referenced this issue 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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
X Tutup