overengineeringstudio / overengineeringstudio/effect-utils
Standardize workspace resolution patterns in genie for megarepo consumers
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 82
- Forks
- 2
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 121
Description
Context
createWorkspaceDepsResolver in @overeng/genie runtime enables import-based workspace resolution where each package's pnpm-workspace.yaml.genie.ts imports its deps' package.json.genie.ts files, and the resolver does BFS to find all transitive workspace deps.
This pattern works well for single-repo setups (effect-utils with ~12 @overeng/ packages). However, megarepo consumers composing multiple repos face additional challenges:
-
Cross-repo scope mapping — packages span multiple scopes (
@livestore/,@diffstream/,@overeng/, etc.) at different directory depths. TheresolveWorkspacePathcallback needs a scope-to-path mapping. -
Parallel patterns — livestore currently uses a separate approach: an explicit
workspaceDepsgraph withresolveTransitiveDeps()instead ofcreateWorkspaceDepsResolver. Both solve the same problem differently.
Proposal
Short-term: Converge patterns
Migrate livestore to use createWorkspaceDepsResolver (same as effect-utils), eliminating the redundant manual dep graph + transitive resolver.
Medium-term: Upstream cross-repo helpers
Add reusable helpers to genie runtime for megarepo consumers:
-
Scope-path registry — declarative mapping from package name prefixes to workspace-root-relative directories:
const scopePathMap = { '@livestore/': 'repos/livestore/packages/@livestore/', '@overeng/': 'packages/@overeng/', } -
createMegarepoWorkspaceDepsResolver— wrapscreateWorkspaceDepsResolverwith scope-based path computation, so consumers only declare the mapping instead of writing customresolveWorkspacePathcallbacks. -
Effect-utils package registry re-export — effect-utils packages'
package.json.genie.tsfiles need to be importable by downstream repos for BFS resolution. Consider a single re-export module.
Current Workaround
Each megarepo consumer implements their own resolveWorkspacePath with a scope map. This works but is boilerplate that could be shared.
Filed by Claude on behalf of @schickling
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the createWorkspaceDepsResolver pattern with livestore's workspaceDeps and resolveTransitiveDeps() approach. Review the pnpm-workspace.yaml.genie.ts and package.json.genie.ts entry points, then clarify the intended scope-map helper and migration boundaries. Done requires an agreed reusable cross-repo resolver design and a defined convergence plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100