Skip to content

GLSP-1636: Rework cross-repo linking and finish the pnpm-only CLI#1703

Merged
tortmayr merged 1 commit into
masterfrom
GLSP-1636-cli-pnpm-link-and-releng-e2e
Jun 20, 2026
Merged

GLSP-1636: Rework cross-repo linking and finish the pnpm-only CLI#1703
tortmayr merged 1 commit into
masterfrom
GLSP-1636-cli-pnpm-link-and-releng-e2e

Conversation

@tortmayr

Copy link
Copy Markdown
Contributor

What it does

Reworks glsp repo link onto pnpm and removes the remaining lerna/yarn-era code paths from the CLI after the pnpm migration.

  • Rework repo link/unlink to inject link: overrides into each consumer's pnpm-workspace.yaml (dependency-ordered), sharing the singleton peers (sprotty, sprotty-protocol, vscode-jsonrpc, inversify) from glsp-client so they resolve to a single instance across the link.
  • Build each linked repo so the overrides resolve to compiled lib/ output instead of empty source dirs (pnpm does not run yarn's prepare-on-install); --no-build skips it, --electron picks the Theia target.
  • Do not link reflect-metadata: v0.2+ shares one registry on the global Reflect so multiple copies interoperate, and overriding it broke the linked build's types: ['reflect-metadata'] resolution (TS2688).
  • Support linking glsp-eclipse-integration, whose pnpm workspace lives in a client/ subdirectory; the link build covers only the npm side and leaves the Maven server to a separate build.
  • Remove lerna/yarn-era leftovers: the lerna publish fallback, the lerna.json version update, the yarn updateNext path and the PackageManager auto-detection; align the releng e2e specs and CLI README with the pnpm reality.

Part of: #1636

How to test

pnpm install && pnpm build && pnpm test    # 395 unit tests

Cross-repo linking (requires sibling clones; pick a preset):

glsp repo clone --preset theia    # or vscode / eclipse
glsp repo link  --preset theia    # clones are linked + built in dependency order
glsp repo unlink --preset theia   # restores pnpm-workspace.yaml byte-for-byte

Verified locally:

  • pnpm build + 395 unit tests green
  • theia / vscode / eclipse presets: clone → link → build → unlink round-trip clean
  • Theia app runs against the linked stack (pnpm browser start); the GLSP server launches from the linked source
  • inversify resolves to a single instance across all linked boundaries; reflect-metadata is not overridden
  • eclipse links via its client/ workspace with no Maven invocation

Follow-ups

  • A glsp repo watch command (running tsc -b -w across the linked upstream repos) would give live auto-pickup of source changes; investigated but not implemented here.
  • The glsp-eclipse-integration and glsp-vscode-integration pnpm migrations are still on unmerged branches; linking those presets requires them on the default branch.

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)

Rework `glsp repo link` onto pnpm and remove the remaining lerna/yarn-era
code paths from the CLI after the pnpm migration.

- Rework `repo link`/`unlink` to inject `link:` overrides into each
  consumer's pnpm-workspace.yaml (dependency-ordered), sharing the
  singleton peers (sprotty, sprotty-protocol, vscode-jsonrpc, inversify)
  from glsp-client so they resolve to a single instance across the link.
- Build each linked repo so the overrides resolve to compiled lib/
  output instead of empty source dirs (pnpm does not run yarn's
  prepare-on-install); --no-build skips it, --electron picks the Theia
  target.
- Do not link reflect-metadata: v0.2+ shares one registry on the global
  Reflect so multiple copies interoperate, and overriding it broke the
  linked build's `types: ['reflect-metadata']` resolution (TS2688).
- Support linking glsp-eclipse-integration, whose pnpm workspace lives
  in a client/ subdirectory; the link build only covers the npm side and
  leaves the Maven server to a separate build.
- Remove lerna/yarn-era leftovers: the lerna publish fallback, the
  lerna.json version update, the yarn updateNext path and the
  PackageManager auto-detection, and align the releng e2e specs and CLI
  README with the pnpm reality.

Part of: #1636
@tortmayr tortmayr merged commit 8330e2e into master Jun 20, 2026
4 checks passed
@tortmayr tortmayr deleted the GLSP-1636-cli-pnpm-link-and-releng-e2e branch June 20, 2026 21:46
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