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): Prevent TSServer from removing templates from … #45965

Closed
wants to merge 1 commit into from

Conversation

atscott
Copy link
Contributor

@atscott atscott commented May 12, 2022

…project

As part of the updateProjectIfDirty process and inside updateNonInferredProjectFiles
TS Server will remove the template files that we added as roots in
readResource.
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2363

The external files are added to the list here so ensuring that the
templates are included in the getExternalFiles will prevent this from
happening
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2395:18

Reviewer note: there are no tests here because we don't simulate the whole situation in the language service tests well enough. The currently failing test in the vscode extension repo does pass with this change. Unfortunately, it's not included in this mono-repo, which is why it's hard to show and how this issue was introduced in the first place.

@atscott atscott added target: patch This PR is targeted for the next patch release area: language-service Issues related to Angular's VS Code language service labels May 12, 2022
@ngbot ngbot bot added this to the Backlog milestone May 12, 2022
…project

As part of the `updateProjectIfDirty` process and inside `updateNonInferredProjectFiles`
TS Server will remove the template files that we added as roots in
`readResource`.
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2363

The external files are added to the list here so ensuring that the
templates are included in the `getExternalFiles` will prevent this from
happening
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2395:18
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label May 12, 2022
@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit fa754cd.

jessicajaniuk pushed a commit that referenced this pull request May 12, 2022
…project (#45965)

As part of the `updateProjectIfDirty` process and inside `updateNonInferredProjectFiles`
TS Server will remove the template files that we added as roots in
`readResource`.
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2363

The external files are added to the list here so ensuring that the
templates are included in the `getExternalFiles` will prevent this from
happening
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2395:18

PR Close #45965
jessicajaniuk pushed a commit that referenced this pull request May 12, 2022
…project (#45965)

As part of the `updateProjectIfDirty` process and inside `updateNonInferredProjectFiles`
TS Server will remove the template files that we added as roots in
`readResource`.
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2363

The external files are added to the list here so ensuring that the
templates are included in the `getExternalFiles` will prevent this from
happening
https://sourcegraph.com/github.com/microsoft/TypeScript@c300fea3250abd7f75920d95a58d9e742ac730ee/-/blob/src/server/editorServices.ts?L2395:18

PR Close #45965
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request May 13, 2022
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/animations](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fanimations/13.3.7/13.3.8) |
| [@angular/common](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fcommon/13.3.7/13.3.8) |
| [@angular/compiler](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fcompiler/13.3.7/13.3.8) |
| [@angular/compiler-cli](https://github.com/angular/angular) | devDependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fcompiler-cli/13.3.7/13.3.8) |
| [@angular/core](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fcore/13.3.7/13.3.8) |
| [@angular/forms](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fforms/13.3.7/13.3.8) |
| [@angular/platform-browser](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fplatform-browser/13.3.7/13.3.8) |
| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | dependencies | patch | [`13.3.7` -> `13.3.8`](https://renovatebot.com/diffs/npm/@angular%2fplatform-browser-dynamic/13.3.7/13.3.8) |

---

### Release Notes

<details>
<summary>angular/angular</summary>

### [`v13.3.8`](https://github.com/angular/angular/blob/HEAD/CHANGELOG.md#&#8203;1338-2022-05-12)

[Compare Source](angular/angular@13.3.7...13.3.8)

##### language-service

| Commit | Type | Description |
| -- | -- | -- |
| [b4eb9ed884](angular/angular@b4eb9ed) | fix | Prevent TSServer from removing templates from project ([#&#8203;45965](angular/angular#45965)) |

#### Special Thanks

Andrew Scott, George Kalpakas and Joey Perrott

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1350
Reviewed-by: crapStone <crapstone@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
atscott added a commit to atscott/vscode-ng-language-service that referenced this pull request Jun 3, 2022
The external project management was implemented to prevent TSServer from
closing projects when navigating around. However, this didn't work for
solution style projects. With angular/angular#45965,
the external project management is no longer necessary because that
change in the @angular/language-service package is a more complete fix.
atscott added a commit to angular/vscode-ng-language-service that referenced this pull request Jun 8, 2022
The external project management was implemented to prevent TSServer from
closing projects when navigating around. However, this didn't work for
solution style projects. With angular/angular#45965,
the external project management is no longer necessary because that
change in the @angular/language-service package is a more complete fix.
atscott added a commit to angular/vscode-ng-language-service that referenced this pull request Jun 8, 2022
The external project management was implemented to prevent TSServer from
closing projects when navigating around. However, this didn't work for
solution style projects. With angular/angular#45965,
the external project management is no longer necessary because that
change in the @angular/language-service package is a more complete fix.

(cherry picked from commit 16b045d)
@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 Jun 12, 2022
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 target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants