Skip to content

Conversation

ivanwonder
Copy link
Contributor

After the user edits the file core.d.ts, the language-service will crash.

fix: angular/vscode-ng-language-service#713

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from kyliau April 24, 2020 03:40
After the user edits the file `core.d.ts`, the symbol from the core module will be invalided, which only is created when init the language service. Then the language-service will crash.
@ivanwonder ivanwonder force-pushed the disable-update-core-module branch from 11a69f8 to 42da9dc Compare April 24, 2020 03:59
Copy link
Contributor

@kyliau kyliau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this. I tried to debug this issue, but I was not 100% certain that this is the root cause of the problem. Regardless, since the compiler loads symbols from @angular/core at startup, I think it's reasonable that core.d.ts remains immutable throughout the lifetime of the language service.

@kyliau kyliau added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Apr 24, 2020
@ivanwonder
Copy link
Contributor Author

@kyliau

this.initializeConversionMap();

public annotations(type: StaticSymbol): any[] {

AFAIK, the param conversionMap is initialized here, and it's used to resolve the annotations. Correct me if I'm wrong.

AndrewKushnir pushed a commit that referenced this pull request Apr 24, 2020
)

After the user edits the file `core.d.ts`, the symbol from the core module will be invalided, which only is created when init the language service. Then the language-service will crash.

PR Close #36783
@ivanwonder ivanwonder deleted the disable-update-core-module branch April 25, 2020 02:11
kyliau pushed a commit to kyliau/angular that referenced this pull request Apr 29, 2020
AndrewKushnir pushed a commit that referenced this pull request Apr 29, 2020
AndrewKushnir pushed a commit that referenced this pull request Apr 29, 2020
@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 May 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Angular Language Service 0.901 missing symbols from core.d.ts
3 participants