GLSP-1636: Rework cross-repo linking and finish the pnpm-only CLI#1703
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Reworks
glsp repo linkonto pnpm and removes the remaining lerna/yarn-era code paths from the CLI after the pnpm migration.repo link/unlinkto injectlink:overrides into each consumer'spnpm-workspace.yaml(dependency-ordered), sharing the singleton peers (sprotty,sprotty-protocol,vscode-jsonrpc,inversify) fromglsp-clientso they resolve to a single instance across the link.lib/output instead of empty source dirs (pnpm does not run yarn'sprepare-on-install);--no-buildskips it,--electronpicks the Theia target.reflect-metadata: v0.2+ shares one registry on the globalReflectso multiple copies interoperate, and overriding it broke the linked build'stypes: ['reflect-metadata']resolution (TS2688).glsp-eclipse-integration, whose pnpm workspace lives in aclient/subdirectory; the link build covers only the npm side and leaves the Maven server to a separate build.lerna.jsonversion update, the yarnupdateNextpath and thePackageManagerauto-detection; align the releng e2e specs and CLI README with the pnpm reality.Part of: #1636
How to test
Cross-repo linking (requires sibling clones; pick a preset):
Verified locally:
pnpm build+ 395 unit tests greenpnpm browser start); the GLSP server launches from the linked sourceinversifyresolves to a single instance across all linked boundaries;reflect-metadatais not overriddenclient/workspace with no Maven invocationFollow-ups
glsp repo watchcommand (runningtsc -b -wacross the linked upstream repos) would give live auto-pickup of source changes; investigated but not implemented here.glsp-eclipse-integrationandglsp-vscode-integrationpnpm migrations are still on unmerged branches; linking those presets requires them on the default branch.Changelog