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): do not throw for invalid metadata #13261

Merged
merged 1 commit into from
Dec 7, 2016

Conversation

chuckjaz
Copy link
Contributor

@chuckjaz chuckjaz commented Dec 6, 2016

What kind of change does this PR introduce? (check one with "x")

[x] Bugfix

What is the current behavior? (You can also link to an open issue here)

The language service will sometimes throw with invalid metadata.

#13255

What is the new behavior?

The language service no longer throws.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[x] No

Other information:

Fixes #13255

@chuckjaz chuckjaz added action: review The PR is still awaiting reviews from at least one requested reviewer action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 6, 2016
@chuckjaz chuckjaz force-pushed the issue13255 branch 2 times, most recently from 84eb399 to 5499591 Compare December 6, 2016 17:27
@chuckjaz chuckjaz added action: review The PR is still awaiting reviews from at least one requested reviewer and removed action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews labels Dec 6, 2016
this._reportError(
new Error(
`Unexpected value '${stringify(importedType)}' imported by the module '${stringify(moduleType)}'`),
moduleType);
Copy link
Contributor

Choose a reason for hiding this comment

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

return ? (in case some code is added below)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

new Error(
`Unexpected value '${stringify(type)}' used in the bootstrap property of module '${stringify(moduleType)}'`),
moduleType);
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

inside a forEach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The return is intentional to avoid the push below.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep seen that after (I first thought you wanted to break the loop)

@vicb
Copy link
Contributor

vicb commented Dec 6, 2016

LGTM with a few minor comments

@vicb vicb added pr_state: LGTM and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 6, 2016
@chuckjaz chuckjaz added the action: merge The PR is ready for merge by the caretaker label Dec 6, 2016
@alxhub
Copy link
Member

alxhub commented Dec 7, 2016

Hi @chuckjaz,

Can you rebase?

@alxhub alxhub merged commit 4a09c81 into angular:master Dec 7, 2016
@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 Sep 10, 2019
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Language service throws when component metadata is invalid
4 participants