Skip to content

Missing pipe not caught by production build with AOT #38195

Closed

Description

@lukebellamy053

🐞 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

Activity

  1. JoostK commented on Jul 23, 2020

    @JoostK
    Member

    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.

  2. transferred this issue fromangular/angular-clion Jul 23, 2020
  3. added
    area: compilerIssues related to `ngc`, Angular's template compiler
    on Jul 23, 2020
  4. added this to the needsTriage milestone on Jul 23, 2020
  5. lukebellamy053 commented on Jul 29, 2020

    @lukebellamy053
    Author

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

  6. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Oct 17, 2020
  7. modified the milestones: needsTriage, Backlog on Oct 17, 2020
  8. JoostK commented on Oct 17, 2020

    @JoostK
    Member

    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.

  9. added a commit that references this issue on Oct 17, 2020
    c4d950c
  10. added 2 commits that reference this issue on Oct 31, 2020
    71d0063
    67ea7b6
  11. angular-automatic-lock-bot commented on Dec 1, 2020

    @angular-automatic-lock-bot

    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.

  12. locked and limited conversation to collaborators on Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: compilerIssues related to `ngc`, Angular's template compilerstate: has PRtype: bug/fix

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions