-
Notifications
You must be signed in to change notification settings - Fork 12k
AoT hangs forever after updating from v6 to v7 (or v8) #15113
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
Comments
I have this same issue. Stuck on 19% styles.scss
|
Heya, I don't really know what's happening in your cases. If I had to bet, maybe it's some TS or Sass/Less bug. If you can't provide me with a repro, I can tell you how to profile your app and maybe you can see what's happening. You can use https://gist.github.com/filipesilva/9ff23fb136af2a192f42d3a2498dc6ef to profile your apps. The CPU profile is your best bet. Since your process never really ends you'll need to manually add a timeout too, something like this:
|
@filipesilva I tried you code. Now the PC is using all my memory too, I guess the function-call at 11% never finishes or something. You got some ideas on what to do now? |
If whatever is happening never finishes and is also synchronous, then the Another alternative is to run |
@filipesilva Here is a CPU profile that ran for around 3-5 secs. I'm not sure what the problem is, but it seems to me that typescript is the issue. The ForEach loop seems to continue forever as I can attach the profiler again and its still in that loop. |
I don't know if it's related but TS 3.4 had a problem with union types which caused massively degraded performance in some cases (microsoft/TypeScript#31584). Can you try with TS 3.5? If you get an error about unsupported TS versions you can use this toplevel TS property to bypass it: https://github.com/angular/angular/blob/cb848b94102855d1e773892b25375304102cab69/aio/tsconfig.app.json#L16-L18 |
That fixed the problem. |
Glad to hear it! We're updating the framework in angular/angular#31615, so it should be supported before version 9. |
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
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: v6 (latest)
Description
We got a quite large hybrid app (700+ Components, ~100 angularJs components/directives).
Build it with AoT works perfectly in Angular v6, but stops working in v7 or v8.
Building it without AoT works in all versions without issues.
The problem is that we get no errors when building with AoT in v7 or v8. The build get stuck at 11% and will stay there even after 50+ hours.
This is the line it get stuck on:
11% building 13/14 modules 1 active ...epos\Stream\node_modules\less-loader\dist\cjs.js??ref--14-3!C:\Repos\Stream\src\styles.less
Is there any way to get a more detailed log of what the compiler is trying to do?
I'm out of ideas of how to fix this. I've tried looking at other issues with AoT or UpgradeModule, but none of them quite matches this or helps with my issue.
I've done everything in https://update.angular.io/#6.1:7.0.
We run RxJS 6 without compat, and have removed HttpModule from everything
🔬 Minimal Reproduction
This is the problem. I can't reproduce it in a new app with all our third party libs and styles included. Something in out code breaks AoT compilation in version 7 and 8.
We run our code with this line:
node --max_old_space_size=16386 ./node_modules/@angular/cli/bin/ng serve --port 3000
🌍 Your Environment
I tried v7@latest, v8, v8.1, v8@next
Angular Version:
The text was updated successfully, but these errors were encountered: