refactor: simplify Effect server architecture - #108
Conversation
commit: |
Benchmark results
|
Merging this PR will not alter performance
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 779d017fee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await configA.buildEnd?.(...args); | ||
| await configB.buildEnd?.(...args); |
There was a problem hiding this comment.
Run every merged buildEnd hook before rejecting
When multiple presets and/or the user config provide buildEnd, a rejection from configA.buildEnd now prevents configB.buildEnd from being invoked. The previous Promise.all/Effect.all composition started every merged hook, so this can skip required cleanup or artifact-finalization work whenever an earlier hook fails; preserve deterministic ordering if desired, but still attempt all hooks before propagating their failures.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in #109 with a regression test that fails when a later merged buildEnd hook is skipped. The follow-up preserves deterministic order, runs remaining hooks, and rethrows the first normalized failure.
Summary
ManagedRuntimefor each plugin setup.type generation, prerender workflows, background fibers, and finalizers.
shutdown path.
bespoke transform worker is not reintroduced.
Current-main repair
This branch was rebuilt from current
mainafter #74 and #86 merged. It is nowa single commit and contains none of the obsolete pre-squash #74 history.
Conflict resolution preserves the verified RR8/RSC fixes from #74 and the
transform-loader design from #86.
Maintainability
Scope,FiberSet, andManagedRuntimereplace manual watcher,delayed-task, and cleanup coordination.
src/is 100 lines smaller than currentmain(631 additions,731 deletions).
Release
Validation
pnpm test— 61 files and 639 tests passed, including all TypeScriptproject checks.
pnpm build.pnpm test:package-interop.pnpm e2e— all selected classic SSR, SPA, prerender, custom-server,Cloudflare, React Router 8, and RSC development/production examples passed.
pnpm format:check,pnpm changeset status, andgit diff --check.checked to contain no Effect imports.
Performance
This is a lifecycle/maintainability change, not a claimed hot-path speedup.
Effect remains outside emitted transform loaders and browser/runtime templates;
the current-head benchmark checks are left to CI rather than carrying forward
stale measurements from the old stacked branch.