feat(core): keep TaskEngine.layer; compose Bun via layerNoDeps - #13
Open
arekbartnik wants to merge 2 commits into
Open
feat(core): keep TaskEngine.layer; compose Bun via layerNoDeps#13arekbartnik wants to merge 2 commits into
arekbartnik wants to merge 2 commits into
Conversation
TaskEngine no longer embeds node-redis or NodeCrypto. Node apps use NodeLive.layer. Bun plus node-redis composes TaskEngine.layer with NodeRedisPool.layer and BunCrypto.layer.
|
@arekbartnik is attempting to deploy a commit to the juliascript's projects Team on Vercel. A member of the Team first needs to authorize it. |
NodeLive named the Node adapter. Callers should keep TaskEngine.layer. layerNoDeps is the compose path for a custom RedisPool or BunCrypto.
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.
Why
TaskEngine.layerstays the call site. Process runtime and Redis adapter are separate axes: Node or Bun forrunMain,NodeRedisPoolfor Redis. The engine does not pick a process runtime.Scope
TaskEngine.layer({ engine?, redis? })is the live graph (NodeRedisPool+NodeCrypto+ engine). ItsLayer.Servicesisnever.TaskEngine.layerNoDepsrequiresRedisPoolonly. That is the compose path for a custom client orBunCrypto.NodeRedisPoolstays public so BunRuntime + node-redis is a first-class pipe.@effect/platform-bunis an optional peer and a pinned devDependency.PublicContracts.test.tspinslayer()tonever,layerNoDeps()toRedisPool, the live-graph success union, and the Bun plus node-redis pipe tonever.scripts/check-architecture.tsrejectsredisand@effect/platform-nodeimports outsideTaskEngine,NodeRedisPool, and the CLI.RedisClientis out of scope. Itssendstill cannot return bytes.Tradeoffs
We keep
redisand@effect/platform-nodeas package dependencies soTaskEngine.layerstill ships a working graph. Bun users who want the same adapter get node-redis transitively. A publicNodeLivemodule leaked the Node attachment and forced a call-site rename.Blast Radius
Callers of
TaskEngine.layer({ redis })are unchanged. CustomlayerNoDepscallers are unchanged. Bun with node-redis uses the sameTaskEngine.layerplusBunRuntime.runMain, orlayerNoDepsplusBunCryptowhen Crypto must be explicit.Verification
pnpm typecheck:src,typecheck:test,lint,check:architecture,check:docspassed.pnpm vitest run src/PublicContracts.test.tspassed.rediscreateClientPoolagainst Redis 7.4:PONG, lossless binary GET,XREADasMap.