fix: declare @spacedevin/deck as a peer of both packages - #26
Merged
Conversation
The gen_block dialect registry is module-level mutable state (`let dialects = {}` in
GenBlock.tish). A package that bundles its own copy of the language gives its consumer a
second registry, so a dialect registered against one is invisible to the other — and
because tish build inlines each import graph, it also collides every top-level symbol in
the parser.
That is not theoretical. Deckard's main went red with "Identifier 'normalizeGeneratorId'
has already been declared" the moment it consumed the published synths package: its
lockfile held deck 1.6.2 while deck-synths declared ^1.8.0, so pnpm kept both.
Peer, so the consumer supplies the single instance. Kept as a devDependency (file:../..)
so the workspace still links locally, and both CI pack steps now stamp the peer range and
drop the dev link.
Verified against a consumer pinned to the OLD range that caused the collision: one copy of
the language on disk instead of two, and pnpm reports the skew as "unmet peer" at install
rather than a duplicate that explodes at build. On the correct range: one copy, 968
assertions, 0 failures. Both suites here unchanged (8 language, 46 player).
spacedevin
force-pushed
the
fix/deck-as-peer
branch
from
September 1, 2026 06:42
be01fc5 to
e10eb52
Compare
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.
The
gen_blockdialect registry is module-level mutable state —let dialects = {}inGenBlock.tish. A package that bundles its own copy of the language hands its consumer a second registry, so a dialect registered against one is invisible to the other. And becausetish buildinlines each import graph, two copies also collide every top-level symbol in the parser.This is live, not theoretical
Deckard's
mainwent red the moment it consumed the published catalog:Its lockfile held
@spacedevin/deck@1.6.2while@spacedevin/deck-synths@1.8.0declares^1.8.0, so pnpm kept both on disk. spacedevin/deckard#16 pins the versions together as an immediate unblock; this is the fix that stops it recurring whenever the ranges drift.Change
@spacedevin/deckmoves fromdependenciestopeerDependenciesin bothpackages/synthsandpackages/player, so the consumer supplies the single instance. It stays adevDependency(file:../..) so the workspace links locally, and both CI pack steps now stamp the peer range and drop the dev link.Verified
Against a consumer deliberately pinned to the old
^1.6.2range — the exact configuration that caused the collision:✕ unmet peer @spacedevin/deck@^1.8.0: found 1.6.2at install time, instead of a silent duplicate that explodes at build timeOn the correct range: one copy, 968 assertions, 0 failures, no duplicate-declaration error.
Both suites in this repo unchanged — 8 language, 46 player.