Skip to content

GLSP-1636: Fix Theia e2e web-server launch across yarn and pnpm#59

Merged
tortmayr merged 1 commit into
mainfrom
fix-theia-e2e-pnpm-exec
Jun 19, 2026
Merged

GLSP-1636: Fix Theia e2e web-server launch across yarn and pnpm#59
tortmayr merged 1 commit into
mainfrom
fix-theia-e2e-pnpm-exec

Conversation

@tortmayr

@tortmayr tortmayr commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What it does

Follow-up to the pnpm migration (#58). The theia Playwright project's web-server launches the theia binary inside the cloned glsp-theia-integration repo. The two package managers disagree on how to do that:

  • pnpm — the script shorthand only runs package.json scripts, so the binary must be invoked via pnpm exec; launching it directly fails with ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL.
  • yarn classic — runs binaries directly and has no exec command, so adding exec makes the web-server exit early.

Because the e2e clones the integration repo's default branch (still yarn mid-migration), no single literal command works for both. The web-server failure was invisible in logs (stdout/stderr: 'ignore'); it only surfaced as Process from config.webServer was not able to start / exited early with zero tests.

Fix: detect the cloned repo's package manager via its lockfile (isYarnRepo, mirroring the existing detection in scripts/setup.ts) and add exec only for pnpm.

This is a temporary workaround, to be removed together with the existing yarn packageManager-pinning workaround in scripts/setup.ts once all GLSP repos are on pnpm.

Part of: eclipse-glsp/glsp#1636

How to test

  • pnpm test:theia against a yarn glsp-theia-integration checkout (current main) and against a pnpm checkout (the migration branch). The Theia app web-server should boot in both cases (Theia app listening on http://127.0.0.1:3000) and the suite should run.
  • The Node / theia and Java / theia CI jobs should go green.

Follow-ups

  • Remove the isYarnRepo branch here and the yarn packageManager pinning in scripts/setup.ts once the pnpm migration of all GLSP repos is complete.

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)

The `theia` project web-server launches the `theia` binary inside the
cloned glsp-theia-integration repo. pnpm's script shorthand only runs
package.json scripts, so the binary must be invoked via `pnpm exec`
(otherwise ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL); yarn classic runs
binaries directly and has no `exec` command. Since the e2e clones the
integration repo's default branch, which is still yarn mid-migration,
neither form works for both.

- Detect the cloned repo's package manager via its lockfile and add
  `exec` only for pnpm
- Mark as temporary, to be removed together with the existing yarn
  workaround in scripts/setup.ts once all repos are on pnpm

Part of: eclipse-glsp/glsp#1636
@tortmayr tortmayr force-pushed the fix-theia-e2e-pnpm-exec branch from 65ecf3c to 9744d97 Compare June 19, 2026 09:11
@tortmayr tortmayr changed the title GLSP-1636: Fix Theia e2e web-server launch under pnpm GLSP-1636: Fix Theia e2e web-server launch across yarn and pnpm Jun 19, 2026
@tortmayr tortmayr merged commit 5cd0167 into main Jun 19, 2026
9 checks passed
@tortmayr tortmayr deleted the fix-theia-e2e-pnpm-exec branch June 19, 2026 11:24
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.

1 participant