X Tutup
The Wayback Machine - https://web.archive.org/web/20211020063205/https://github.com/angular/angular/issues/38195
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 鈥淪ign up for GitHub鈥, you agree to our terms of service and privacy statement. We鈥檒l 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

Comments

@lukebellamy053
Copy link

@lukebellamy053 lukebellamy053 commented Jul 23, 2020

馃悶 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 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
@ngbot ngbot bot added this to the needsTriage milestone Jul 23, 2020
@lukebellamy053
Copy link
Author

@lukebellamy053 lukebellamy053 commented Jul 29, 2020

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

@ngbot ngbot bot removed this from the needsTriage milestone Oct 17, 2020
@ngbot ngbot bot added this to the Backlog milestone Oct 17, 2020
JoostK added a commit to JoostK/angular that referenced this issue Oct 17, 2020
鈥s 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 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
鈥s disabled

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

Fixes angular#38195
josephperrott added a commit that referenced this issue Oct 31, 2020
鈥s 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 added a commit that referenced this issue Oct 31, 2020
鈥s 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

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Dec 1, 2020

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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
X Tutup