-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Angular-cli doesn't watch for ALL files correctly. #7995
Comments
Here is the SAME application, but generated with latest Angular-cli (1.4.5 -> ng new blabla), the same problem.. Application data is not being watched. |
Might be related to: And: But i have found this: so it may be actually a problem. |
Closing this as duplicate of #7963 |
@hansl what? this is definitely not truth! my problem is connected to: is different. |
After investigating, you're correct in your assumption that it's not the same issue. The problem is 3 fold:
The only point where we actually have control is point 3 and we should look at dependencies inside TypeScript and tell webpack about TS's dependency graph. I'll come up with a fix soon. |
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes angular#7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes angular#7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes angular#7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes angular#7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes angular#7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes #7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes #7995.
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes #7995.
@hansl This fix slowed down my rebuild time exponentially. Where it usually takes 5 seconds, it takes 30-50 seconds now. I do understand that you can be more sure that things will be reanalysed now, because I also faced some issues sometimes when changing an interface for instance. But I rather have a fast rebuild, and for those rare cases a restart of Worth to mention that this rebuild is on a big application. |
@PierreDuc what versions of Angular and CLI are you using? It's definitely not intended that the rebuild times increase like that. |
@filipesilva I was using |
I'll take a look and try to get some numbers to benchmark. Thank you. |
I can definitely reproduce. In Angular.io it increased the JIT recompile time from 420ish to 2000ms (ng2/4) and 420 to 810 (ng5, we use a new compilation pipeline). |
Yes, looking forward to using ng5, unfortunately I have to wait. But good thing you can reproduce it. I'll wait patiently for a fix. Or perhaps as a long time user of your cli, it might be time to contribute something ;) |
I'm looking at it now myself, this is a pretty bad regression... we might have to revert this change if I can't come up with a fix. |
@PierreDuc are you on windows? I found a fix that seems to indicate this is a windows only issue. |
See angular#7995 (comment) for details. Fix regression introduced in angular#7998
#8023 is the fix I think. |
@filipesilva I'm indeed on windows. Is there a way for me to check this fix? And how come changing the path separator increases performance? Either way, thanks for the quick fix! |
Inside typescript, we always use You can test that fix by installing |
I figured that would be the way to test it, but I just couldn't find those lines of codes in there. I've cleared the npm cache now, removed |
Ok so I'm looking at the file online in https://unpkg.com/@ngtools/webpack@1.7.3/src/loader.js. You're right, it's quite different. We published stable ( What you want to change is:
This should be enough to test. |
Ah yes, of course. I forgot about the different versions. Anyways, the rebuild time went from 35 seconds to 3 seconds after applying your fix. Not entirely sure, but it 'seems' to fix it ;). Nice catch! |
Glad to hear this was it! |
See #7995 (comment) for details. Fix regression introduced in #7998
See #7995 (comment) for details. Fix regression introduced in #7998
See #7995 (comment) for details. Fix regression introduced in #7998
…endencies By default, Webpack only add dependencies it can see. Types or imports that are not kept in transpilations are removed, and webpack dont see them. By reading the AST directly we manually add the dependencies to webpack. Fixes angular#7995.
See angular#7995 (comment) for details. Fix regression introduced in angular#7998
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
@angular/cli: 1.4.2
node: 7.5.0
os: win32 x64
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.4.2
@angular/compiler-cli: 4.4.4
typescript: 2.2.2
Repro steps.
watch bug.zip
store.subscribe(x=> x.storeData = "pepa") but type of storeData has been changed to boolean...
Desired functionality.
It should watch for all files correctly
Mention any other details that might be useful.
I have tried to change typescript to 2.4.0+ (because of breaking change in CHANGELOG) = NOT WORKING
i have tried to update globally angular-cli(1.4.5) and create new APP via ng new = with latest dependencies = NOT WORKING
BTW even with latest Angular-cli, typescript version in dev-dependencies is "~2.3.3" despite your required version in CHANGELOG
The text was updated successfully, but these errors were encountered: