ScalaConsultants/zio-scala3-quickstart.g8

Test & Application failed to run

Opened this issue · 0 comments

Environment

Scala 3.3.1
OS MacOS

[info] 21:22:34,027 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to ERROR
[info] 21:22:34,027 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [console] to Logger[ROOT]
[info] 21:22:34,027 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@5bf5ac34 - End of configuration.
[info] 21:22:34,028 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@d3c855e - Registering current configuration as safe fallback point
[info]
[info] - item repository test with postgres test container
[info] Exception in thread "zio-fiber-33" java.lang.Error: Defect in zio.ZEnvironment: Could not find Quill::Postgres[=Literal] inside ZEnvironment(Quill::Postgres[+Literal] -> io.getquill.jdbczio.Quill$Postgres@11ccfd88)
[info] at zio.ZEnvironment$$anon$1.get(ZEnvironment.scala:167)
[info] at zio.ZIO$ServiceWithZIOPartiallyApplied$.apply$extension$$anonfun$13$$anonfun$1(ZIO.scala:5306)
[info] at com.example.infrastructure.ItemRepositoryLive.layer(ItemRepositoryLive.scala:92)
[info] at com.example.infrastructure.ItemRepositoryLive.layer(ItemRepositoryLive.scala:93)
[info] at com.example.infrastructure.ItemRepositoryLive.layer(ItemRepositoryLive.scala:94)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] 3 tests passed. 0 tests failed. 0 tests ignored.
[info]
[info]
[info] - item repository test with postgres test container
[info] Exception in thread "zio-fiber-33" java.lang.Error: Defect in zio.ZEnvironment: Could not find Quill::Postgres[=Literal] inside ZEnvironment(Quill::Postgres[+Literal] -> io.getquill.jdbczio.Quill$Postgres@11ccfd88)
[info] at zio.ZEnvironment$$anon$1.get(ZEnvironment.scala:167)
[info] at zio.ZIO$ServiceWithZIOPartiallyApplied$.apply$extension$$anonfun$13$$anonfun$1(ZIO.scala:5306)
[info] at com.example.infrastructure.ItemRepositoryLive.layer(ItemRepositoryLive.scala:92)
[info] at com.example.infrastructure.ItemRepositoryLive.layer(ItemRepositoryLive.scala:93)
[info] at com.example.infrastructure.ItemRepositoryLive.layer(ItemRepositoryLive.scala:94)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] at com.example.infrastructure.ItemRepositoryLiveSpec.spec(ItemRepositoryLiveSpec.scala:23)
[info] Executed in 17 s 231 ms
[info]
[info] [info] Completed tests
[info] [error] Failed tests:
[info] [error] com.example.infrastructure.ItemRepositoryLiveSpec
[info] [error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
[info] [error] Total time: 37 s, completed Sep 18, 2023, 9:22:50 PM
[error] x zio-scala3-quickstart/scripted
[error] Cause of test exception: {line 1} Command failed: test failed
[error] java.lang.RuntimeException: Failed tests:
[error] zio-scala3-quickstart/scripted
[error]
[error] at scala.sys.package$.error(package.scala:30)
[error] at sbt.scriptedtest.ScriptedRunner.reportErrors(ScriptedTests.scala:632)
[error] at sbt.scriptedtest.ScriptedRunner.runAll(ScriptedTests.scala:635)
[error] at sbt.scriptedtest.ScriptedRunner.run(ScriptedTests.scala:604)
[error] at sbt.scriptedtest.ScriptedRunner.run(ScriptedTests.scala:457)
[error] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:578)
[error] at sbt.ScriptedRun$RunV2.invoke(ScriptedRun.scala:151)
[error] at sbt.ScriptedRun.run(ScriptedRun.scala:34)
[error] at sbt.ScriptedRun.run$(ScriptedRun.scala:15)
[error] at sbt.ScriptedRun$RunV2.run(ScriptedRun.scala:132)
[error] at sbt.ScriptedPlugin$.$anonfun$scriptedTask$3(ScriptedPlugin.scala:188)
[error] at sbt.ScriptedPlugin$.$anonfun$scriptedTask$3$adapted(ScriptedPlugin.scala:177)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error] at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
[error] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
[error] at java.base/java.lang.Thread.run(Thread.java:1623)
[error] (scripted) Failed tests:
[error] zio-scala3-quickstart/scripted
[error] Total time: 51 s, completed Sep 18, 2023, 9:22:52 PM

// sbt run below

[info] welcome to sbt 1.8.2 (Homebrew Java 20.0.2)
[info] loading global plugins from /Users/gad/.sbt/1.0/plugins
[info] loading settings for project zio-scala3-quickstart-g8-build-build-build from metals.sbt ...
[info] loading project definition from /Volumes/Codes/zio-scala3-quickstart.g8/project/project/project
[info] loading settings for project zio-scala3-quickstart-g8-build-build from metals.sbt ...
[info] loading project definition from /Volumes/Codes/zio-scala3-quickstart.g8/project/project
[success] Generated .bloop/zio-scala3-quickstart-g8-build-build.json
[success] Total time: 0 s, completed Sep 18, 2023, 9:26:41 PM
[info] loading settings for project zio-scala3-quickstart-g8-build from metals.sbt,plugins.sbt ...
[info] loading project definition from /Volumes/Codes/zio-scala3-quickstart.g8/project
[success] Generated .bloop/zio-scala3-quickstart-g8-build.json
[success] Total time: 1 s, completed Sep 18, 2023, 9:26:42 PM
/Volumes/Codes/zio-scala3-quickstart.g8/build.sbt:47: error: not found: value testContainersVersion
"com.dimafeng" %% "testcontainers-scala-postgresql" % testContainersVersion,
^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
[info] welcome to sbt 1.8.2 (Homebrew Java 20.0.2)
[info] loading global plugins from /Users/gad/.sbt/1.0/plugins
[info] loading settings for project zio-scala3-quickstart-g8-build-build-build from metals.sbt ...
[info] loading project definition from /Volumes/Codes/zio-scala3-quickstart.g8/project/project/project
[info] loading settings for project zio-scala3-quickstart-g8-build-build from metals.sbt ...
[info] loading project definition from /Volumes/Codes/zio-scala3-quickstart.g8/project/project
[success] Generated .bloop/zio-scala3-quickstart-g8-build-build.json
[success] Total time: 0 s, completed Sep 18, 2023, 9:27:00 PM
[info] loading settings for project zio-scala3-quickstart-g8-build from metals.sbt,plugins.sbt ...
[info] loading project definition from /Volumes/Codes/zio-scala3-quickstart.g8/project
[success] Generated .bloop/zio-scala3-quickstart-g8-build.json
[success] Total time: 1 s, completed Sep 18, 2023, 9:27:01 PM
[info] loading settings for project root from build.sbt ...
[info] set current project to zio-scala3-quickstart (in build file:/Volumes/Codes/zio-scala3-quickstart.g8/)
[error] java.lang.RuntimeException: No main class detected.
[error] at scala.sys.package$.error(package.scala:30)
[error] stack trace is suppressed; run last Compile / bgRun for the full output
[error] (Compile / bgRun) No main class detected.
[error] Total time: 0 s, completed Sep 18, 2023, 9:27:02 PM