You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ngc watch is not incremental, runs full build #21361
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
To compile my project it takes 11 seconds for tsc (typescript@2.6), however ngc takes 25 seconds.
The watch mode is similar 3 seconds versus 10+ for a single file (component) change.
Is there a way to debug the problem or is this the desired behavior.
Expected behavior
The durations should be close
Environment
Angular version: 5.2.0-rc0
TypeScript version (both global and project): 2.6
For Tooling issues:
- Node version: 8.9.3 and 9.3.0
- Platform: Both Windows and the Linux subsystem (Ubuntu)
tsconfig:
{
"compilerOptions": {
"target": "ES2017",
"module": "ES2015",
"moduleResolution": "node",
"sourceMap": false,
"importHelpers": true,
"emitDecoratorMetadata": false,
"experimentalDecorators": true,
"lib": [
"es2015",
"dom",
"es2017.object"
],
"noImplicitAny": false,
"isolatedModules": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"allowJs": true,
"skipLibCheck": true,
"outDir": "../../compiled",
"typeRoots": [
"../../node_modules/@types/"
]
},
"files": [
"./app.module.ts"
],
"include": [
"../../../../types/models/*.d.ts"
],
"exclude": [
"../../generated/**",
"../../compiled/**",
"../../node_modules/**"
]
}
Reacted by Nicolas HENRY, Tamás Koczka and Rongduan Zhu
This is not something what should happen in open source. Maintaining code quality and having strategic goals in development is one thing, the intentional total lack of communication is an other. Not just not being able to fix a clear typo affecting the only compiler feature mentioned in Angular 5's release blog post (in 6 months!), but ignoring a contributors very first PR. This is not welcoming or inclusive. Better I stick to MS+FB+other open source projects, but not Google's next time.
I really appreciate your hard work, the amount of expertise and work you share is wonderful and unique. You really help everybody. It's just not the open source project I expected it to be.
angular-cli or @ngtools/webpack doesn't rely on this code, so I guess ngc --watch is kind of in a blind spot.
They have written off this compiler already as they write a new compiler (ivy) that can run file2file instead of managing the hole project. At least they have to if they want to leverage the power of bazel.
Lets hope ivy works just like typescript. Can compile file by file and run diagnostics in a separate thread. So compile time comes done to milliseconds instead of seconds.
Activity
alippai commentedon Jan 7, 2018
The same file & options:
alippai commentedon Jan 7, 2018
There is one bug at least, the watch mode is broken in the last releases:
angular/packages/compiler-cli/src/perform_watch.ts
Lines 195 to 205 in 83d207d
The oldProgram option is always undefined.
alippai commentedon Jan 7, 2018
After the fix, it's definitely better.
...still fishy, 200 files changed by changing only 1 angular component:
alippai commentedon Jan 7, 2018
3rd and 4th runs are better, but still slow:
alippai commentedon Jan 8, 2018
The last change results in smaller generated code, which is unexpected for me. @IgorMinar or @tbosch who is familiar with this piece of code?
[-]TSC is faster than NGC[/-][+]ngc watch is not incremental, runs full build[/+]11 remaining items
fix(compiler-cli): return oldTsProgram while compiling
alippai commentedon May 31, 2018
@IgorMinar any updates? One of the two PRs is a single word typo, helps to make the watch a magnitude faster.
alippai commentedon Jun 16, 2018
This is not something what should happen in open source. Maintaining code quality and having strategic goals in development is one thing, the intentional total lack of communication is an other. Not just not being able to fix a clear typo affecting the only compiler feature mentioned in Angular 5's release blog post (in 6 months!), but ignoring a contributors very first PR. This is not welcoming or inclusive. Better I stick to MS+FB+other open source projects, but not Google's next time.
I really appreciate your hard work, the amount of expertise and work you share is wonderful and unique. You really help everybody. It's just not the open source project I expected it to be.
fix(compiler-cli): use the oldProgram option in watch mode
fix(compiler-cli): use the oldProgram option in watch mode (#21364)
sod commentedon Aug 20, 2018
angular-cli or @ngtools/webpack doesn't rely on this code, so I guess
ngc --watchis kind of in a blind spot.They have written off this compiler already as they write a new compiler (ivy) that can run file2file instead of managing the hole project. At least they have to if they want to leverage the power of bazel.
Lets hope ivy works just like typescript. Can compile file by file and run diagnostics in a separate thread. So compile time comes done to milliseconds instead of seconds.
alxhub commentedon May 28, 2020
Closing as fixed. @alippai's fix was merged in c6e5b97.
angular-automatic-lock-bot commentedon Jun 29, 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.