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

genjavadoc is broken with Scala 2.13.13 #347

Closed
mdedetrich opened this issue Mar 3, 2024 · 2 comments · Fixed by #348
Closed

genjavadoc is broken with Scala 2.13.13 #347

mdedetrich opened this issue Mar 3, 2024 · 2 comments · Fixed by #348

Comments

@mdedetrich
Copy link

mdedetrich commented Mar 3, 2024

It seems that with the latest Scala 2.13.13 release genjavadoc is broken (we are currently experiencing this in Pekko). This is the error we are getting

[info] /Users/mdedetrich/github/incubator-pekko-http/http-core/src/test/java/org/apache/pekko/http/javadsl/WSEchoTestClientApp.java: Some input files use or override a deprecated API.
[info] /Users/mdedetrich/github/incubator-pekko-http/http-core/src/test/java/org/apache/pekko/http/javadsl/WSEchoTestClientApp.java: Recompile with -Xlint:deprecation for details.
[error] java.util.NoSuchElementException: None.get
[error] 	at scala.None$.get(Option.scala:627)
[error] 	at scala.None$.get(Option.scala:626)
[error] 	at com.typesafe.genjavadoc.BasicTransform.deprecationInfo(BasicTransform.scala:163)
[error] 	at com.typesafe.genjavadoc.BasicTransform.deprecationInfo(BasicTransform.scala:159)
[error] 	at com.typesafe.genjavadoc.BasicTransform.$anonfun$addMethod$1(BasicTransform.scala:152)
[error] 	at scala.Option.map(Option.scala:242)
[error] 	at com.typesafe.genjavadoc.BasicTransform.addMethod(BasicTransform.scala:152)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform(BasicTransform.scala:111)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform$(BasicTransform.scala:49)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.newTransform(Plugin.scala:93)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:103)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:93)
[error] 	at scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2625)
[error] 	at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2623)
[error] 	at scala.reflect.internal.Trees$Template.transform(Trees.scala:546)
[error] 	at scala.reflect.internal.Trees$InternalTransformer.transform(Trees.scala:1489)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.superTransform(Plugin.scala:102)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform(BasicTransform.scala:116)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform$(BasicTransform.scala:49)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.newTransform(Plugin.scala:93)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:103)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:93)
[error] 	at scala.reflect.api.Trees$Transformer.transformTemplate(Trees.scala:2598)
[error] 	at scala.reflect.internal.Trees$ClassDef.$anonfun$transform$2(Trees.scala:363)
[error] 	at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2636)
[error] 	at scala.reflect.internal.Trees$ClassDef.transform(Trees.scala:362)
[error] 	at scala.reflect.internal.Trees$InternalTransformer.transform(Trees.scala:1489)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.superTransform(Plugin.scala:102)
[error] 	at com.typesafe.genjavadoc.BasicTransform.$anonfun$newTransform$3(BasicTransform.scala:91)
[error] 	at com.typesafe.genjavadoc.BasicTransform.withClass(BasicTransform.scala:137)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform(BasicTransform.scala:91)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform$(BasicTransform.scala:49)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.newTransform(Plugin.scala:93)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:103)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:93)
[error] 	at scala.reflect.api.Trees$Transformer.$anonfun$transformStats$1(Trees.scala:2625)
[error] 	at scala.reflect.api.Trees$Transformer.transformStats(Trees.scala:2623)
[error] 	at scala.reflect.internal.Trees$PackageDef.$anonfun$transform$1(Trees.scala:344)
[error] 	at scala.reflect.api.Trees$Transformer.atOwner(Trees.scala:2636)
[error] 	at scala.reflect.internal.Trees$PackageDef.transform(Trees.scala:344)
[error] 	at scala.reflect.internal.Trees$InternalTransformer.transform(Trees.scala:1489)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.superTransform(Plugin.scala:102)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform(BasicTransform.scala:115)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransform$(BasicTransform.scala:49)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.newTransform(Plugin.scala:93)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transform(Plugin.scala:103)
[error] 	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:182)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.superTransformUnit(Plugin.scala:101)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransformUnit(BasicTransform.scala:20)
[error] 	at com.typesafe.genjavadoc.BasicTransform.newTransformUnit$(BasicTransform.scala:19)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.newTransformUnit(Plugin.scala:93)
[error] 	at com.typesafe.genjavadoc.GenJavadocPlugin$MyComponent$GenJavadocTransformer.transformUnit(Plugin.scala:104)
[error] 	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:32)
[error] 	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:481)
[error] 	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:428)
[error] 	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1549)
[error] 	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1533)
[error] 	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1525)
[error] 	at scala.tools.nsc.Global$Run.compileFiles(Global.scala:1638)
[error] 	at scala.tools.xsbt.CachedCompiler0.run(CompilerBridge.scala:176)
[error] 	at scala.tools.xsbt.CachedCompiler0.run(CompilerBridge.scala:139)
[error] 	at scala.tools.xsbt.CompilerBridge.run(CompilerBridge.scala:43)
[error] 	at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:91)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$7(MixedAnalyzingCompiler.scala:193)
[error] 	at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:248)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:183)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4$adapted(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:239)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:163)
[error] 	at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:211)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5(Incremental.scala:180)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$apply$5$adapted(Incremental.scala:178)
[error] 	at sbt.internal.inc.Incremental$$anon$2.run(Incremental.scala:464)
[error] 	at sbt.internal.inc.IncrementalCommon$CycleState.next(IncrementalCommon.scala:116)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:56)
[error] 	at sbt.internal.inc.IncrementalCommon$$anon$1.next(IncrementalCommon.scala:52)
[error] 	at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:263)
[error] 	at sbt.internal.inc.Incremental$.$anonfun$incrementalCompile$8(Incremental.scala:419)
[error] 	at sbt.internal.inc.Incremental$.withClassfileManager(Incremental.scala:506)
[error] 	at sbt.internal.inc.Incremental$.incrementalCompile(Incremental.scala:406)
[error] 	at sbt.internal.inc.Incremental$.apply(Incremental.scala:172)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:534)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:488)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:332)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:425)
[error] 	at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:137)
[error] 	at sbt.Defaults$.compileIncrementalTaskImpl(Defaults.scala:2371)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$2(Defaults.scala:2321)
[error] 	at sbt.internal.server.BspCompileTask$.$anonfun$compute$1(BspCompileTask.scala:31)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:47)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:29)
[error] 	at sbt.internal.io.Retry$.apply(Retry.scala:24)
[error] 	at sbt.internal.server.BspCompileTask$.compute(BspCompileTask.scala:31)
[error] 	at sbt.Defaults$.$anonfun$compileIncrementalTask$1(Defaults.scala:2319)
[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.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:750)
[error] (http / Compile / compileIncremental) java.util.NoSuchElementException: None.get
[error] Total time: 58 s, completed Mar 3, 2024 10:15:02 AM

To reproduce run

 sbt -Dpekko.genjavadoc.enabled=true "docs/paradox; unidoc"

in https://github.com/apache/incubator-pekko-http and make sure that https://github.com/apache/incubator-pekko-http/blob/main/project/Dependencies.scala#L37 is set to 2.13.13, note that 2.13.12 works fine. Also note that the newly release 2.12.19 is working without issues.

@SethTisue
Copy link
Member

fix merged; I'll roll a release soon — you can track that at #349

@mdedetrich
Copy link
Author

fix merged; I'll roll a release soon — you can track that at #349

Thanks so much!

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 a pull request may close this issue.

2 participants