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

fix(language-service): Recover from error in analyzing Ng Modules #37108

Closed
wants to merge 1 commit into from

Conversation

ayazhafiz
Copy link
Member

Closes angular/vscode-ng-language-service#777

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

Does this PR introduce a breaking change?

  • Yes
  • No

@pullapprove pullapprove bot requested a review from kyliau May 14, 2020 15:44
@ayazhafiz ayazhafiz added area: language-service Issues related to Angular's VS Code language service type: bug/fix labels May 14, 2020
@ngbot ngbot bot added this to the needsTriage milestone May 14, 2020
@ayazhafiz ayazhafiz requested a review from kyliau May 15, 2020 18:18
@ayazhafiz
Copy link
Member Author

ptal @kyliau. The error messages we get from resolution failure would make great diagnostics, so I think we should look into propagating it from the compiler.

@@ -71,6 +71,8 @@ export class TypeScriptServiceHost implements LanguageServiceHost {
ngModuleByPipeOrDirective: new Map(),
ngModules: [],
};
private lastAnalysisSucceeded = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any reason why this flag is needed? I think the code would work without it.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah sorry, an artifact of when i was doing the spy thing and didn't update source files

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.

Thank you for fixing this!

@kyliau kyliau added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews target: patch This PR is targeted for the next patch release labels Jun 1, 2020
In place of failing to return analyzed Ng Modules when the analyzer
fails, return the previously-analyzed Ng Modules (which may be empty)
and log an error.

Closes angular/vscode-ng-language-service#777
@ayazhafiz ayazhafiz added the action: merge The PR is ready for merge by the caretaker label Jun 3, 2020
@kyliau kyliau removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Jun 3, 2020
@atscott atscott closed this in c4f4675 Jun 3, 2020
atscott pushed a commit that referenced this pull request Jun 3, 2020
…7108)

In place of failing to return analyzed Ng Modules when the analyzer
fails, return the previously-analyzed Ng Modules (which may be empty)
and log an error.

Closes angular/vscode-ng-language-service#777

PR Close #37108
@ayazhafiz ayazhafiz deleted the i/777 branch June 3, 2020 23:07
ngwattcos pushed a commit to ngwattcos/angular that referenced this pull request Jun 25, 2020
…gular#37108)

In place of failing to return analyzed Ng Modules when the analyzer
fails, return the previously-analyzed Ng Modules (which may be empty)
and log an error.

Closes angular/vscode-ng-language-service#777

PR Close angular#37108
@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 Jul 4, 2020
profanis pushed a commit to profanis/angular that referenced this pull request Sep 5, 2020
…gular#37108)

In place of failing to return analyzed Ng Modules when the analyzer
fails, return the previously-analyzed Ng Modules (which may be empty)
and log an error.

Closes angular/vscode-ng-language-service#777

PR Close angular#37108
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 area: language-service Issues related to Angular's VS Code language service cla: yes target: patch This PR is targeted for the next patch release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Server crashes on invalid entry component in version 0.901.7
3 participants