Skip to content

Conversation

@armanbilge
Copy link
Member

@armanbilge armanbilge commented Jun 14, 2023

This PR is published as FS2 v3.12.0-RC1.

Upgrades to Cats Effect 3.6-e9aeb8c v3.6.0-RC1 which includes the new I/O polling system.

The following APIs can be implemented with I/O polling. I've done some in this PR, the rest might end up in follow-up PRs.

JVM Selector-based I/O

  • SocketGroup and Socket
  • DatagramSocketGroup and DatagramSocket
  • UnixSockets

Native file descriptor polling-based I/O

  • SocketGroup and Socket
  • DatagramSocketGroup and DatagramSocket
  • UnixSockets
  • Processes and Process
  • fs2.io.{stdin,stdout,stderr}

@armanbilge
Copy link
Member Author

I saw this error (which looks eerily like we're using an at before checking)

Fixed in 500e545.

@armanbilge
Copy link
Member Author

Published 3.10-4b5f50b to Maven central.

@armanbilge
Copy link
Member Author

Published 3.10-365636d to Maven central.

@armanbilge armanbilge added this to the v3.12.0 milestone Dec 28, 2024
@armanbilge
Copy link
Member Author

This PR is now published as a release candidate.
https://github.com/typelevel/fs2/releases/tag/v3.12.0-RC1

build.sbt Outdated
"org.typelevel" %%% "cats-effect" % "3.5.7",
"org.typelevel" %%% "cats-effect-laws" % "3.5.7" % Test,
"org.typelevel" %%% "cats-effect-testkit" % "3.5.7" % Test,
"org.typelevel" %%% "cats-effect" % "3.6.0-RC1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bump to RC2 before merging?


@alwaysinline def errnoToThrowable(e: CInt): Throwable = {
val msg = fromCString(strerror(e))
if (e == EADDRINUSE /* || e == EADDRNOTAVAIL */ )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left over?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So long ago ... I forgot why this is commented out 😅 I'll uncomment it and see if anything breaks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll uncomment it and see if anything breaks.

Ahh, it's because this was missing in SN 0.4.x but added in 0.5.x. We can uncomment it soon :)

}

test("read after timed out read not allowed on JVM or Native") {
test("read after timed out read not allowed on JVM or Native".ignore) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this not passing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the new polling implementation actually allows this behavior. A read can timeout without corrupting the socket because we are only canceling the select. The old implementation using the JDK's AsynchronousSocketChannel doesn't support cancelable reads.

Technically the test is still relevant to the old implementations (which I guess we aren't testing anymore).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, that always felt like an annoying restriction. Can we flip this test around to assert this works as expected now then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, good idea!

@mpilquist mpilquist merged commit 7643782 into typelevel:main Mar 19, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants