Skip to content

fix: misleading error message about missing config when opening new file #935

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

Merged
merged 1 commit into from
Oct 9, 2020

Conversation

kyliau
Copy link
Contributor

@kyliau kyliau commented Oct 9, 2020

This commit fixes a false alarm that says a config file cannot be found
when the language server tries to open a file for the first time.

We actually make two calls to openClientFile().

  1. In the first call, if the project doesn't already exist, the method
    will create a project but it will not return the config filename.
  2. In the second call, since the project has already been created,
    the call to openClientFile() should succeed and we should receive a
    config filename. If we don't receive one then it is an error, and we
    should log message here instead of logging it in step (1).

This commit fixes a false alarm that says a config file cannot be found
when the language server tries to open a file for the first time.

We actually make two calls to `openClientFile()`.

1. In the first call, if the project doesn't already exist, the method
   will create a project but it will not return the config filename.
2. In the second call, since the project has already been created,
   the call to `openClientFile()` should succeed and we should receive a
   config filename. If we don't receive one then it is an error, and we
   should log message here instead of logging it in step (1).
@kyliau kyliau requested a review from ayazhafiz October 9, 2020 04:22
@ayazhafiz ayazhafiz merged commit b048f5f into angular:master Oct 9, 2020
@kyliau kyliau deleted the fix-no-config-file-error branch October 9, 2020 17:47
@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 Nov 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants