Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update examples to ZIO 2.0 #503

Open
PhilAndrew opened this issue Jun 25, 2022 · 3 comments
Open

Update examples to ZIO 2.0 #503

PhilAndrew opened this issue Jun 25, 2022 · 3 comments

Comments

@PhilAndrew
Copy link

ZIO 2.0 has been released, please update the examples to match that

@PhilAndrew
Copy link
Author

I see it is in 2.x branch

@PhilAndrew
Copy link
Author

PhilAndrew commented Jul 4, 2022

It doesn't work :(

StreamsBasedServer.scala:25:56
value open is not a member of object zio.nio.channels.AsynchronousServerSocketChannel
server <- AsynchronousServerSocketChannel.open

StreamsBasedServer.scala:39:22
Found: (server.accept : Exception zio.nio.channels.AsynchronousSocketChannel)
Required: zio.ZIO[zio.Scope & Nothing, Any, Any]
.scoped(server.accept)

StreamsBasedServer.scala:47:15
cannot resolve reference to type zio.duration.package.type.Duration
the classfile defining the type might be missing from the classpath
channel.readChunk(64).tap(_ => Console.printLine("Read chunk")).orElse(ZIO.fail(None))

StreamsBasedServer.scala:54:24
value close in class AsynchronousByteChannel cannot be accessed as a member of (channel : zio.nio.channels.AsynchronousSocketChannel) from module class StreamsBasedServer$.
_ <- channel.close

@PhilAndrew PhilAndrew reopened this Jul 4, 2022
@PhilAndrew
Copy link
Author

How to use from scala 3 and zio 2?

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

No branches or pull requests

1 participant