ZIO streams: a typed error channel instead of Throwable?

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
scala

Research direction

Read docs/code-review-2026.md item 5 and inspect ZIOTable.streamFile, the other stream methods, and the kafka-zio pipeline signatures. Decide whether to adopt a typed error channel and define its error types and conversions; done means the API direction is settled, with the minor release and release note implications recorded.

Written by the indexing model from the issue text.

Description

enhancement question

Context

The 2.1.0 plan (docs/code-review-2026.md, streaming, item 5) said: "Consider a typed error channel for zio (e.g. ZStream[Any, ParserException, Row]) rather than Throwable." This was never decided. ZIOTable.streamFile and the other stream methods still give ZStream[Any, Throwable, parser.Row], and the Kafka pipelines are ZPipeline[Producer, Throwable, X, RecordMetadata].

To decide

  • A typed error channel lets callers handle parse failures differently from I/O failures. For example, a TableParserException for a bad row versus an IOException for a missing file, perhaps as a small sealed error type.
  • It adds conversions wherever ZIO code meets Throwable (zio-kafka, file I/O), and it changes the API of the zio and kafka-zio modules.
  • fs2 has no equivalent (its error channel is always Throwable), so the two modules would differ.

If adopted, it changes the API, so it belongs in a minor release, with a release note.

Release

Assuming the PVP version scheme (#122): a point release (x.y.Z) must stay binary compatible, and a minor release (x.Y.0) may break compatibility, with a release note.

Minor release, breaking. It changes the signatures of ZIOTable's stream methods and the kafka-zio pipelines, which breaks both source and binary compatibility, so it needs a release note. (Under the old early-semver scheme, it would have needed 3.0.0.)

Dominant language
Scala
Stars
11
Forks
4
Avg merge
2h 40m
Merged PRs (30d)
44

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rchillyard/TableParser

All issues in rchillyard/TableParser

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.