zio / zio-schema

Compositional, type-safe schema definitions, which enable auto-derivation of codecs and migrations.
https://zio.dev/zio-schema
Apache License 2.0
142 stars 164 forks source link

Unable to publishLocal on Windows 11 using Scala 3 #674

Open AppleKid7 opened 7 months ago

AppleKid7 commented 7 months ago

The command publishLocal from Windows 11 seems to give a scaladoc error. Steps to reproduce:

  1. enter sbt shell $ sbt
  2. Switch to Scala 3 target ++ 3.3
  3. Attempt to publish to your local ivy2: publishLocal

You should see the following error output:

[error] stack trace is suppressed; run last zioSchemaJVM / Compile / doc for the full output
[error] stack trace is suppressed; run last zioSchemaJS / Compile / doc for the full output
[error] stack trace is suppressed; run last zioSchemaNative / Compile / doc for the full output
[error] (zioSchemaJVM / Compile / doc) java.lang.reflect.InvocationTargetException
[error] (zioSchemaJS / Compile / doc) java.lang.reflect.InvocationTargetException
[error] (zioSchemaNative / Compile / doc) java.lang.reflect.InvocationTargetException
[error] Total time: 56 s, completed Apr 8, 2024, 7:38:48 PM

Following the instructions to get the full output and from the sbt shell calling, for example zioSchemaJVM / Compile / doc yields the following stack trace:

[info] Skipping unused scalacOptions: -Xignore-scala2-macros, -Ykind-projector
[error] java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
[error]         at xsbt.DottydocRunner.run(DottydocRunner.java:65)
[error]         at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
[error]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[error]         at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
[error]         at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:53)
[error]         at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:41)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:80)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:73)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:64)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:62)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:69)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:53)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2164)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[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:1583)
[error] Caused by: java.lang.reflect.InvocationTargetException
[error]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[error]         at xsbt.DottydocRunner.run(DottydocRunner.java:61)
[error]         at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
[error]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[error]         at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
[error]         at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:53)
[error]         at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:41)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:80)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:73)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:64)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:62)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:69)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:53)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2164)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[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:1583)
[error] Caused by: java.nio.file.InvalidPathException: Illegal char <:> at index 20: zio/schema/CaseSet$$:+:.html
[error]         at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:204)
[error]         at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:175)
[error]         at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[error]         at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
[error]         at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:231)
[error]         at java.base/java.nio.file.Path.resolve(Path.java:516)
[error]         at dotty.tools.scaladoc.renderers.Writer.dest(Writer.scala:17)
[error]         at dotty.tools.scaladoc.renderers.Writer.write(Writer.scala:23)
[error]         at dotty.tools.scaladoc.renderers.Writer.write$(Writer.scala:13)
[error]         at dotty.tools.scaladoc.renderers.Renderer.write(Renderer.scala:20)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage(Renderer.scala:166)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage$$anonfun$1(Renderer.scala:166)
[error]         at scala.collection.immutable.List.flatMap(List.scala:293)
[error]         at scala.collection.immutable.List.flatMap(List.scala:79)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage(Renderer.scala:166)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage$$anonfun$1(Renderer.scala:166)
[error]         at scala.collection.immutable.List.flatMap(List.scala:293)
[error]         at scala.collection.immutable.List.flatMap(List.scala:79)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage(Renderer.scala:166)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage$$anonfun$1(Renderer.scala:166)
[error]         at scala.collection.immutable.List.flatMap(List.scala:293)
[error]         at scala.collection.immutable.List.flatMap(List.scala:79)
[error]         at dotty.tools.scaladoc.renderers.Renderer.renderPage(Renderer.scala:166)
[error]         at dotty.tools.scaladoc.renderers.Renderer.$anonfun$8(Renderer.scala:153)
[error]         at scala.collection.immutable.List.map(List.scala:246)
[error]         at scala.collection.immutable.List.map(List.scala:79)
[error]         at dotty.tools.scaladoc.renderers.Renderer.render(Renderer.scala:153)
[error]         at dotty.tools.scaladoc.renderers.HtmlRenderer.render(HtmlRenderer.scala:49)
[error]         at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:237)
[error]         at dotty.tools.scaladoc.Scaladoc$.run$$anonfun$1(Scaladoc.scala:68)
[error]         at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
[error]         at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
[error]         at scala.Option.map(Option.scala:242)
[error]         at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:72)
[error]         at dotty.tools.dottydoc.Main$.process(Main.scala:25)
[error]         at dotty.tools.dottydoc.Main.process(Main.scala)
[error]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[error]         at xsbt.DottydocRunner.run(DottydocRunner.java:61)
[error]         at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
[error]         at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103
[error]         at java.base/java.lang.reflect.Method.invoke(Method.java:580)
[error]         at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
[error]         at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
[error]         at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:53)
[error]         at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:41)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:80)
[error]         at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:73)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:64)
[error]         at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:62)
[error]         at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:220)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:69)
[error]         at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:53)
[error]         at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2164)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error]         at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error]         at sbt.Execute.work(Execute.scala:292)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error]         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
[error]         at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
[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:1583)
[error] (zioSchemaJVM / Compile / doc) java.lang.reflect.InvocationTargetException

Attempted from both the regular cmd shell and from powershell with the same results.

jdegoes commented 5 months ago

/bounty $25

algora-pbc[bot] commented 5 months ago

💎 $25 bounty • ZIO

Steps to solve:

  1. Start working: Comment /attempt #674 with your implementation plan
  2. Submit work: Create a pull request including /claim #674 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to zio/zio-schema!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🔴 @Anshgrover23 Jun 14, 2024, 6:54:01 AM WIP
🔴 @akay41024 Jul 31, 2024, 10:53:23 PM WIP
Anshgrover23 commented 5 months ago

/attempt #674

akay41024 commented 4 months ago

/attempt #674

algora-pbc[bot] commented 3 months ago

@akay41024: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏

algora-pbc[bot] commented 3 months ago

The bounty is up for grabs! Everyone is welcome to /attempt #674 🙌