typelevel / typelevel/cats-effect
3.5.0 async uncancelable changes are not enforced by laws
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 2.2k
- Forks
- 576
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 18
Description
In 3.5.0 there was a breaking semantic change to async/async_:
As of 3.5.0, the following is now considered to be uncancelable:
IO { // ... None // we aren't returning a finalizer } }Previously, the above was cancelable without any caveats. Notably, this applies to all uses of the async_ constructor!
There are no new laws to ensure this behavior, a build updating to 3.5.1 passes without having to add uncancelability to the implemenation of async.
I think this may be a potential footgun for any third-party implementors of CE typeclasses if the laws don't specify this behavior.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the laws and implementations covering the async and async_ constructors, then compare them with the 3.5.0 uncancelability semantics described in the issue. Add law coverage that distinguishes callbacks returning no finalizer, and run the relevant law suite; done means third-party async implementations cannot pass without honoring the new behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100