Skip to content

feat: Function Parameters for Effect.Service #4911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

TylorS
Copy link
Contributor

@TylorS TylorS commented May 22, 2025

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

POC to adding overloads to all Effect.Service's effect and scoped variants to accept function parameters

Related

  • Related Issue #
  • Closes #

@TylorS TylorS requested a review from mikearnaldi as a code owner May 22, 2025 01:22
@github-project-automation github-project-automation bot moved this to Discussion Ongoing in PR Backlog May 22, 2025
Copy link

changeset-bot bot commented May 22, 2025

🦋 Changeset detected

Latest commit: 6cc9656

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
effect Minor
@effect/cli Major
@effect/cluster Major
@effect/experimental Major
@effect/opentelemetry Major
@effect/platform-browser Major
@effect/platform-bun Major
@effect/platform-node-shared Major
@effect/platform-node Major
@effect/platform Major
@effect/printer-ansi Major
@effect/printer Major
@effect/rpc Major
@effect/sql-clickhouse Major
@effect/sql-d1 Major
@effect/sql-drizzle Major
@effect/sql-kysely Major
@effect/sql-libsql Major
@effect/sql-mssql Major
@effect/sql-mysql2 Major
@effect/sql-pg Major
@effect/sql-sqlite-bun Major
@effect/sql-sqlite-do Major
@effect/sql-sqlite-node Major
@effect/sql-sqlite-react-native Major
@effect/sql-sqlite-wasm Major
@effect/sql Major
@effect/typeclass Major
@effect/vitest Major
@effect/ai Major
@effect/ai-anthropic Major
@effect/ai-openai Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@effect-bot effect-bot changed the base branch from main to next-minor May 22, 2025 01:22
@mikearnaldi
Copy link
Member

I would not try to do memoization, that should be left to the user if they want to. At the moment the rule for functions returning layers is that to have a stable instance you need to extract the function call into a stable reference, which is what we do for anything like OpenAi.layerConfig etc

@effect-bot effect-bot force-pushed the next-minor branch 3 times, most recently from aa2ec73 to c051853 Compare May 23, 2025 01:29
@effect-bot effect-bot force-pushed the next-minor branch 2 times, most recently from b8850b4 to c6bd1f8 Compare May 23, 2025 14:21
@TylorS
Copy link
Contributor Author

TylorS commented May 23, 2025

Thanks for making this actually functional @tim-smart!

@effect-bot effect-bot force-pushed the next-minor branch 2 times, most recently from 07444af to 2212e0f Compare May 24, 2025 07:45
@github-project-automation github-project-automation bot moved this from Discussion Ongoing to Needs merge in PR Backlog May 24, 2025
@tim-smart tim-smart merged commit 227a521 into Effect-TS:next-minor May 24, 2025
11 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog May 24, 2025
@effect-bot effect-bot mentioned this pull request May 24, 2025
effect-bot pushed a commit that referenced this pull request May 24, 2025
effect-bot pushed a commit that referenced this pull request May 24, 2025
effect-bot pushed a commit that referenced this pull request May 26, 2025
effect-bot pushed a commit that referenced this pull request May 27, 2025
effect-bot pushed a commit that referenced this pull request May 27, 2025
effect-bot pushed a commit that referenced this pull request May 27, 2025
effect-bot pushed a commit that referenced this pull request May 27, 2025
effect-bot pushed a commit that referenced this pull request May 27, 2025
tim-smart added a commit that referenced this pull request May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants