Skip to content
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

Removed deprecated context receivers #242

Conversation

babisRoutis
Copy link
Contributor

Closes #223

@babisRoutis
Copy link
Contributor Author

@dzarras low priority, but please take a look

@dzarras
Copy link
Contributor

dzarras commented Nov 19, 2024

In many instances methods that were defined as:

context(Raise<E>)
fun Receiver.f(param1: P1, param2: P2): Result { }

have been rewritten as

fun Raise<E>.f(receiver: Receiver, param1: P1, param2: P2): Result { }

I feel like such methods should have been rewritten instead as:

fun Receiver.f(param1: P1, param2: P2): Either<E, Result> { }

For me f() remains an extension function of Receiver. What changes, is how we communicate the errors we produce.

@babisRoutis What do you think? I feel like this approach would produce more comprehensive and readable code.

@babisRoutis babisRoutis force-pushed the fix/remove-context-receivers branch 3 times, most recently from c187716 to f96cfcb Compare November 25, 2024 08:26
@babisRoutis babisRoutis marked this pull request as ready for review November 25, 2024 08:44
@babisRoutis babisRoutis requested a review from a team as a code owner November 25, 2024 08:44
@babisRoutis babisRoutis force-pushed the fix/remove-context-receivers branch from 7bcb74a to b947baf Compare November 25, 2024 10:40
@dzarras dzarras merged commit 9771f9f into eu-digital-identity-wallet:main Nov 25, 2024
3 checks passed
@dzarras dzarras deleted the fix/remove-context-receivers branch November 25, 2024 10:50
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.

Remove usage of Kotlin's Context Receivers
2 participants