Skip to content

fix: break circular dependency via dispatch registry#20#21

Merged
flyon merged 3 commits intomainfrom
dev
Mar 4, 2026
Merged

fix: break circular dependency via dispatch registry#20#21
flyon merged 3 commits intomainfrom
dev

Conversation

@flyon
Copy link
Member

@flyon flyon commented Mar 4, 2026

Summary

  • Breaks the circular import Shape → QueryParser → LinkedStorage → Shape by introducing a leaf dispatch module (queryDispatch.ts)
  • Shape and SelectQuery call getQueryDispatch() to execute queries; LinkedStorage registers itself as the dispatch provider in setDefaultStore()
  • Removes QueryParser entirely (was a 79-line pass-through with no logic)
  • LinkedStorage no longer imports Shape — uses Function prototype-chain walking for store resolution

Test plan

  • tsc --noEmit passes
  • All 18 test suites pass (477 tests green)
  • Zero circular imports between Shape, LinkedStorage, and query modules
  • Store routing tests verify prototype-chain walk terminates correctly

🤖 Generated with Claude Code

René Verheij and others added 3 commits March 4, 2026 11:56
Introduce a dispatch registry (`queryDispatch.ts`) as a leaf module that
both Shape and LinkedStorage import without importing each other. Remove
QueryParser (was a pass-through with no logic). LinkedStorage registers
as the dispatch provider in `setDefaultStore()`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: break circular dependency via dispatch registry
@flyon flyon merged commit e7031c3 into main Mar 4, 2026
6 checks passed
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