Deprecate/remove `INothing`?
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 195
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
To follow suit with https://github.com/typelevel/fs2/pull/2870.
@bpholt had an excellent minimization in https://github.com/typelevel/feral/pull/52#issuecomment-974246880 demonstrating why we needed INothing instead of Nothing. Unfortunately, subsequent refactors made it no longer applicable and I was unable to find another one, tracked in https://github.com/typelevel/feral/issues/73.
I took a quick try at replacing INothing with Nothing. So far I encountered two issues:
-
To get the
Encoder[INothing]into implicit scope on Scala 3, we put it inside a companion object forINothing. We can't do this withNothing.
https://github.com/typelevel/feral/blob/81d1997372d5156ff2e74f9df357a43dcfd8d00f/lambda/shared/src/main/scala-3/feral/lambda/INothing.scala#L27-L28 -
This compile test no longer compiles, which may mean trouble for inference when using
Kleisli-based tracing.
https://github.com/typelevel/feral/blob/81d1997372d5156ff2e74f9df357a43dcfd8d00f/lambda/shared/src/test/scala/feral/lambda/TracedHandlerSuite.scala#L39type mismatch; found : cats.data.Kleisli[cats.effect.IO,natchez.Span[cats.effect.IO],Option[Nothing]] required: cats.data.Kleisli[[+A]cats.effect.IO[A],natchez.Span[[+A]cats.effect.IO[A]],Option[Result]] Note: Option[Nothing] <: Option[Result], but class Kleisli is invariant in type B. You may wish to define B as +B instead.Update: the broken compile test is only broken on Scala 2, Scala 3 seems okay.
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 reading lambda/shared/src/main/scala-3/feral/lambda/INothing.scala and the compile test around line 39 of lambda/shared/src/test/scala/feral/lambda/TracedHandlerSuite.scala. Reproduce the Scala 2 and Scala 3 behavior, then review the linked fs2 change and feral issue 73. Done means the project has a decided, tested path for retaining, deprecating, or removing INothing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100