Skip to content

Nest Send<Action> as Effect<Action>.Send #1911

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
merged 1 commit into from
Feb 17, 2023

Conversation

tgrapperon
Copy link
Contributor

@tgrapperon tgrapperon commented Feb 15, 2023

Right now, Send<Action> being a top-level type makes it the preferred autocompletion choice when you type "Send…" to make some type Sendable (a very frequent operation). This is suboptimal.

Fortunately, this value is always provided by the library in standard operations, and the user usually doesn't have to handle its type directly. This PR relocates Send<Action> in EffectTask<Action>.Send (that is EffectPublisher<Action, Never>.Send, but it should transparently migrate to Effect<Action>.Send for the v1.0.). The current top-level Send is deprecated (which lowers its autocompletion rank and gives way to Sendable), but this shouldn't impact existing user code which should seamlessly resolve to Effect<Action>.Send instead of Send<Action> in the vast majority of cases.

It doesn't seem possible to provide a rename: argument to the deprecation annotation.

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants