Skip to content

Conversation

@dependabot-preview
Copy link
Contributor

Bumps fs2.version from 0.10.0-M6 to 3.0.1.
Updates fs2-io_2.12 from 0.10.0-M6 to 3.0.1

Release notes

Sourced from fs2-io_2.12's releases.

v3.0.0

FS2 3.0.0 is the first official release built for Cats Effect 3, focusing on integration with the new Cats Effect typeclasses and standard library.

Concurrency Support

The biggest API changes to FS2 are in the fs2.concurrent package:

  • The Queue (and InspectableQueue) types are gone in favor of cats.effect.std.Queue (#2201)
  • There's a brand new implementation of Topic which no longer requires an initial element and is significantly faster. (#2252)
  • There's a Channel type -- a multiple producer, single consumer concurrency primitive (#2326)
  • Support for fanout via broadcast operations has been revamped and simplified (#2312)
  • Support for balanced fanout has been removed, though it may return in a future release (#2340)
  • The experimental PubSub type has been removed
  • There's a new TimedPull API which allows simpler implementations of custom pulls that timeout while awaiting elements (#2062)
  • There's a new implementation of groupWithin which is significantly faster (#2327)

Core Changes

One of the most exciting changes yet least visible changes in FS2 3.0.0 is the new interpreter. Stream compilation and evaluation is now handled by the Pull type thanks primarily to the work of @diesalbla. This new interpreter is much easier to work with than the old FreeC based implementation.

Another notable change to core APIs is that they no longer take Sync constraints. Instead, they take the least powerful type class or capability trait possible. For example, Stream.duration requires a Clock[F] constraint instead of Sync[F].

No More Blocker

The cats.effect.Blocker type was removed in CE 3 -- instead, Sync[F] supports blocking calls via Sync[F].blocking(thunk). As a result, FS2 APIs that took a Blocker have been simplified and in some cases, operations have been combined (e.g., lines & linesAsync have been combined to just lines).

Sinks

The deprecated Sink trait has finally been removed and we now represent sinks via a stream transformation that discards all output values -- Stream[F, O] => Stream[F, Nothing] aka Pipe[F, O, Nothing]. This is different than the old definition of Sink which emitted an undefined number of Unit values -- and as a result of the behavior being undefined, implementations varied widely. Implementations included emitting:

  • 0 unit values
  • 1 unit at termination of the source stream
  • 1 unit per output element from source stream
  • 1 unit per output chunk from source stream
  • etc.

There are a few ergonomic improvements related to the new encoding of sinks:

  • Stream.exec(IO.println(...)) - Stream.exec takes an F[Unit] and returns a Stream[F, Nothing]
  • Stream(1, 2, 3).foreach(IO.println) - The foreach method on Stream takes a O => F[Unit] and returns a Stream[F, Nothing]
  • s.unitary - The unitary method on Stream converts a Stream[F, Nothing] to a Stream[F, Unit] which emits a single unit at termination of s
  • Calling flatMap on a Stream[F, Nothing] no longer compiles, which avoids mistakes that result in unexpected behavior.

Capability Traits

The fs2-io project provides support for working with files and networks, abstracting the Java NIO APIs. The implementations require either Async[F] or Sync[F] depending on whether the underlying NIO API is non-blocking or blocking.

One of the main features of CE3 is the position of the Sync and Async type classes in the hierarchy. As the most powerful type classes, they are now firmly at the bottom of the hierarchy. To avoid requiring Sync / Async constraints in code that uses fs2-io, we are adding capability traits -- traits which limit the capabilities of an effect to a discrete set of operations. The new fs2.io.file.Files[F] capability trait provides the ability to work with files in the effect F. For example:

def readAllText[F[_]: Files](https://github.com/typelevel/fs2/blob/HEAD/directory: Path): Stream[F, String] =
  Files[F].directoryStream(directory).flatMap { f =>
    Files[F].readAll(f, 1024*1024)
</tr></table> 

... (truncated)

Commits

Updates fs2-core_2.12 from 0.10.0-M6 to 3.0.1

Release notes

Sourced from fs2-core_2.12's releases.

v3.0.0

FS2 3.0.0 is the first official release built for Cats Effect 3, focusing on integration with the new Cats Effect typeclasses and standard library.

Concurrency Support

The biggest API changes to FS2 are in the fs2.concurrent package:

  • The Queue (and InspectableQueue) types are gone in favor of cats.effect.std.Queue (#2201)
  • There's a brand new implementation of Topic which no longer requires an initial element and is significantly faster. (#2252)
  • There's a Channel type -- a multiple producer, single consumer concurrency primitive (#2326)
  • Support for fanout via broadcast operations has been revamped and simplified (#2312)
  • Support for balanced fanout has been removed, though it may return in a future release (#2340)
  • The experimental PubSub type has been removed
  • There's a new TimedPull API which allows simpler implementations of custom pulls that timeout while awaiting elements (#2062)
  • There's a new implementation of groupWithin which is significantly faster (#2327)

Core Changes

One of the most exciting changes yet least visible changes in FS2 3.0.0 is the new interpreter. Stream compilation and evaluation is now handled by the Pull type thanks primarily to the work of @diesalbla. This new interpreter is much easier to work with than the old FreeC based implementation.

Another notable change to core APIs is that they no longer take Sync constraints. Instead, they take the least powerful type class or capability trait possible. For example, Stream.duration requires a Clock[F] constraint instead of Sync[F].

No More Blocker

The cats.effect.Blocker type was removed in CE 3 -- instead, Sync[F] supports blocking calls via Sync[F].blocking(thunk). As a result, FS2 APIs that took a Blocker have been simplified and in some cases, operations have been combined (e.g., lines & linesAsync have been combined to just lines).

Sinks

The deprecated Sink trait has finally been removed and we now represent sinks via a stream transformation that discards all output values -- Stream[F, O] => Stream[F, Nothing] aka Pipe[F, O, Nothing]. This is different than the old definition of Sink which emitted an undefined number of Unit values -- and as a result of the behavior being undefined, implementations varied widely. Implementations included emitting:

  • 0 unit values
  • 1 unit at termination of the source stream
  • 1 unit per output element from source stream
  • 1 unit per output chunk from source stream
  • etc.

There are a few ergonomic improvements related to the new encoding of sinks:

  • Stream.exec(IO.println(...)) - Stream.exec takes an F[Unit] and returns a Stream[F, Nothing]
  • Stream(1, 2, 3).foreach(IO.println) - The foreach method on Stream takes a O => F[Unit] and returns a Stream[F, Nothing]
  • s.unitary - The unitary method on Stream converts a Stream[F, Nothing] to a Stream[F, Unit] which emits a single unit at termination of s
  • Calling flatMap on a Stream[F, Nothing] no longer compiles, which avoids mistakes that result in unexpected behavior.

Capability Traits

The fs2-io project provides support for working with files and networks, abstracting the Java NIO APIs. The implementations require either Async[F] or Sync[F] depending on whether the underlying NIO API is non-blocking or blocking.

One of the main features of CE3 is the position of the Sync and Async type classes in the hierarchy. As the most powerful type classes, they are now firmly at the bottom of the hierarchy. To avoid requiring Sync / Async constraints in code that uses fs2-io, we are adding capability traits -- traits which limit the capabilities of an effect to a discrete set of operations. The new fs2.io.file.Files[F] capability trait provides the ability to work with files in the effect F. For example:

def readAllText[F[_]: Files](https://github.com/typelevel/fs2/blob/HEAD/directory: Path): Stream[F, String] =
  Files[F].directoryStream(directory).flatMap { f =>
    Files[F].readAll(f, 1024*1024)
</tr></table> 

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Bumps `fs2.version` from 0.10.0-M6 to 3.0.1.

Updates `fs2-io_2.12` from 0.10.0-M6 to 3.0.1
- [Release notes](https://github.com/typelevel/fs2/releases)
- [Changelog](https://github.com/typelevel/fs2/blob/main/CHANGELOG.md)
- [Commits](typelevel/fs2@v0.10.0-M6...v3.0.1)

Updates `fs2-core_2.12` from 0.10.0-M6 to 3.0.1
- [Release notes](https://github.com/typelevel/fs2/releases)
- [Changelog](https://github.com/typelevel/fs2/blob/main/CHANGELOG.md)
- [Commits](typelevel/fs2@v0.10.0-M6...v3.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
@dependabot-preview
Copy link
Contributor Author

Superseded by #140.

@dependabot-preview dependabot-preview bot deleted the dependabot/maven/fs2.version-3.0.1 branch April 26, 2021 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant