Skip to content

Deprecate the EffectHandler protocol#210

Open
kmcbride wants to merge 1 commit intospotify:masterfrom
kmcbride:deprecate-effect-handler-protocol
Open

Deprecate the EffectHandler protocol#210
kmcbride wants to merge 1 commit intospotify:masterfrom
kmcbride:deprecate-effect-handler-protocol

Conversation

@kmcbride
Copy link
Copy Markdown
Collaborator

@kmcbride kmcbride commented Apr 23, 2024

I propose deprecating EffectHandler and removing it in a future release because I believe it leads to frequent misuse of the API without providing any obvious advantages. This removal will ideally encourage users to be more intentional about which type of handler they route to.

@kmcbride kmcbride force-pushed the deprecate-effect-handler-protocol branch 6 times, most recently from fd8cb51 to 6dfa6ac Compare April 24, 2024 04:36
Copy link
Copy Markdown

@erikprice erikprice left a comment

Choose a reason for hiding this comment

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

Some great refactoring in this PR. I think I agree with the deprecation as well.

// When an effect has completed, it should be removed from this dictionary.
// When disposing this effect handler, all entries must be removed.
private var handlingEffects: [Int64: EffectHandlingState<Event>] = [:]
private var ongoingEffects: [Int64: EffectHandlingState<Event>] = [:]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💯 this rename

@kmcbride kmcbride force-pushed the deprecate-effect-handler-protocol branch from 6dfa6ac to d5c2d36 Compare April 25, 2024 03:25
@kmcbride kmcbride force-pushed the deprecate-effect-handler-protocol branch from d5c2d36 to 1892541 Compare February 18, 2025 15:27
@kmcbride kmcbride force-pushed the deprecate-effect-handler-protocol branch from 1892541 to 9ad1897 Compare March 12, 2025 17:28
@kmcbride kmcbride force-pushed the deprecate-effect-handler-protocol branch from 9ad1897 to e94c6bb Compare April 9, 2026 21:01
@kmcbride kmcbride force-pushed the deprecate-effect-handler-protocol branch from e94c6bb to 879ff08 Compare April 9, 2026 21:08
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