Skip to content

remove makeRuntime facade from Env - #22523

Merged
kitlangton merged 2 commits into
devfrom
kit/env-facade-cleanup
Apr 15, 2026
Merged

remove makeRuntime facade from Env#22523
kitlangton merged 2 commits into
devfrom
kit/env-facade-cleanup

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Summary

  • Remove the standalone makeRuntime + facade functions (Env.get, Env.set, Env.all, Env.remove) from src/env/index.ts
  • Add Env.defaultLayer to AppLayer so Env.Service is available through AppRuntime
  • Migrate test callers to use a local shorthand backed by AppRuntime.runPromise(Env.Service.use(...))

Changes

File What changed
src/env/index.ts Removed makeRuntime import and 4 facade functions (19 lines deleted)
src/effect/app-runtime.ts Added Env import and Env.defaultLayer to AppLayer
test/provider/provider.test.ts Added set shorthand, replaced ~59 Env.set(...) calls with await set(...)
test/provider/amazon-bedrock.test.ts Added set shorthand, replaced ~15 Env.set(...) calls with await set(...)

All typechecks and tests pass.

Remove the standalone makeRuntime + facade functions (Env.get, Env.set,
Env.all, Env.remove) from src/env/index.ts. Add Env.defaultLayer to
AppLayer so Env.Service is available through AppRuntime.

Test callers now use a local shorthand backed by
AppRuntime.runPromise(Env.Service.use(...)) instead of the deleted
sync facades.
@kitlangton
kitlangton marked this pull request as ready for review April 15, 2026 14:55
@kitlangton
kitlangton merged commit fe01fa7 into dev Apr 15, 2026
8 of 10 checks passed
@kitlangton
kitlangton deleted the kit/env-facade-cleanup branch April 15, 2026 14:55
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant