Skip to content

Conversation

@eed3si9n
Copy link
Member

@eed3si9n eed3si9n commented Feb 9, 2025

Problem

The sbtn response handling code def onResponse(msg: JsonRpcResponseMessage): Unit is relatively straightforward, but it's a bit messy.

Solution

This cleans it up a bit, similar to the style used by Unfiltered back then (not sure how Unfiltered plans are written nowadays) by expressing each event handling as a partial function, and composing them together using orElse.

@eed3si9n eed3si9n force-pushed the wip/refactor-sbtn branch 2 times, most recently from aa283f3 to c44acf9 Compare February 9, 2025 23:12
**Problem**
The sbtn response handling code is relatively stragightforward,
but it's a bit messy.

**Solution**
This cleans it up a bit, similar to the style used by Unfiltered
back then (not sure how Unfiltered plans are written nowadays) by
expressing each event handling as a partial function, and composing them
together using `orElse`.
@eed3si9n eed3si9n changed the title refactor: Refactor response handler [1.x] refactor: Refactor response handler Feb 9, 2025
@eed3si9n eed3si9n merged commit da54265 into sbt:1.10.x Feb 10, 2025
9 checks passed
@eed3si9n eed3si9n deleted the wip/refactor-sbtn branch February 10, 2025 00:32
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.

1 participant