arrow-kt / arrow-kt/arrow

`cancelAndCompose` in Race3.kt eagerly throws `CancellationException`

Open Beginner friendly
#3,925 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
6.6k
Forks
472
Avg merge
3d 49m
Merged PRs (30d)
4

Description

In every other situation where `mergeSuppressed` is used, `CancellationException` is special-cased and not treated as "fatal", except here. Thus, if `first` was already cancelled, `second`'s exception, regardless of what it is, will be ignored. This isn't great since we really should be using `mergeSuppressed` in this case, especially if changes like #3924 make it through.

Contributor guide

Open the contributing guide

Research direction

Start by reading Race3.kt and locate cancelAndCompose and the mergeSuppressed usage described in the issue. Verify the behavior when first is already cancelled and second has another exception, then confirm the relevant test suite covers the corrected exception handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.