Skip to content

Migrate tests to TS Plugin mode, remove option for old LS mode#811

Merged
machty merged 51 commits intomainfrom
ts-plugin-test
Mar 12, 2025
Merged

Migrate tests to TS Plugin mode, remove option for old LS mode#811
machty merged 51 commits intomainfrom
ts-plugin-test

Conversation

@machty
Copy link
Copy Markdown
Contributor

@machty machty commented Mar 7, 2025

In a recent PR, Vue tooling has:

  1. Removed their support between toggling between classic LS-driven typechecking (aka takeover mode) and the new TS Plugin driven diagnostics
  2. Provided examples for how to test the TS Plugin directly via tsserver harness

The timing is good for me to remove these features in Glint and to re-express old LS tests as TS Plugin instead. Otherwise we would experience continued awkward fracturing in Glint's codebase due to the way to way express certain TS tests in the old (and soon to be unused) LS mode, but then have/had no way to test TS Plugin-only stuff (e.g. hbs+ts loose mode two file components) other than to use slow VSCode acceptance tests.

Comment thread packages/core/__tests__/language-server/references-ts-plugin.test.ts Outdated
@machty machty changed the title Begin migrating tests to TS Plugin mode, remove option for old LS mode Migrate tests to TS Plugin mode, remove option for old LS mode Mar 12, 2025
@machty machty merged commit 45026b1 into main Mar 12, 2025
@machty machty deleted the ts-plugin-test branch March 12, 2025 00:57
@johanrd
Copy link
Copy Markdown
Contributor

johanrd commented Mar 18, 2025

@machty FWIW: When upgrading from 1.4.1-unstable.130d85f (The last published version before this PR) to 1.4.1-unstable.45026b1 (this PR), Glint stopped working with the following error message:

Request initialize failed with message: typescript.tsdk is required

Screenshot 2025-03-18 at 09 21 21

– Are there perhaps another set of dependencies required after this PR? thanks!

@machty
Copy link
Copy Markdown
Contributor Author

machty commented Mar 18, 2025

@johanrd what you're seeing makes sense because we need to publish a new version of the Glint VSCode extension. With the shift from LS to TS Plugin, we're no longer able to get away with using an older published VSCode extension version with edge glint.

I believe by the end of the week (likely sooner) I should have an alpha version of VSCode extension published to start trying out TS Plugin, but FYI I expect many issues with this first alpha. If you want to use "edge-ish" glint in the meantime, I'd suggest pinning to the commit before the TS Plugin merge, which is 130d85f

@machty
Copy link
Copy Markdown
Contributor Author

machty commented Mar 23, 2025

@johanrd we have a testable TS Plugin mode available from VSCode Marketplace; try the pre-release version 1.4.3+.

See here for more details: https://github.com/typed-ember/glint/blob/main/GLINT_V2.md

@github-actions github-actions Bot mentioned this pull request Mar 23, 2025
@NullVoxPopuli NullVoxPopuli added the breaking A breaking change label Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking A breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants