Skip to content

refactor: migrate Effect call sites from Flock to EffectFlock#22688

Merged
kitlangton merged 1 commit intodevfrom
feat/effect-flock-migrate
Apr 16, 2026
Merged

refactor: migrate Effect call sites from Flock to EffectFlock#22688
kitlangton merged 1 commit intodevfrom
feat/effect-flock-migrate

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Migrates the 3 call sites that are already in Effect code from imperative Flock to the new EffectFlock service
  • shared/npm.ts: Flock.effect(key)flock.acquire(key) (2 calls)
  • config/config.ts: Effect.promise(() => Flock.acquire(...)) + acquireUseReleaseflock.withLock(body, key) (1 call)
  • Wires EffectFlock.layer / EffectFlock.live into Npm.defaultLayer and Config.defaultLayer

Depends on

Remaining

9 call sites in plain async code (plugin/meta.ts, plugin/install.ts, provider/models.ts, npm/index.ts, cli/cmd/tui/plugin/runtime.ts) — these need broader Effect migration before they can switch.

@kitlangton kitlangton force-pushed the feat/effect-flock-migrate branch 6 times, most recently from c514985 to 4bfa5aa Compare April 16, 2026 02:17
@kitlangton kitlangton marked this pull request as ready for review April 16, 2026 02:29
- shared/npm.ts: Flock.effect → flock.acquire (2 calls), EffectFlock.layer added to Npm.defaultLayer
- config/config.ts: Flock.acquire via Effect.promise + acquireUseRelease → flock.withLock (1 call), EffectFlock.live added to Config.defaultLayer

Stacked on feat/effect-flock. The 9 remaining Flock call sites are in plain async code and need broader Effect migration.
@kitlangton kitlangton force-pushed the feat/effect-flock-migrate branch from 4bfa5aa to 4a62ca9 Compare April 16, 2026 02:32
@kitlangton kitlangton enabled auto-merge (squash) April 16, 2026 02:36
@kitlangton kitlangton merged commit 6c7e9f6 into dev Apr 16, 2026
10 checks passed
@kitlangton kitlangton deleted the feat/effect-flock-migrate branch April 16, 2026 02:40
jerome-benoit pushed a commit to jerome-benoit/opencode that referenced this pull request Apr 16, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 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