Skip to content

add support for KyoSchedulerZIOAppDefault#401

Merged
fwbrasil merged 1 commit intogetkyo:mainfrom
hearnadam:main
May 21, 2024
Merged

add support for KyoSchedulerZIOAppDefault#401
fwbrasil merged 1 commit intogetkyo:mainfrom
hearnadam:main

Conversation

@hearnadam
Copy link
Copy Markdown
Collaborator

Resolves #400
/claim #400

@algora-pbc
Copy link
Copy Markdown

algora-pbc bot commented May 21, 2024

💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe/Alipay.


import zio.ZIO

object KyoSchedulerZIOAppDefaultTest extends KyoSchedulerZIOAppDefault {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Unfortunately ZIOAPP.main method invokes exit(0), so the JVM will shutdown in SBT (when running this within a test).

We can run this via Test / run - I can update the SBT configuration to include this in test if you want @fwbrasil

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[error] Error during tests:
[error]         Forked test harness failed: java.io.EOFException
[error]         at java.base/java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:3232)
[error]         at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1713)
[error]         at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:540)
[error]         at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:498)
[error]         at sbt.React.react(ForkTests.scala:202)
[error]         at sbt.ForkTests$Acceptor$1$.run(ForkTests.scala:133)
[error]         at java.base/java.lang.Thread.run(Thread.java:1583)

The error

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is ok!

@fwbrasil
Copy link
Copy Markdown
Collaborator

The build is failing in Scala 2.13

[info] Setting Scala version to 2.13.14 on 3 projects.
[info] Excluded 21 projects, run ++ 2.13.14 -v for more details.
[info] Reapplying settings...
[info] set current project to kyo (in build file:/home/runner/work/kyo/kyo/)
[info] compiling 2 Scala sources to /home/runner/work/kyo/kyo/kyo-scheduler-zio/jvm/target/scala-2.13/classes ...
[info] done compiling
[info] compiling 2 Scala sources to /home/runner/work/kyo/kyo/kyo-scheduler-zio/jvm/target/scala-2.13/test-classes ...
[error] /home/runner/work/kyo/kyo/kyo-scheduler-zio/jvm/src/test/scala/kyo/KyoSchedulerZIOAppTest.scala:6:9: in Scala 3 (or with -Xsource-features:infer-override), the inferred type changes to zio.ZIO[kyo.KyoSchedulerZIOAppDefaultTest.Environment with zio.ZIOAppArgs with zio.Scope,Any,Any] instead of zio.ZIO[Any,String,String] [quickfixable]
[error] Scala 3 migration messages are issued as errors under -Xsource:3. Use -Wconf or @nowarn to demote them to warnings or suppress.
[error] Applicable -Wconf / @nowarn filters for this fatal warning: msg=<part of the message>, cat=scala3-migration, site=kyo.KyoSchedulerZIOAppDefaultTest.run
[error]     def run = ZIO.succeed(Thread.currentThread().getName()).tap { thread =>
[error]         ^
[error] one error found
[error] (kyo-scheduler-zio / Test / compileIncremental) Compilation failed
[error] Total time: 1 s, completed May 21, 2024, 3:22:45PM

@fwbrasil fwbrasil merged commit ed7efc1 into getkyo:main May 21, 2024
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.

Create ZIOApp integration with kyo-scheduler

2 participants