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

Missing pipe not caught by production build with AOT #38195

Closed
1 of 15 tasks
lukebellamy053 opened this issue Jul 23, 2020 · 4 comments
Closed
1 of 15 tasks

Missing pipe not caught by production build with AOT #38195

lukebellamy053 opened this issue Jul 23, 2020 · 4 comments
Labels
area: compiler Issues related to `ngc`, Angular's template compiler P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR type: bug/fix
Milestone

Comments

@lukebellamy053
Copy link

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

I have a module with a view that includes a pipe from a library.
The library was not imported into this module and thus the pipe is not included in the module.
IntelliJ correctly flags the missing pipe but the Angular build process (even when AOT is enabled) does not find this problem

The same issue occurs when referencing a pipe that doesn't even exist at all, the builder never shows any warnings or errors

image
The above image shows the app component including a pipe that does not exist. The pipe is highlighted red as IntelliJ recognizes the pipe has not been imported. The terminal below shows a successful production build of the project including the missing pipe. I would expect the build to fail

The example above and the repo below are both built using Nrwl NX but the same issue can be found with a regular Angular project

🔬 Minimal Reproduction

Check out the following repo: https://github.com/lukebellamy053/angular-pipe-error-example
Build either of the applications, both should fail as the pipe is either not imported or just doesn't exist but the build passes in both cases

🔥 Exception or Error

There isn't one but there should be

@JoostK
Copy link
Member

JoostK commented Jul 23, 2020

Interesting, thanks for reporting. This should typically be flagged as an error, some investigation is needed to figure out why this doesn't happen here.

@JoostK JoostK transferred this issue from angular/angular-cli Jul 23, 2020
@JoostK JoostK added the area: compiler Issues related to `ngc`, Angular's template compiler label Jul 23, 2020
@ngbot ngbot bot added this to the needsTriage milestone Jul 23, 2020
@lukebellamy053
Copy link
Author

@JoostK Looks like this is also the case with missing components as well

@JoostK JoostK added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent type: bug/fix labels Oct 17, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Oct 17, 2020
JoostK added a commit to JoostK/angular that referenced this issue Oct 17, 2020
…is disabled

Even if `fullTemplateTypeCheck` is disabled should missing pipes still
be reported, as was the case in View Engine.

Fixes angular#38195
@JoostK
Copy link
Member

JoostK commented Oct 17, 2020

Alright, it turns out that pipes are not reported as missing when fullTemplateTypeCheck is disabled/not set. I opened #39320 to address that, but it will continue to suffer from #36171.

JoostK added a commit to JoostK/angular that referenced this issue Oct 17, 2020
…is disabled

Even if `fullTemplateTypeCheck` is disabled should missing pipes still
be reported, as was the case in View Engine.

Fixes angular#38195
josephperrott pushed a commit that referenced this issue Oct 31, 2020
…is disabled (#39320)

Even if `fullTemplateTypeCheck` is disabled should missing pipes still
be reported, as was the case in View Engine.

Fixes #38195

PR Close #39320
josephperrott pushed a commit that referenced this issue Oct 31, 2020
…is disabled (#39320)

Even if `fullTemplateTypeCheck` is disabled should missing pipes still
be reported, as was the case in View Engine.

Fixes #38195

PR Close #39320
@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 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: compiler Issues related to `ngc`, Angular's template compiler P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent state: has PR type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants