GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — AngularCompiler marks not related files as affected in incremental build · Issue #21591 · angular/angular-cli

AngularCompiler marks not related files as affected in incremental build #21591

New issue
Copy link
New issue
Copy link
Open
Open
AngularCompiler marks not related files as affected in incremental build#21591
Copy link
Labels
area: @ngtools/webpackfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity4: memory/performancetype: bug/fix
Milestone
Backlog

Description

@SebastianPodgajny
SebastianPodgajny
opened on Aug 17, 2021
Issue body actions

Which @angular/* package(s) are the source of the bug?

compiler-cli

Is this a regression?

No

Description

Any change in main.ts/m1.ts/m2.ts eg changing console.log(1) to console.log(2) will cause src/lib/types.ts to be included in affectedFiles (checked here https://github.com/angular/angular-cli/blob/master/packages/ngtools/webpack/src/ivy/plugin.ts#L569)

Looks like type only file is not included in ignoreForEmit Set nor included in emitted files so IncrementalCompilation can't find it previously emitted files and marks it as affected every time

Please provide a link to a minimal reproduction of the bug

https://github.com/SebastianPodgajny/ng42543/tree/affected-type-repro

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in

Angular CLI: 12.2.1
Node: 14.16.1
Package Manager: yarn 1.21.1
OS: darwin x64

Angular: 12.2.1
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1202.1
@angular-devkit/build-angular   12.2.1
@angular-devkit/core            12.2.1
@angular-devkit/schematics      12.2.1
@schematics/angular             12.2.1
rxjs                            6.6.7
typescript                      4.3.5

Anything else?

This is followup to this issue angular/angular#42543 which was partially resolved by JoostK PR angular/angular#42759

Reacted by Adam Zerek

Activity

  1. JoostK
    transferred this issue fromangular/angularon Aug 17, 2021
  2. JoostK commented on Aug 17, 2021

    @JoostK
    JoostK
    on Aug 17, 2021
    Member
    More actions

    Moving to the CLI as it's managing the emission set by itself, so the Angular compiler is not at play here.

    It seems like Webpack never requests that module, so it is in fact never emitted.

  3. alan-agius4
    added
    area: @ngtools/webpack
    freq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarely
    severity4: memory/performance
    type: bug/fix
    on Aug 18, 2021
  4. ngbot
    modified the milestone: Backlog on Aug 18, 2021
  5. alan-agius4 commented on Jan 11, 2022

    @alan-agius4
    alan-agius4
    on Jan 11, 2022
    Collaborator
    More actions

    Had a look at this.

    Webpack will not request the module since the import for the type-only file is dropped when TS is transpiled to JS.

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

    area: @ngtools/webpackfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity4: memory/performancetype: bug/fix

    Type

    No type

    Projects

    No projects

      Milestone

      • BacklogNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.