Skip to content

DottyDoc issue with CrossVersion.for3use2_13 #13510

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

Closed
vasilmkd opened this issue Sep 11, 2021 · 3 comments
Closed

DottyDoc issue with CrossVersion.for3use2_13 #13510

vasilmkd opened this issue Sep 11, 2021 · 3 comments

Comments

@vasilmkd
Copy link
Contributor

vasilmkd commented Sep 11, 2021

Compiler version

3.0.2

Minimized code

https://github.com/vasilmkd/dottydoc-for3use213-issue-repro

Output

Running sbt doc in the minimal sbt project linked above produces the following output.

[info] compiling 1 Scala source to /Users/vasil/Code/open-source/ds2repro/target/scala-3.0.2/classes ...
[info] Main Scala API documentation to /Users/vasil/Code/open-source/ds2repro/target/scala-3.0.2/api...
[error] object List in package scala.collection.immutable does not take parameters
[error] object List in package scala.collection.immutable does not take parameters
[error] object List in package scala.collection.immutable does not take parameters
[error] object List in package scala.collection.immutable does not take parameters
[error] undefined: <none> # -1: TermRef(NoPrefix,val <none>) at readTasty
Problem parsing src/main/scala/io/vasilev/Discipline.scala:[0..11..120], documentation may not be generated.
java.lang.AssertionError: NoDenotation.owner
  | => dat dotty.tools.dotc.core.SymDenotations$NoDenotation$.owner(SymDenotations.scala:2491)
        at scala.quoted.runtime.impl.QuotesImpl$reflect$SymbolMethods$.owner(QuotesImpl.scala:2413)
        at scala.quoted.runtime.impl.QuotesImpl$reflect$SymbolMethods$.owner(QuotesImpl.scala:2413)
        at scala.quoted.runtime.impl.printers.SourceCode$SourceCodePrinter.splicedName(SourceCode.scala:1425)
        at scala.quoted.runtime.impl.printers.SourceCode$SourceCodePrinter.printTree(SourceCode.scala:335)
        at scala.quoted.runtime.impl.printers.SourceCode$SourceCodePrinter.printQualTree(SourceCode.scala:546)
        at scala.quoted.runtime.impl.printers.SourceCode$SourceCodePrinter.printTree(SourceCode.scala:399)
        at scala.quoted.runtime.impl.printers.SourceCode$SourceCodePrinter.printQualTree(SourceCode.scala:546)
        at scala.quoted.runtime.impl.printers.SourceCode$SourceCodePrinter.printTree(SourceCode.scala:412)
        at scala.quoted.runtime.impl.printers.SourceCode$.showTree(SourceCode.scala:10)
        at scala.quoted.runtime.impl.QuotesImpl$$anon$10.show(QuotesImpl.scala:2877)
        at scala.quoted.runtime.impl.QuotesImpl$$anon$10.show(QuotesImpl.scala:2876)
        at scala.quoted.runtime.impl.QuotesImpl$reflect$TreeMethods$.show(QuotesImpl.scala:95)
        at scala.quoted.runtime.impl.QuotesImpl$reflect$TreeMethods$.show(QuotesImpl.scala:95)
        at dotty.tools.scaladoc.tasty.BasicSupport.inner$3(BasicSupport.scala:29)
        at dotty.tools.scaladoc.tasty.BasicSupport.$anonfun$1(BasicSupport.scala:34)
        at scala.collection.immutable.List.flatMap(List.scala:293)
        at dotty.tools.scaladoc.tasty.BasicSupport.parseAnnotation(BasicSupport.scala:34)
        at dotty.tools.scaladoc.tasty.BasicSupport.parseAnnotation$(BasicSupport.scala:11)
        at dotty.tools.scaladoc.tasty.TastyParser.parseAnnotation(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.BasicSupport.getAnnotations$$anonfun$2(BasicSupport.scala:43)
        at scala.collection.immutable.List.map(List.scala:246)
        at dotty.tools.scaladoc.tasty.BasicSupport.getAnnotations(BasicSupport.scala:43)
        at dotty.tools.scaladoc.tasty.BasicSupport.getAnnotations$(BasicSupport.scala:11)
        at dotty.tools.scaladoc.tasty.TastyParser.getAnnotations(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.mkMember(ClassLikeSupport.scala:522)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.mkMember$(ClassLikeSupport.scala:14)
        at dotty.tools.scaladoc.tasty.TastyParser.mkMember(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMethod(ClassLikeSupport.scala:448)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMethod$(ClassLikeSupport.scala:14)
        at dotty.tools.scaladoc.tasty.TastyParser.parseMethod(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember$$anonfun$1(ClassLikeSupport.scala:227)
        at dotty.tools.scaladoc.tasty.TastyParser.processTreeOpt(TastyParser.scala:190)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseMember(ClassLikeSupport.scala:247)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseInheritedMember$$anonfun$1(ClassLikeSupport.scala:279)
        at dotty.tools.scaladoc.tasty.TastyParser.processTreeOpt(TastyParser.scala:190)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseInheritedMember(ClassLikeSupport.scala:289)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.extractMembers$$anonfun$2(ClassLikeSupport.scala:308)
        at scala.collection.immutable.List.flatMap(List.scala:293)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.extractMembers(ClassLikeSupport.scala:308)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.extractMembers$(ClassLikeSupport.scala:14)
        at dotty.tools.scaladoc.tasty.TastyParser.extractMembers(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.extractPatchedMembers(ClassLikeSupport.scala:313)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.extractPatchedMembers$(ClassLikeSupport.scala:14)
        at dotty.tools.scaladoc.tasty.TastyParser.extractPatchedMembers(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.mkClass(ClassLikeSupport.scala:169)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.mkClass$(ClassLikeSupport.scala:14)
        at dotty.tools.scaladoc.tasty.TastyParser.mkClass(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseClasslike(ClassLikeSupport.scala:373)
        at dotty.tools.scaladoc.tasty.ClassLikeSupport.parseClasslike$(ClassLikeSupport.scala:14)
        at dotty.tools.scaladoc.tasty.TastyParser.parseClasslike(TastyParser.scala:174)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.traverseTree(TastyParser.scala:209)
        at scala.quoted.Quotes$reflectModule$TreeTraverser.foldTree(Quotes.scala:4353)
        at scala.quoted.Quotes$reflectModule$TreeTraverser.foldTree$(Quotes.scala:4349)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.foldTree(TastyParser.scala:197)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.foldTree(TastyParser.scala:197)
        at scala.quoted.Quotes$reflectModule$TreeAccumulator.foldTrees$$anonfun$1(Quotes.scala:4250)
        at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:169)
        at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:165)
        at scala.collection.immutable.List.foldLeft(List.scala:79)
        at scala.quoted.Quotes$reflectModule$TreeAccumulator.foldTrees(Quotes.scala:4250)
        at scala.quoted.Quotes$reflectModule$TreeAccumulator.foldTrees$(Quotes.scala:4245)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.foldTrees(TastyParser.scala:197)
        at scala.quoted.Quotes$reflectModule$TreeAccumulator.foldOverTree(Quotes.scala:4311)
        at scala.quoted.Quotes$reflectModule$TreeAccumulator.foldOverTree$(Quotes.scala:4245)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.foldOverTree(TastyParser.scala:197)
        at scala.quoted.Quotes$reflectModule$TreeTraverser.traverseTreeChildren(Quotes.scala:4355)
        at scala.quoted.Quotes$reflectModule$TreeTraverser.traverseTreeChildren$(Quotes.scala:4349)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.traverseTreeChildren(TastyParser.scala:197)
        at scala.quoted.Quotes$reflectModule$TreeTraverser.traverseTree(Quotes.scala:4351)
        at scala.quoted.Quotes$reflectModule$TreeTraverser.traverseTree$(Quotes.scala:4349)
        at dotty.tools.scaladoc.tasty.TastyParser$Traverser$1$.traverseTree(TastyParser.scala:205)
        at dotty.tools.scaladoc.tasty.TastyParser.parseRootTree(TastyParser.scala:214)
        at dotty.tools.scaladoc.tasty.ScaladocTastyInspector.$anonfun$4(TastyParser.scala:123)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at dotty.tools.scaladoc.tasty.ScaladocTastyInspector.postProcess$$anonfun$2(TastyParser.scala:42)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.collection.immutable.List.foreach(List.scala:333)
        at dotty.tools.scaladoc.tasty.ScaladocTastyInspector.postProcess(TastyParser.scala:42)
        at scala.tasty.inspector.OldTastyInspector$TastyInspectorFinishPhase$1.runOn(OldTastyInspector.scala:91)
        at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:205)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
        at dotty.tools.dotc.Run.runPhases$5(Run.scala:216)
        at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:224)
        at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.scala:18)
        at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:231)
        at dotty.tools.dotc.Run.compileUnits(Run.scala:172)
        at dotty.tools.dotc.fromtasty.TASTYRun.compile(TASTYRun.scala:11)
        at dotty.tools.dotc.Driver.doCompile(Driver.scala:39)
        at dotty.tools.dotc.Driver.process(Driver.scala:199)
        at scala.tasty.inspector.OldTastyInspector.inspectFilesInContext(OldTastyInspector.scala:72)
        at scala.tasty.inspector.OldTastyInspector.inspectFilesInContext$(OldTastyInspector.scala:22)
        at scala.tasty.inspector.DocTastyInspector.inspectFilesInContext(DocTastyInspector.scala:5)
        at dotty.tools.scaladoc.tasty.ScaladocTastyInspector.result(TastyParser.scala:154)
        at dotty.tools.scaladoc.ScalaModuleProvider$.mkModule(ScalaModuleProvider.scala:11)
        at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:233)
        at dotty.tools.scaladoc.Scaladoc$.run$$anonfun$1(Scaladoc.scala:82)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
        at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
        at scala.Option.map(Option.scala:242)
        at dotty.tools.scaladoc.Scaladoc$.run(Scaladoc.scala:86)
        at dotty.tools.dottydoc.Main$.process(Main.scala:25)
        at dotty.tools.dottydoc.Main.process(Main.scala)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at xsbt.DottydocRunner.run(DottydocRunner.java:61)
        at xsbt.ScaladocInterface.run(ScaladocInterface.java:11)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sbt.internal.inc.AnalyzingCompiler.invoke(AnalyzingCompiler.scala:329)
        at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:175)
        at sbt.internal.inc.AnalyzingCompiler.doc(AnalyzingCompiler.scala:133)
        at sbt.Doc$.$anonfun$scaladoc$1(Doc.scala:52)
        at sbt.Doc$.$anonfun$scaladoc$1$adapted(Doc.scala:40)
        at sbt.RawCompileLike$.$anonfun$prepare$1(RawCompileLike.scala:79)
        at sbt.RawCompileLike$.$anonfun$prepare$1$adapted(RawCompileLike.scala:72)
        at sbt.RawCompileLike$.$anonfun$cached$4(RawCompileLike.scala:63)
        at sbt.RawCompileLike$.$anonfun$cached$4$adapted(RawCompileLike.scala:61)
        at sbt.util.Tracked$.$anonfun$inputChangedW$1(Tracked.scala:219)
        at sbt.RawCompileLike$.$anonfun$cached$1(RawCompileLike.scala:68)
        at sbt.RawCompileLike$.$anonfun$cached$1$adapted(RawCompileLike.scala:52)
        at sbt.Defaults$.$anonfun$docTaskSettings$4(Defaults.scala:2158)
        at scala.Function1.$anonfun$compose$1(Function1.scala:49)
        at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
        at sbt.std.Transform$$anon$4.work(Transform.scala:68)
        at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
        at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
        at sbt.Execute.work(Execute.scala:291)
        at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
        at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
[error] 5 errors found
[error] (Compile / doc) DottyDoc Compilation Failed
[error] Total time: 6 s, completed Sep 11, 2021 6:25:40 PM

Expectation

DottyDoc should work in this case. The current workaround is to disable documentation sources for Scala 3.

@griggt
Copy link
Contributor

griggt commented Sep 11, 2021

Seems to be fixed in 3.1.0-RC1

@vasilmkd
Copy link
Contributor Author

It is indeed! Thanks for the pointer. Should I close this issue?

@smarter smarter closed this as completed Sep 11, 2021
@griggt
Copy link
Contributor

griggt commented Sep 11, 2021

For anyone curious, this was fixed by #13207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants