Skip to content
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

ivy-native issue with the component variables in the templates #1109

Closed
devhus opened this issue Feb 13, 2021 · 18 comments · Fixed by #1111
Closed

ivy-native issue with the component variables in the templates #1109

devhus opened this issue Feb 13, 2021 · 18 comments · Fixed by #1111
Labels

Comments

@devhus
Copy link

devhus commented Feb 13, 2021

After enabling the ivy-native feature my project got bugged where the templates(.html) couldn't recognize the component variables or methods at all nor showing any error when writing an undefined variable. the image below is when clicking on the go to definition option of the variable.

image

Additional context

Angular CLI: 11.2.0
Node: 14.15.1
OS: win32 x64

Angular: 11.2.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1001.7
@angular-devkit/build-angular   0.1001.7
@angular-devkit/core            10.1.7
@angular-devkit/schematics      11.2.0
@schematics/angular             11.2.0
@schematics/update              0.1102.0
rxjs                            6.6.3
typescript                      4.1.5

UPDATES

  • updated my project to Angular 11, that didn't fix the issue.
@devhus devhus added the bug label Feb 13, 2021
@MatthewS2077
Copy link

I'm also having issues with the Ivy preview... it just doesn't work... created a new project ng new to test and I get No config file for c:/temp/temp/src/app/app.component.html in the output window for Angular Language Service.

@tonivj5
Copy link

tonivj5 commented Feb 14, 2021

Same issue than @MatthewS2077, but I'm on Linux. Language service with preview enabled doesn't work at all, same log with every component file

@admir86
Copy link

admir86 commented Feb 14, 2021

same error:

[Info  - 10:27:57] Angular language server process ID: 11620
[Info  - 10:27:57] Using typescript/lib/tsserverlibrary v4.1.5 from c:\Users\admir\.vscode\extensions\angular.ng-template-11.2.0\node_modules\typescript\lib\tsserverlibrary.js
[Info  - 10:27:57] Using @angular/language-service/bundles/ivy v11.2.0 from c:\Users\admir\.vscode\extensions\angular.ng-template-11.2.0\node_modules\@angular\language-service\bundles\ivy.js
[Info  - 10:27:57] Log file: c:\Users\admir\AppData\Roaming\Code\logs\20210214T095505\exthost4\Angular.ng-template\nglangsvc.log
[Error - 10:28:15] No config file for c:/Users/admir/Azure-DevOps/test-ng-lang-service/ng-app/src/app/app.component.html
[Error - 10:28:33] No config file for c:/Users/admir/Azure-DevOps/test-ng-lang-service/ng-app/src/app/app.component.html
[Error - 10:28:41] No config file for c:/Users/admir/Azure-DevOps/test-ng-lang-service/ng-app/src/app/app.component.html
[Info  - 10:28:50] Enabling Ivy language service for c:/Users/admir/Azure-DevOps/test-ng-lang-service/ng-app/tsconfig.json.
[Error - 10:28:52] No config file for c:/Users/admir/Azure-DevOps/test-ng-lang-service/ng-app/src/app/app.component.html
Angular CLI: 11.2.0
Node: 12.16.2
OS: win32 x64

Angular: 11.2.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1102.0
@angular-devkit/build-angular   0.1102.0
@angular-devkit/core            11.2.0
@angular-devkit/schematics      11.2.0
@schematics/angular             11.2.0
@schematics/update              0.1102.0
rxjs                            6.6.3
typescript                      4.1.5

@MatthewS2077
Copy link

So looking forward to this being fixed and being able to apply rename refactoring to templates 💪

@ivanwonder
Copy link
Contributor

I downgrade the version of ts to 4.1.3 in the extensions. It works again. Maybe this is the problem.

const tsdk: string|null = config.get('typescript.tsdk', null);

@255kb
Copy link

255kb commented Feb 15, 2021

For me extension in v11.1.3 is working well. Updating to 11.2.0 breaks everything

@jtsom
Copy link

jtsom commented Feb 15, 2021

Am seeing the same issue in the html file, with errors in the console every time I hover something:

image

Also seeing double when hovering over variables, etc. in the component file:

image

image

... turning Ivy off.

@AaronDovTurkel
Copy link

How do you turn off Ivy? tried downgrading the extension but still having the issue described...

@255kb
Copy link

255kb commented Feb 15, 2021

@AaronDovTurkel add "angular.experimental-ivy": false in your VSCode settings

@ivanwonder
Copy link
Contributor

ivanwonder commented Feb 15, 2021

microsoft/TypeScript#42713
I think this pr break the plugin. The package name is @angular/language-service, so the @angular/language-service/bundles/ivy is disabled.

@yiqu
Copy link

yiqu commented Feb 15, 2021

Turning it off. Everything is doubled and in template it doesnt actually work.

ivanwonder added a commit to ivanwonder/vscode-ng-language-service that referenced this issue Feb 16, 2021
In typescript 4.1.4, ts allows only package names as plugin names,
so `@angular/language-service/bundles/ivy` is disabled by ts. This
PR will resolve `@angular/language-service` to path `./bundles/ivy.js`

fixed angular#1109
ivanwonder added a commit to ivanwonder/vscode-ng-language-service that referenced this issue Feb 16, 2021
In typescript 4.1.4, ts allows only package names as plugin names,
so `@angular/language-service/bundles/ivy` is disabled by ts. This
PR will resolve `@angular/language-service` to path `./bundles/ivy.js`
when the user enables the Ivy-native language service.

fixed angular#1109
@Eventyret
Copy link

Just to add to @jtsom I had the same issue now, turned ivy off with "angular.experimental-ivy": false and it works like a charm.
Thanks for the hard work people are doing on this btw.

kyliau pushed a commit to ivanwonder/vscode-ng-language-service that referenced this issue Feb 16, 2021
In typescript 4.1.4, ts allows only package names as plugin names,
so `@angular/language-service/bundles/ivy` is disabled by ts. This
PR will resolve `@angular/language-service` to path `./bundles/ivy.js`
when the user enables the Ivy-native language service.

fixed angular#1109
kyliau pushed a commit that referenced this issue Feb 16, 2021
In typescript 4.1.4, ts allows only package names as plugin names,
so `@angular/language-service/bundles/ivy` is disabled by ts. This
PR will resolve `@angular/language-service` to path `./bundles/ivy.js`
when the user enables the Ivy-native language service.

fixed #1109
kyliau pushed a commit that referenced this issue Feb 16, 2021
In typescript 4.1.4, ts allows only package names as plugin names,
so `@angular/language-service/bundles/ivy` is disabled by ts. This
PR will resolve `@angular/language-service` to path `./bundles/ivy.js`
when the user enables the Ivy-native language service.

fixed #1109
@kyliau
Copy link
Contributor

kyliau commented Feb 16, 2021

Hello everyone, this issue has been fixed in v11.2.1, and it has been released to the vscode marketplace.
We are sorry for the inconvenience.
This is a mistake that's totally preventable, and as a result I've written a post-mortem to explain what happened, and what we will do to ensure a higher engineering standard to prevent this from happening in the future.
Please let us know if you have any suggestions / feedback.

@MatthewS2077
Copy link

MatthewS2077 commented Feb 16, 2021

Fixed, and thanks! 👍
Is rename refactoring meant to work for templates? It doesn't seem to... 🤔

@kunajs
Copy link

kunajs commented Feb 16, 2021

Hi, seems that duplicities still occur within "Find all references" results, even with v11.2.1 😕

@kyliau
Copy link
Contributor

kyliau commented Feb 16, 2021

Hi, seems that duplicities still occur within "Find all references" results, even with v11.2.1 😕

@kunajs could you please open a new issue and attach a repro / screenshot so that we can take a closer look? Thank you.

@kunajs
Copy link

kunajs commented Feb 17, 2021

Hi, seems that duplicities still occur within "Find all references" results, even with v11.2.1 😕

@kunajs could you please open a new issue and attach a repro / screenshot so that we can take a closer look? Thank you.

#1124

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.