I feel like I’m missing something basic. What is it?
-
I have a
square.scala
file:> cat square.scala /** This is the square function */ def square(d: Double): Double = d * d
-
The scaladoc CLI does not accept raw *.scala files:
> scaladoc --version Scaladoc version 3.6.2 -- Copyright 2002-2024, LAMP/EPFL > scaladoc square.scala scaladoc supports only .tasty and .jar files, following files will be ignored: square.scala
-
I can compile it into a JAR file:
> scalac --version Scala compiler version 3.6.2 -- Copyright 2002-2024, LAMP/EPFL > scalac square.scala -d square.jar > jar tf square.jar META-INF/MANIFEST.MF square$package$.class square$package.class square$package.tasty
-
And then try to generate the scaladocs:
> mkdir output > scaladoc square.jar -d output > ls output favicon.ico fonts hljs images scaladoc.version scripts styles webfonts
Notice, I get a folder with webpage-like stuff… but nothing about my
square
function. I expected some HTML listing mysquare
function and my comment.
What do I not understand?
3