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
This bug does not appear to be a regression from v18.0.0
Description
The language server crashes with an assertion of "Expected successfully analyzed compilation" when a duplicate decorated property is found in a component.
Create a component with two @Input properties using the same name
(in VSCode) Save the file to execute a check
See error
Expected behavior
The language server flags the error in the code and continues running without triggering assertions and restarting.
Logs
The Angular Language Service debug-level log did not indicate any error before getting cleared on every restart. Below is the output of the Angular Language Service provided by the Output VSCode tab
[Info - 12:41:32 PM] Angular language server process ID: 60819
[Info - 12:41:32 PM] Imported typescript/lib/tsserverlibrary is version 5.5.3.
[Info - 12:41:32 PM] Using @angular/language-service v18.2.0-rc.0 from /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/index.js
[Info - 12:41:32 PM] Log file: /Users/saren/Library/Application Support/Code/logs/20241003T115223/window3/exthost/Angular.ng-template/nglangsvc.log
[Info - 12:41:33 PM] Enabling language service for /Users/saren/test/crash/tsconfig.json.
/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:41043
throw new Error(`Duplicate decorated properties found on class '${clazz.name.text}': ` +
^
Error: Duplicate decorated properties found on class 'AppComponent': error
at extractClassMetadata (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:41043:19)
at ComponentDecoratorHandler.analyze (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:54554:27)
at TraitCompiler.analyzeTrait (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:38124:40)
at analyze (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:38090:44)
at TraitCompiler.analyzeClass (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:38112:21)
at visit (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:37889:26)
at visitNodes (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/typescript/lib/typescript.js:31715:22)
at forEachChildInSourceFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/typescript/lib/typescript.js:31928:12)
at Object.forEachChild (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/typescript/lib/typescript.js:32228:35)
at visit (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:37891:40)
Node.js v20.15.1
[Info - 12:41:48 PM] Connection to server got closed. Server will restart.
[Info - 12:41:48 PM] Angular language server process ID: 60925
[Info - 12:41:48 PM] Imported typescript/lib/tsserverlibrary is version 5.5.3.
[Info - 12:41:48 PM] Using @angular/language-service v18.2.0-rc.0 from /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/index.js
[Info - 12:41:48 PM] Log file: /Users/saren/Library/Application Support/Code/logs/20241003T115223/window3/exthost/Angular.ng-template/nglangsvc.log
[Info - 12:41:49 PM] Enabling language service for /Users/saren/test/crash/tsconfig.json.
[Error - 12:41:50 PM] Request textDocument/foldingRange failed.
Message: Request textDocument/foldingRange failed with message: Duplicate decorated properties found on class 'AppComponent': error
Code: -32603
/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:58296
throw new Error(`AssertionError: Expected successfully analyzed compilation.`);
^
Error: AssertionError: Expected successfully analyzed compilation.
at IncrementalCompilation.priorTypeCheckingResultsFor (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:58296:23)
at TemplateTypeCheckerImpl.maybeAdoptPriorResultsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53624:53)
at /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53657:22
at DelegatingPerfRecorder.inPhase (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:37692:24)
at TemplateTypeCheckerImpl.ensureAllShimsForOneFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53656:23)
at TemplateTypeCheckerImpl.getDiagnosticsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53494:26)
at NgCompiler.getTemplateDiagnosticsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:63533:69)
at NgCompiler.getDiagnosticsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:63089:42)
at /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:69171:56
at /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:69488:71
Node.js v20.15.1
[Info - 12:41:50 PM] Connection to server got closed. Server will restart.
[Info - 12:41:51 PM] Angular language server process ID: 60950
[Info - 12:41:51 PM] Imported typescript/lib/tsserverlibrary is version 5.5.3.
[Info - 12:41:51 PM] Using @angular/language-service v18.2.0-rc.0 from /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/index.js
[Info - 12:41:51 PM] Log file: /Users/saren/Library/Application Support/Code/logs/20241003T115223/window3/exthost/Angular.ng-template/nglangsvc.log
[Info - 12:41:51 PM] Enabling language service for /Users/saren/test/crash/tsconfig.json.
[Error - 12:41:51 PM] Request textDocument/foldingRange failed.
Message: Request textDocument/foldingRange failed with message: Duplicate decorated properties found on class 'AppComponent': error
Code: -32603
[Error - 12:42:12 PM] Request textDocument/foldingRange failed.
Message: Request textDocument/foldingRange failed with message: Duplicate decorated properties found on class 'AppComponent': error
Code: -32603
/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:58296
throw new Error(`AssertionError: Expected successfully analyzed compilation.`);
^
Error: AssertionError: Expected successfully analyzed compilation.
at IncrementalCompilation.priorTypeCheckingResultsFor (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:58296:23)
at TemplateTypeCheckerImpl.maybeAdoptPriorResultsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53624:53)
at /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53657:22
at DelegatingPerfRecorder.inPhase (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:37692:24)
at TemplateTypeCheckerImpl.ensureAllShimsForOneFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53656:23)
at TemplateTypeCheckerImpl.getDiagnosticsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:53494:26)
at NgCompiler.getTemplateDiagnosticsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:63533:69)
at NgCompiler.getDiagnosticsForFile (/Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:63089:42)
at /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:69171:56
at /Users/saren/.vscode/extensions/angular.ng-template-18.2.0/node_modules/@angular/language-service/bundles/language-service.js:69488:71
🐞 bug report
Is this a regression?
This bug does not appear to be a regression from v18.0.0
Description
The language server crashes with an assertion of "Expected successfully analyzed compilation" when a duplicate decorated property is found in a component.
Bug Type
What does this bug affect
Reproduction
Steps to reproduce the behavior:
@Input
properties using the same nameExpected behavior
The language server flags the error in the code and continues running without triggering assertions and restarting.
Logs
The Angular Language Service debug-level log did not indicate any error before getting cleared on every restart. Below is the output of the Angular Language Service provided by the Output VSCode tab
🌍 Your Environment
Angular Version:
Extension Version:
VSCode Version:
Operating System:
Extension options:
The text was updated successfully, but these errors were encountered: