Vscode-ng-language-service: Angular Language Service Roadmap

Created on 30 May 2019  ·  20Comments  ·  Source: angular/vscode-ng-language-service

It has been more than a year since @chuckjaz, the original author of the language service, left the team. Since then, the team has been spread very thin working on various ambitious goals, namely the Ivy compiler and Bazel integration with CLI, among others.
Now that version 8 is released, we would like to provide some updates and roadmap for the language service moving forward.

  1. Stability / performance ✔️ done!
    It is our utmost priority to make sure the language service does not regress in performance. We will continue to address stability issues, if any.

  2. Transition to tsserver plugin ✔️ done!
    Over the coming months, we'll take on the remaining work required to make the transition over to tsserver plugin model. The main benefits of a tsserver plugin are performance (no duplicate TS compilation) and no version mismatch (both Angular and TS). Most of the work is to make sure external HTML templates are well supported.
    Update 11/11/2019: While we will continue to support the plugin mode, we've decided to keep maintaining the standalone extension. The extension has been completely revamped to address the performance issues, and many features have been added. A new version was published to the marketplace in conjunction with the release of Angular version 9.

  3. Bug fixes / enhancements ✔️ done!
    Once the plugin is done, we'll address some long standing bugs with regards to template type checking and some much requested feature enhancements.

  4. Switch language service to Ivy compiler ✔️ done!
    Since the compilation model under Ivy is significantly different from that under View Engine, the language service backend will have to be revamped to ensure future compatibility.

Thank you for all the feedback, and please let us know if you'd like to contribute!

Most helpful comment

Latest update: Ivy language service will be available for beta-testing in version 11. The release is currently scheduled for November 11, 2020. We aim to improve performance and provide a broader feature set in this completely new iteration of the language service. Among the new features are:

  1. Better typings in Angular templates
  2. Produce same diagnostics as compiler
  3. Honor user's angularCompilerOptions

We know it's been a long time coming, but thank you for the support and the patience!

All 20 comments

Well just to link it here i have two good described performance heavy problems / bugs:

While for the first one there is a workaround not to close at least the last open editor, for the second one is only to disable the plugin. From my intensive testing with the plugin i can say if this two are fixed the plugin is nearly perfect.

A new version of the Angular extension is published on GitHub as an early preview, please see https://github.com/angular/vscode-ng-language-service/releases/tag/v0.900.0-next.0.

If you try it out, please let us know any issues / bugs. Thank you!

@kyliau: I'd like to try integrated newer Angular smartness in Eclipse Wild Web Developer. Does the extension you've linked in your previous comment contain a language server (as in a process speaking LSP)? If yes, is it expected to work on both TS and HTML files? And if yes, what's the recommended way to start this language server?

@kyliau I followed the instructions to install v0.900.0-next.0, however there are no auto-complete suggestions for anything (e.g component selectors, properties, events, etc).

I'm happy to announce that the RC version has been released, and in a few weeks time a brand new extension will be published to vscode marketplace.
In the meantime, if you'd like to try it out, please download the binary from the Release page.
We are currently focusing on work item (3), in which we will fix some long-standing bugs.

The new extension is now live. Please download it from https://marketplace.visualstudio.com/items?itemName=Angular.ng-template

I have a question about point 4 "Switch language service to Ivy compiler [in progress]"

We have our own internal library, that is only used in the applications we develop ourselfs. So we migrated it to Ivy, because all of our codebase was migrated at once. But now vscode does not reckognize the Directives and Components from the library anymore.

This means the best way for now would be, we compile the library with the View Engine until the language service fully supports Ivy. Is this correct? If so, is there a roadmap when support will land for the language service?

The applications that use ivy compiler have no problem. Components from the applications are resolvd correctly.

@furti As you have noted, yes, for now libraries and applications will have to be compiled with View Engine in order for the language service to pick up the corresponding metadata.json which is the foundation of the language service today.
@xiaoxiangmoe I'm working with the compiler team to fully integrate Ivy into language service. Currently, we are aiming a beta release in version 10, which should happen around end of June / early July, barring any surprises. Our planning has been somewhat disrupted due to the ongoing WFH situation, but we'll try our best to stick to the original roadmap.

Nice to see that angular has released v10 🎉
Is there any update for "Switch language service to Ivy compiler"?

@xiaoxiangmoe The timeline for Ivy language service has slipped due to some internal reorganization.
The work has already started, and we've onboarded a few members to increase momentum on this project.
You can track the progress of the entire project here.
We plan to release Ivy LS alongside the existing LS, so that users who want to try out an "early preview" could do so from their editor settings. Please stay tuned!

I think performance is not really done yet. This extension has been the biggest source of high CPU spikes for me and many other people I know for a long time and lately keeps fans on macOS crazy.

Yes I agree with @DenysVuika. I had issues with this plugin for months. I abandoned yesterday and disabled it. After I start vscode and ng web server, CPU will skyrocket at some point and stay there until I restart vscode. Intellisense will stop working multiple times a day. I'm forced to restart vscode every day, several times. Since I disabled it, everything is back to normal. I'm on macOS too. Here is a few contextual info:

Angular CLI: 10.0.1
Node: 12.13.0
OS: darwin x64

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

Package Version

@angular-devkit/architect 0.1000.1
@angular-devkit/build-angular 0.1000.1
@angular-devkit/build-optimizer 0.1000.1
@angular-devkit/build-webpack 0.1000.1
@angular-devkit/core 10.0.1
@angular-devkit/schematics 10.0.1
@angular/cdk 10.0.1
@angular/cli 10.0.1
@angular/material 10.0.1
@ngtools/webpack 10.0.1
@schematics/angular 10.0.1
@schematics/update 0.1000.1
rxjs 6.6.0
typescript 3.9.6
webpack 4.43.0

In my current Angular 10 project, using Version: 1.48.0-insider I no longer have any Angular Intellisense in my HTML templates nor any error checking (like if I bound to a non-existent variable).

Latest update: Ivy language service will be available for beta-testing in version 11. The release is currently scheduled for November 11, 2020. We aim to improve performance and provide a broader feature set in this completely new iteration of the language service. Among the new features are:

  1. Better typings in Angular templates
  2. Produce same diagnostics as compiler
  3. Honor user's angularCompilerOptions

We know it's been a long time coming, but thank you for the support and the patience!

@kyliau Will this be released with angular v11.0.0-rc.2 or v11.0.0-rc.3?

@kyliau Will this be released with angular v11.0.0-rc.2 or v11.0.0-rc.3?

@xiaoxiangmoe Ivy language service remains experimental and opt-in in v11.0, because we still have some work to do to polish up the user experience and iron out some bugs. If you'd like to try it out anyway, you can download the RC version from https://github.com/angular/vscode-ng-language-service/releases/tag/v0.1100.0-rc.0 and install the .vsix file manually.

Since this is a huge milestone for the project, we'd like to make sure the extension is well-tested and feature complete before it's released as stable. We've made tremendous progress and are excited to share the work with the community, but we appreciate a little more patience while we tie up the loose ends.

@kyliau When can we expect the bugs opened for the Ivy Language service to be investigated?
Opened https://github.com/angular/vscode-ng-language-service/issues/936

@kyliau Will this be released with angular v11.0.0-rc.2 or v11.0.0-rc.3?

@xiaoxiangmoe Ivy language service remains experimental and opt-in in v11.0, because we still have some work to do to polish up the user experience and iron out some bugs. If you'd like to try it out anyway, you can download the RC version from https://github.com/angular/vscode-ng-language-service/releases/tag/v0.1100.0-rc.0 and install the .vsix file manually.

Since this is a huge milestone for the project, we'd like to make sure the extension is well-tested and feature complete before it's released as stable. We've made tremendous progress and are excited to share the work with the community, but we appreciate a little more patience while we tie up the loose ends.

What's the right way to activate Ivy Language Service? I have already set this experimental setting to true, but it can't run ngcc. I've tried running it manually right before, but it doesn't work. Is there any obvious step I'm not taking?

I hope you don't dismiss this comment just like other user support request. I know you're not ready for that. I just want to know the right way to test this.

@Arkthur This is my angularCompilerOptions:

{
    "angularCompilerOptions": {
        "fullTemplateTypeCheck": true,
        "strictInjectionParameters": true,
        "strictInputAccessModifiers": true,
        "strictTemplates": true
    }
}

Also, If you use vscode-ng-language-service v0.1100.1 or v0.1100.3, please reinstall v0.1100.0. It seems that vscode-ng-language-service v0.1100.1 has serious bugs and ivy language service will not work.

It's been a long time in the making, but today Ivy-native language service is finally available to try in v11.1.0!
Ivy-native LS fixes many fundamental issues that were impossible to fix in View Engine:

  • incremental compilation performance,
  • more robust type-checking,
  • same diagnostics as compiler, etc,

It also introduces some new features like find references for variables in templates.

Please download from the vscode marketplace and let us know if you have any feedback.
Instructions to enable Ivy-native LS can be found in the release notes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Liero picture Liero  ·  3Comments

BorntraegerMarc picture BorntraegerMarc  ·  5Comments

daveriedstra picture daveriedstra  ·  3Comments

mhamri picture mhamri  ·  4Comments

fxck picture fxck  ·  6Comments