-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ngcc: packages that fail with errors causes a crash #34500
Comments
Same error, after some investigation the error seems to be from this file : at the beginning of the function
The problem is that the variable |
Trying to compile with bazel, same error for another module:
|
The same error when running |
Same problem. Tried to upgrade to "next" because ngx-echarts not compiled with ngcc 8.3.9-21 and got this error on upgrade. |
This comment has been minimized.
This comment has been minimized.
Same for me for Angular: 9.0.0-rc.7: Happens on |
I had to remove all the node modules folder & run |
Have you guys found a way to check which package is causing the issue? I tried to looking at the logs but it doesn't seem to include the package with the problem. |
@gustavobmichel My logs show the symbol that caused the issue. Can you upload yours? |
I am using Yarn, and I tried doing a Yarn Upgrade. Then ran the Yarn Install. It worked without an issue. |
In angular#34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit changes ngcc so that it starts using ngtsc's `Trait` concept to track transitions between the analysis, resolve and compile phase much more explicitly. This approach makes it illegal to attempt the compile phase when either analysis or resolve has produced errors, avoiding the crash. Fixes angular#34500 Resolves FW-1788
In angular#34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit changes ngcc so that it starts using ngtsc's `Trait` concept to track transitions between the analysis, resolve and compile phase much more explicitly. This approach makes it illegal to attempt the compile phase when either analysis or resolve has produced errors, avoiding the crash. Fixes angular#34500 Resolves FW-1788
Just FYI, when using the nightly build the bug is fixed. |
@vokeit-gschuster The bug itself has not been fixed, the fix PR is still pending. However, it may be that a bug which was causing the library to fail compiling has been fixed, in which case you won't observe the bug anymore. |
In my case, ngcc failed with the above given message on @angular/http/testing when only running it on node_modules ("ngcc" in the workspace root). |
In my case, ngcc failed with the above given message on angular-tree-component when compile to esm5
|
In angular#34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit changes ngcc so that it starts using ngtsc's `Trait` concept to track transitions between the analysis, resolve and compile phase much more explicitly. This approach makes it illegal to attempt the compile phase when either analysis or resolve has produced errors, avoiding the crash. Fixes angular#34500 Resolves FW-1788
In angular#34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit updates ngcc to take advantage of ngtsc's `TraitCompiler`, that internally manages all Ivy classes that are part of the compilation. This effectively replaces ngcc's own `AnalyzedFile` and `AnalyzedClass` types, together with all of the logic to drive the `DecoratorHandler`s. All of this is now handled in the `TraitCompiler`, benefiting from its explicit state transitions of `Trait`s so that the ngcc crash is a thing of the past. Fixes angular#34500 Resolves FW-1788
Exact same error on 9.0.0-rc.10.
|
In angular#34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit updates ngcc to take advantage of ngtsc's `TraitCompiler`, that internally manages all Ivy classes that are part of the compilation. This effectively replaces ngcc's own `AnalyzedFile` and `AnalyzedClass` types, together with all of the logic to drive the `DecoratorHandler`s. All of this is now handled in the `TraitCompiler`, benefiting from its explicit state transitions of `Trait`s so that the ngcc crash is a thing of the past. Fixes angular#34500 Resolves FW-1788
In #34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit updates ngcc to take advantage of ngtsc's `TraitCompiler`, that internally manages all Ivy classes that are part of the compilation. This effectively replaces ngcc's own `AnalyzedFile` and `AnalyzedClass` types, together with all of the logic to drive the `DecoratorHandler`s. All of this is now handled in the `TraitCompiler`, benefiting from its explicit state transitions of `Trait`s so that the ngcc crash is a thing of the past. Fixes #34500 Resolves FW-1788 PR Close #34889
) In angular#34288, ngtsc was refactored to separate the result of the analysis and resolve phase for more granular incremental rebuilds. In this model, any errors in one phase transition the trait into an error state, which prevents it from being ran through subsequent phases. The ngcc compiler on the other hand did not adopt this strict error model, which would cause incomplete metadata鈥攄ue to errors in earlier phases鈥攖o be offered for compilation that could result in a hard crash. This commit updates ngcc to take advantage of ngtsc's `TraitCompiler`, that internally manages all Ivy classes that are part of the compilation. This effectively replaces ngcc's own `AnalyzedFile` and `AnalyzedClass` types, together with all of the logic to drive the `DecoratorHandler`s. All of this is now handled in the `TraitCompiler`, benefiting from its explicit state transitions of `Trait`s so that the ngcc crash is a thing of the past. Fixes angular#34500 Resolves FW-1788 PR Close angular#34889
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
Affected Package
The issue is caused by package @angular/compiler-cli
Is this a regression?
Yes, the previous version in which this bug was not present was: 9.0.0-rc.6
Description
When ngcc processes a package that fails to compile, a fatal error that crashes the compiler occurs.
馃敩 Minimal Reproduction
For example
angular-tree-component
fails to compile:https://app.circleci.com/jobs/github/angular/ngcc-validation/2459/parallel-runs/1?filterBy=ALL
馃敟 Exception or Error
馃實 Your Environment
Angular Version:
Anything else relevant?
n/a
The text was updated successfully, but these errors were encountered: