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-server): Ensure LS is enabled in same order as project i… #1447

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

atscott
Copy link
Collaborator

@atscott atscott commented Jul 13, 2021

…nitialization

ngcc processes might finish out of order, but we need to re-enable the language service for
the projects in the same order that the ngcc processes were spawned in. With solution-style
configs, we need to ensure that the language service enabling respects the order that the
projects were defined in the references list. If we enable the language service out of order,
the second project in the list will request diagnostics first and then be the project that's
prioritized for that project's set of files. This will cause issues if the second project is,
for example, one that only includes *.spec.ts files and not the entire set of files needed
to compile the app (i.e. *.module.ts).

A test was not written for this because it is difficult to consistently emulate the
ngcc processes finishing out of order with solution style project configs.

Fixes #1444

…nitialization

ngcc processes might finish out of order, but we need to re-enable the language service for
the projects in the same order that the ngcc processes were spawned in. With solution-style
configs, we need to ensure that the language service enabling respects the order that the
projects were defined in the references list. If we enable the language service out of order,
the second project in the list will request diagnostics first and then be the project that's
prioritized for that project's set of files. This will cause issues if the second project is,
for example, one that only includes `*.spec.ts` files and not the entire set of files needed
to compile the app (i.e. `*.module.ts`).

A test was not written for this because it is difficult to consistently emulate the
`ngcc` processes finishing out of order with solution style project configs.

Fixes angular#1444
@atscott atscott added the target: patch This PR is targeted for the next patch release label Jul 13, 2021
@atscott atscott requested a review from alxhub July 13, 2021 21:06
@google-cla google-cla bot added the cla: yes label Jul 13, 2021
@atscott atscott added the action: merge Ready to merge label Jul 14, 2021
@atscott atscott merged commit 1434226 into angular:master Jul 14, 2021
atscott added a commit that referenced this pull request Jul 14, 2021
…nitialization (#1447)

ngcc processes might finish out of order, but we need to re-enable the language service for
the projects in the same order that the ngcc processes were spawned in. With solution-style
configs, we need to ensure that the language service enabling respects the order that the
projects were defined in the references list. If we enable the language service out of order,
the second project in the list will request diagnostics first and then be the project that's
prioritized for that project's set of files. This will cause issues if the second project is,
for example, one that only includes `*.spec.ts` files and not the entire set of files needed
to compile the app (i.e. `*.module.ts`).

A test was not written for this because it is difficult to consistently emulate the
`ngcc` processes finishing out of order with solution style project configs.

Fixes #1444

(cherry picked from commit 1434226)
@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 Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge Ready to merge 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 LS sometimes breaks with solution-style project configuration (used by NX)
3 participants