Skip to content

GLSP-1682: Consume the glsp-core packages and migrate the VS Code e2e tests - #113

Merged
tortmayr merged 11 commits into
masterfrom
core-migration
Sep 17, 2026
Merged

tortmayr merged 11 commits into
masterfrom
core-migration

Conversation

@tortmayr

@tortmayr tortmayr commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What it does

Aligns this repository with the glsp-core consolidation: the client, protocol, Node server and the integration-agnostic parts of the Workflow example and the Playwright framework are now consumed as published packages, and the VS Code e2e tests live here.

  • Add a new e2e/ workspace directory with @eclipse-glsp/playwright-vscode, the published VS Code integration for the GLSP Playwright framework, and the private workflow-vscode-e2e package holding the Playwright configuration and specs. Running them no longer requires glsp-playwright and glsp-server-node checkouts next to this repository
  • Cover the desktop and the web extension variant as separate Playwright projects instead of the USE_WEB_EXTENSION switch, each installed into an extensions directory of its own, and resolve the webview by class so the web variant is testable at all
  • Let Playwright start only the bundled Workflow node server and export the connection settings the extension attaches to; any other server, including the Maven-built Java server, is expected to be running already
  • Migrate to pnpm 12, oxc and TypeScript 7, following glsp-core.
  • Raise the floor to Node 24 across the engines field and the workflows, and update pnpm/action-setup to v6.1.0, which is the first release supporting pnpm 12

Also:

  • Report lint findings as a Markdown table in the CI job summary via scripts/lint-report.mjs, replacing the eslint-json-to-md step
  • Rework the agent instructions to the shared AGENTS.md + .agents/skills/ layout, and update README.md, CONTRIBUTING.md and the package READMEs to point at glsp-core instead of glsp-client and glsp-server-node

Part of: eclipse-glsp/glsp#1682

How to test

pnpm i --frozen-lockfile
pnpm check:all
pnpm test:e2e     # prefix with `xvfb-run -a` on a headless machine

test:e2e builds the workspace, packages both VSIX variants and runs the desktop and web suites; single variants via pnpm e2e test:desktop / pnpm e2e test:web. The Workflow example itself can be launched as before from the Workflow GLSP Example Extension launch configurations.

  • pnpm check:all and pnpm test:e2e verified locally (both variants green)

Follow-ups

  • @eclipse-glsp/playwright-vscode is published from this repository for the first time; the first release run should confirm the publish job picks it up
  • The next dependency versions are now exact, so nightly bumps arrive as reviewable diffs from pnpm upgrade:next instead of floating

Changelog

  • This PR should be mentioned in the changelog
  • This PR introduces a breaking change (if yes, provide more details below for the changelog and the migration guide)

Breaking: the minimum Node version is raised to 24 (pnpm 12 for development), and the GLSP client/protocol dependencies are now sourced from glsp-core.

tortmayr and others added 7 commits September 17, 2026 09:47
- Add `@eclipse-glsp/playwright-vscode`, the published VS Code
  integration for the GLSP Playwright framework, and a private
  `workflow-vscode-e2e` package holding the Playwright configuration
  and specs, both under a new `e2e/` workspace directory
- Consume the framework and the integration-agnostic Workflow suites
  from glsp-core (`@eclipse-glsp/playwright`,
  `@eclipse-glsp-examples/workflow-e2e`) as regular npm dependencies, so
  running the tests no longer requires glsp-playwright and
  glsp-server-node checkouts next to this repository. The VSIX under
  test is likewise resolved from this repository instead of through the
  GLSP CLI
- Cover the desktop and the web extension variant as separate Playwright
  projects, replacing the `USE_WEB_EXTENSION` switch. Both contribute the
  same custom editor, so each variant is installed into an extensions
  directory of its own via the new `extensionsDir` option; without it the
  workbench would decide which one the tests exercise
- Resolve the webview by class instead of by tag. A web extension is
  hosted in an additional hidden worker-host iframe, which made the
  previous selector ambiguous and the web variant untestable
- Let Playwright start only the bundled Workflow node server and export
  the connection settings the extension reads, so it attaches instead of
  spawning its own. Any other server, including the Maven-built Java
  server, is expected to be running already, mirroring glsp-core
- Reduce the e2e workflow to a single checkout accordingly. It stays red
  until glsp-core publishes its packages to npm

Also:
- Remove the obsolete `.yarnrc` left over from the migration to pnpm
- Adapt to the reformatting and the obsolete lint suppressions reported
  by the newer `@eclipse-glsp/prettier-config` and `eslint-config`

Part of: eclipse-glsp/glsp#1682

Co-authored-by: Haydar Metin <dev@haydar.metin.at>
- Drop the local verdaccio redirect and resolve `@eclipse-glsp` and
  `@eclipse-glsp-examples` from npmjs again, now that glsp-core publishes
  its packages
- Migrate to pnpm 12, oxc and TypeScript 7, following glsp-core. This
  rides along rather than landing separately because the dependency
  update forces it: the shared `ts-config` sets `moduleResolution:
  bundler`, which TypeScript 5 rejects for CommonJS output, and
  `@eclipse-glsp/config` no longer provides ESLint or Prettier at all
- Replace the ESLint and Prettier setup with `oxlint.config.mts` and
  `oxfmt.config.mts`, and lint from the repository root only, dropping
  the per-package lint scripts
- Raise the floor to Node 24 across the engines field and the workflows,
  matching the toolchain glsp-core now requires

Also:

- Point the editor configuration at the oxc extension and the TypeScript
  Native Preview extension; TypeScript 7 ships no tsserver, so
  `typescript.tsdk` can no longer be used
- Drop the unused `mocha-ctrf-json-reporter` dependency and the hoisting
  entries for the mocha toolchain, which this workspace no longer uses

Part of: eclipse-glsp/glsp#1682
`glsp updateNext` no longer resolves a floating `next` dist-tag range at
install time; it rewrites the manifests to the currently published exact
version instead, so every nightly bump is a reviewable diff.

- Replace the literal `next` ranges of the `@eclipse-glsp` and
  `@eclipse-glsp-examples` dependencies with the exact versions the
  command resolves, as produced by `pnpm upgrade:next`

Part of: eclipse-glsp/glsp#1682
Follow the layout glsp-core settled on, so that the instructions are
shared by every agent rather than being Claude-specific.

- Reduce `CLAUDE.md` to a reference to `AGENTS.md` and rewrite the latter
  as a short list of working rules instead of a project description that
  restates `README.md` and `package.json`
- Move the skills to `.agents/skills/` and mirror them into
  `.claude/skills/` for discovery
- Exclude both directories from the workflow path filters, so agent
  metadata changes no longer start CI or e2e builds

Also, correcting what the skills claimed:

- The fix skill now notes that linting type-checks too, and why the e2e
  suites are excluded
- The changelog skill used the old Prettier list markers and named
  Prettier as the formatter; it is now oxfmt-correct. Changelog
  generation is no longer model-invocable, matching glsp-core

Part of: eclipse-glsp/glsp#1682
The client, protocol, Node server, Workflow example and the Playwright
framework are now consumed from `glsp-core`, but the documentation still
pointed at `glsp-client` and `glsp-server-node`, which are about to be
archived.

- Replace those references in `README.md`, `CONTRIBUTING.md` and the
  package READMEs with `glsp-core`, keeping `glsp-server` for the Java
  server. The server-from-sources section now distinguishes which repo
  holds which variant
- Describe the package layout in `README.md`, which `AGENTS.md` refers to
  for exactly that and which never mentioned the `e2e` packages. Document
  `pnpm test:e2e` alongside it

Also:
- Correct the prerequisites, which still asked for Node 22 and pnpm 11

Part of: eclipse-glsp/glsp#1682
`pnpm/action-setup` v6.0.8 predates pnpm v12 support and installs it into
the v10 `PNPM_HOME` layout, where pnpm no longer exposes its bundled
node-gyp to lifecycle scripts. Raising `packageManager` to pnpm 12
therefore breaks the install step of any workflow whose dependency graph
builds a native module.

- Update the action to v6.1.0, whose only change is pnpm v12 support, in
  all four workflows that set pnpm up

Part of: eclipse-glsp/glsp#1682
`oxlint --format github` only emits inline annotations, so a failing Lint
job gave no overview of what was wrong without scrolling the raw log.

Adopt the `lint-report.mjs` script from glsp-core, which runs oxlint once
with the JSON reporter and emits both the inline annotations and a
Markdown table in the job summary. It fails on errors and passes on
warnings, exactly like `pnpm lint`.

Part of: eclipse-glsp/glsp#1682

@haydar-metin haydar-metin left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add a script for headless test:e2e in the package.json so that i dont need to remember the concrete code to run it?


Watch doesnt work:

❯ pnpm watch
$ concurrently --kill-others -n tsc,webview,extension,web-extension -c red,blue,yellow,green "tsc -b -w --preserveWatchOutput" "pnpm -sworkflow:webview watch:bundle" "pnpm -s workflow watch:bundle" "pnpm -s workflow:web watch:bundle"
[tsc] [10:56:46 AM] Starting compilation in watch mode...
[tsc]
[web-extension] error: unexpected argument '-s' found
[web-extension]
[web-extension] Usage: pnpm [OPTIONS]
[web-extension]
[web-extension] For more information, try '--help'.
[extension] error: unexpected argument '-s' found
[extension]
[extension] Usage: pnpm [OPTIONS]
[extension]
[extension] For more information, try '--help'.
[tsc] [10:56:46 AM] Found 0 errors. Watching for file changes.
[tsc]
[extension] pnpm -s workflow watch:bundle exited with code 2
--> Sending SIGTERM to other processes..
[web-extension] pnpm -s workflow:web watch:bundle exited with code 2
--> Sending SIGTERM to other processes..
[webview] error: unexpected argument '-s' found
[webview]
[webview] Usage: pnpm [OPTIONS]
[webview]
[webview] For more information, try '--help'.
[webview] pnpm -s workflow:webview watch:bundle exited with code 2
--> Sending SIGTERM to other processes..
[tsc] tsc -b -w --preserveWatchOutput exited with code SIGTERM
[ELIFECYCLE] Command failed with exit code 1.

Two findings from the review of the glsp-core migration.

- Restore `pnpm watch`, which died on an argument error for each of the
  three bundler processes: pnpm 12 no longer takes `-s` as the global
  silent shorthand, on `run` it means `--sequential` now. Pass
  `--silent` instead
- Add `test:e2e:headless` and `e2e test:headless`, which wrap the run in
  `xvfb-run -a`, so running the suites without a display no longer means
  remembering the incantation. The e2e workflow and the documentation
  use them

Part of: eclipse-glsp/glsp#1682
`glsp releng publish next` publishes only the packages affected by the
last commit. Following glsp-core, expose a toggle that overrides that
baseline, for the cases where a publish has to cover everything.

- Add a `full` input to the `workflow_call` and `workflow_dispatch`
  entry points and pass `--full` to `publish:next` when it is set
- Drop the hand-written change detection, which predates the affected-only
  publishing in the CLI and duplicated it. It also only ever matched
  `packages/`, so a change confined to the published `e2e` package would
  have skipped the publish job entirely

Part of: eclipse-glsp/glsp#1682
Concurrent Playwright workers made the hover-driven tests flaky, which is
what turned the e2e job red: VS Code windows sharing one display and one
pointer deliver the enter and leave events of a window that opens or
closes to whichever window is underneath, cancelling a hover another
worker is waiting on. The suites then time out waiting for the popup.
Neither retrying the hover in the test framework nor dropping the
webview's focus-lost dispatch removes it, so the interference is
environmental rather than a client bug.

- Start one `Xvfb` per worker process and launch that worker's VS Code on
  it, requested with `GLSP_VSCODE_ISOLATED_DISPLAYS` and set by the
  `:headless` scripts. The server picks a free display itself, so workers
  starting at the same time cannot collide
- Derive the worker count from that isolation: half the cores, at most
  four, and one wherever the displays cannot be separated, which covers
  a plain run watched on the caller's display as well as macOS and
  Windows
- Split the e2e workflow into one job per packaged variant, so the
  desktop and the web suites no longer run back to back

The desktop and the web suite pass on four workers in 1.6 and 1.7 minutes
respectively, against 5.2 and 5.3 minutes serially.

Part of: eclipse-glsp/glsp#1682
Splitting the e2e workflow per variant broke it: each job packages only
its own extension, and the configuration resolved the path of every
declared variant eagerly, so the job failed on the VSIX it had no reason
to build. It passed locally only because a full run leaves both files
behind.

- Accept a function for `vsixPath` and call it from the setup project, so
  the path is resolved for the variant that runs rather than for all of
  them
- Declare the projects of both variants unconditionally and leave the
  filtering to Playwright's `--project`. Deriving the list from
  `process.argv` never worked in the first place: the configuration is
  re-loaded in every worker process, whose arguments are the worker's

Part of: eclipse-glsp/glsp#1682
@tortmayr
tortmayr merged commit 5a53f63 into master Sep 17, 2026
5 checks passed
@tortmayr
tortmayr deleted the core-migration branch September 17, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants