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
0.1100.3 template inspection not working #1063
Comments
I have a same problem. |
Same problem with 0.1100.3 |
reinstall vscode and extensions not working, 2h wasted |
2 hours wasted? It literally takes up to 1 minute to install another version like bubliq is already showing. |
I haven't write angular apps for 7 month and today I'm about to work on a new project, angular extension gave me this surprise. Downgrading to v0.1100.2 solves the problem. |
Same issue. Downgrading helps. |
Thanks for submitting the report. Since there is no way to roll back the release, I'll republish 0.1100.2 as the latest version while we investigate the issue. On the other hand, looking at the change log, I've narrowed the issue down to two commits:
I suspect this is a Windows-only issue. From the log provided (thanks for uploading), the path separator is inconsistent:
|
Many `ts.LanguageService` APIs accept a filename, for example ```ts getQuickInfoAtPosition(fileName: string, position: number) ``` The requirement is that `fileName` is agnostic to the platform (Linux, Mac, Windows, etc), and is always normalized to TypeScript's internal `NormalizedPath`. This is evident from the way these APIs are called from the language server: ```ts private onHover(params: lsp.TextDocumentPositionParams) { const lsInfo = this.getLSAndScriptInfo(params.textDocument); if (lsInfo === undefined) { return; } const {languageService, scriptInfo} = lsInfo; const offset = lspPositionToTsPosition(scriptInfo, params.position); const info = languageService.getQuickInfoAtPosition(scriptInfo.fileName, offset); // ... } ``` https://github.com/angular/vscode-ng-language-service/blob/9fca9c66510974c26d5c21b31adb9fa39ac0a38a/server/src/session.ts#L594 Here `scriptInfo.fileName` is always a `ts.server.NormalizedPath`. However, angular#39917 accidentally leaked the platform-specific paths, and caused a mismatch between the incoming paths and the paths stored in the internal data structure `fileToComponent`. This PR fixes the bug by always normalizing the paths, and updating the type to reflect the format of the underlying data. Fixes angular/vscode-ng-language-service#1063
Many `ts.LanguageService` APIs accept a filename, for example ```ts getQuickInfoAtPosition(fileName: string, position: number) ``` The requirement is that `fileName` is agnostic to the platform (Linux, Mac, Windows, etc), and is always normalized to TypeScript's internal `NormalizedPath`. This is evident from the way these APIs are called from the language server: ```ts private onHover(params: lsp.TextDocumentPositionParams) { const lsInfo = this.getLSAndScriptInfo(params.textDocument); if (lsInfo === undefined) { return; } const {languageService, scriptInfo} = lsInfo; const offset = lspPositionToTsPosition(scriptInfo, params.position); const info = languageService.getQuickInfoAtPosition(scriptInfo.fileName, offset); // ... } ``` https://github.com/angular/vscode-ng-language-service/blob/9fca9c66510974c26d5c21b31adb9fa39ac0a38a/server/src/session.ts#L594 Here `scriptInfo.fileName` is always a `ts.server.NormalizedPath`. However, angular#39917 accidentally leaked the platform-specific paths, and caused a mismatch between the incoming paths and the paths stored in the internal data structure `fileToComponent`. This PR fixes the bug by always normalizing the paths, and updating the type to reflect the format of the underlying data. Fixes angular/vscode-ng-language-service#1063
Many `ts.LanguageService` APIs accept a filename, for example ```ts getQuickInfoAtPosition(fileName: string, position: number) ``` The requirement is that `fileName` is agnostic to the platform (Linux, Mac, Windows, etc), and is always normalized to TypeScript's internal `NormalizedPath`. This is evident from the way these APIs are called from the language server: ```ts private onHover(params: lsp.TextDocumentPositionParams) { const lsInfo = this.getLSAndScriptInfo(params.textDocument); if (lsInfo === undefined) { return; } const {languageService, scriptInfo} = lsInfo; const offset = lspPositionToTsPosition(scriptInfo, params.position); const info = languageService.getQuickInfoAtPosition(scriptInfo.fileName, offset); // ... } ``` https://github.com/angular/vscode-ng-language-service/blob/9fca9c66510974c26d5c21b31adb9fa39ac0a38a/server/src/session.ts#L594 Here `scriptInfo.fileName` is always a `ts.server.NormalizedPath`. However, #39917 accidentally leaked the platform-specific paths, and caused a mismatch between the incoming paths and the paths stored in the internal data structure `fileToComponent`. This PR fixes the bug by always normalizing the paths, and updating the type to reflect the format of the underlying data. Fixes angular/vscode-ng-language-service#1063 PR Close #40492
Many `ts.LanguageService` APIs accept a filename, for example ```ts getQuickInfoAtPosition(fileName: string, position: number) ``` The requirement is that `fileName` is agnostic to the platform (Linux, Mac, Windows, etc), and is always normalized to TypeScript's internal `NormalizedPath`. This is evident from the way these APIs are called from the language server: ```ts private onHover(params: lsp.TextDocumentPositionParams) { const lsInfo = this.getLSAndScriptInfo(params.textDocument); if (lsInfo === undefined) { return; } const {languageService, scriptInfo} = lsInfo; const offset = lspPositionToTsPosition(scriptInfo, params.position); const info = languageService.getQuickInfoAtPosition(scriptInfo.fileName, offset); // ... } ``` https://github.com/angular/vscode-ng-language-service/blob/9fca9c66510974c26d5c21b31adb9fa39ac0a38a/server/src/session.ts#L594 Here `scriptInfo.fileName` is always a `ts.server.NormalizedPath`. However, #39917 accidentally leaked the platform-specific paths, and caused a mismatch between the incoming paths and the paths stored in the internal data structure `fileToComponent`. This PR fixes the bug by always normalizing the paths, and updating the type to reflect the format of the underlying data. Fixes angular/vscode-ng-language-service#1063 PR Close #40492
Fixed in v11.1.0, published to the marketplace |
Worked for me, thanks, @kyliau |
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. |
Describe the bug
Basically the title, the template inspection doesn't work, you can't navigate to a variable, errors aren't shown etc.
When I reverted back to 0.1100.2 it started working again
To Reproduce
Steps to reproduce the behavior:
Expected behavior
You can navigate to the property definition by pressing F12 or Ctrl + left click
An error is displayed about the missing property
Actual behavior
Navigation doesn't work
No error is displayed
Logs
Please attach two logs:
Screenshots
The text was updated successfully, but these errors were encountered: