fix: add workspace: protocol for vlt in babylon fixture#51
Merged
darcyclarke merged 1 commit intovltpkg:mainfrom Mar 5, 2026
Merged
fix: add workspace: protocol for vlt in babylon fixture#51darcyclarke merged 1 commit intovltpkg:mainfrom
darcyclarke merged 1 commit intovltpkg:mainfrom
Conversation
vlt requires the workspace: protocol to resolve workspace packages, unlike npm/yarn which auto-detect workspace packages by name. This adds a setup script that rewrites inter-workspace dependency specs to use workspace:* before vlt install runs. Changes: - scripts/add-workspace-protocol.js: Node script that finds all workspace packages and rewrites their inter-dependencies to use workspace:* - scripts/variations/common.sh: Set BENCH_SETUP_VLT to run the script before each vlt install - scripts/clean-helpers.sh: Add clean_workspace_protocol() to restore package.json files via git checkout after vlt runs, preventing workspace: specs from affecting other tools (yarn classic doesn't support the protocol) Ref: vltpkg/vltpkg#1534
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.
Problem
vlt installfails on the babylon fixture because vlt doesn't automatically resolve workspace packages when referenced with plain semver specs (e.g."@dev/build-tools": "^1.0.0"). Unlike npm, yarn, and pnpm, vlt requires the explicitworkspace:protocol to resolve local workspace packages.The error:
vlt tries to fetch private workspace packages from the npm registry, which fails because they only exist locally.
This causes all babylon benchmark results for vlt to show as DNF (Did Not Finish) — confirmed in the latest chart data.
Root Cause
Filed as a vlt bug: vltpkg/vltpkg#1534
Solution
Added a vlt-specific setup script that rewrites inter-workspace dependency specs to use
workspace:*beforevlt installruns. This follows the existing pattern used by zpm/berry (which create.yarnrc.ymlbefore their install).Changes
scripts/add-workspace-protocol.js— Node script that:"@dev/build-tools": "^1.0.0"to"@dev/build-tools": "workspace:*"scripts/variations/common.sh— SetsBENCH_SETUP_VLTto run the script before each vlt installscripts/clean-helpers.sh— Addsclean_workspace_protocol()toclean_all()to restore package.json files viagit checkoutafter vlt runs. This preventsworkspace:specs from leaking to other tools (yarn classic v1 doesn't support the protocol).Testing
Verified locally:
node scripts/add-workspace-protocol.js fixtures/babylon— finds 87 workspace packages, modifies 80 package.json filesvlt install --view=silent— succeeds (was failing before)git checkout -- packages/ package.json— correctly restores all files