Open zachgk opened 6 years ago
@mxnet-label-bot[Doc, Scala]
Some errors are suppressed by default and should be noted. The build output after a partial fix from https://github.com/apache/incubator-mxnet/pull/13189/commits/bb7f4b872d000d9d899e1fc41c8da356db7123ba (to clear up the output a bit) but with the flags to show the warnings (-deprecated -feature) is:
ubuntu@ip-172-31-68-239:~/incubator-mxnet/scala-package$ scaladoc `find . -type f -name "*.scala" | egrep "\.\/core|\.\/infer" | egrep -v "Suite"` -classpath `find native -name "*.jar" | grep "target/lib/" | tr '\n' ':'`:`find macros -name "*-SNAPSHOT.jar"` -deprecation -feature
./core/src/main/scala/org/apache/mxnet/IO.scala:343: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/IO.scala:347: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/IO.scala:407: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/IO.scala:408: warning: implicit conversion method ListMap2Descs should be enabled
by making the implicit value scala.language.implicitConversions visible.
This can be achieved by adding the import clause 'import scala.language.implicitConversions'
or by setting the compiler option -language:implicitConversions.
See the Scala docs for value scala.language.implicitConversions for a discussion
why the feature should be explicitly enabled.
implicit def ListMap2Descs(shapes: ListMap[String, Shape]): IndexedSeq[DataDesc] = {
^
./core/src/main/scala/org/apache/mxnet/Visualization.scala:149: warning: postfix operator ! should be enabled
by making the implicit value scala.language.postfixOps visible.
This can be achieved by adding the import clause 'import scala.language.postfixOps'
or by setting the compiler option -language:postfixOps.
See the Scala docs for value scala.language.postfixOps for a discussion
why the feature should be explicitly enabled.
args !
^
./core/src/main/scala/org/apache/mxnet/javaapi/Shape.scala:49: warning: implicit conversion method fromShape should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def fromShape(shape: org.apache.mxnet.Shape): Shape = new Shape(shape)
^
./core/src/main/scala/org/apache/mxnet/javaapi/Shape.scala:51: warning: implicit conversion method toShape should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def toShape(jShape: Shape): org.apache.mxnet.Shape = jShape.shape
^
./core/src/main/scala/org/apache/mxnet/javaapi/IO.scala:29: warning: implicit conversion method fromDataDesc should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def fromDataDesc(dDesc: org.apache.mxnet.DataDesc): DataDesc = new DataDesc(dDesc)
^
./core/src/main/scala/org/apache/mxnet/javaapi/IO.scala:31: warning: implicit conversion method toDataDesc should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def toDataDesc(dataDesc: DataDesc): org.apache.mxnet.DataDesc = dataDesc.dataDesc
^
./core/src/main/scala/org/apache/mxnet/javaapi/Context.scala:38: warning: implicit conversion method fromContext should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def fromContext(context: org.apache.mxnet.Context): Context = new Context(context)
^
./core/src/main/scala/org/apache/mxnet/javaapi/Context.scala:39: warning: implicit conversion method toContext should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def toContext(jContext: Context): org.apache.mxnet.Context = jContext.context
^
./core/src/main/scala/org/apache/mxnet/KVStore.scala:289: warning: postfix operator != should be enabled
by making the implicit value scala.language.postfixOps visible.
val bArray = Stream.continually (bis.read).takeWhile (- 1 !=).map (_.toByte).toArray
^
./core/src/main/scala/org/apache/mxnet/io/MXDataIter.scala:161: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/MXDataIter.scala:165: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/ResizeIter.scala:137: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/ResizeIter.scala:143: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/PrefetchingIter.scala:181: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/PrefetchingIter.scala:185: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/NDArrayIter.scala:240: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/io/NDArrayIter.scala:244: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated
^
./core/src/main/scala/org/apache/mxnet/NDArray.scala:36: warning: implicit conversion method getFirstResult should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def getFirstResult(ret: NDArrayFuncReturn): NDArray = ret(0)
^
./core/src/main/scala/org/apache/mxnet/NDArray.scala:1047: warning: implicit conversion method int2Scalar should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def int2Scalar(x: Int): NDArrayConversions = new NDArrayConversions(x.toFloat)
^
./core/src/main/scala/org/apache/mxnet/NDArray.scala:1048: warning: implicit conversion method double2Scalar should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def double2Scalar(x: Double): NDArrayConversions = new NDArrayConversions(x.toFloat)
^
./core/src/main/scala/org/apache/mxnet/NDArray.scala:1049: warning: implicit conversion method float2Scalar should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def float2Scalar(x: Float): NDArrayConversions = new NDArrayConversions(x)
^
./core/src/main/scala/org/apache/mxnet/Symbol.scala:1291: warning: implicit conversion method int2Scalar should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def int2Scalar(x: Int): SymbolConversions[Int] = new SymbolConversions(x)
^
./core/src/main/scala/org/apache/mxnet/Symbol.scala:1292: warning: implicit conversion method double2Scalar should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def double2Scalar(x: Double): SymbolConversions[Double] = new SymbolConversions(x)
^
./core/src/main/scala/org/apache/mxnet/Symbol.scala:1293: warning: implicit conversion method float2Scalar should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def float2Scalar(x: Float): SymbolConversions[Float] = new SymbolConversions(x)
^
./core/src/main/scala/org/apache/mxnet/Optimizer.scala:147: warning: @deprecated now takes two arguments; see the scaladoc.
@deprecated("Use setLrMult instead.")
^
./core/src/main/scala/org/apache/mxnet/Context.scala:35: warning: implicit conversion method ctx2Array should be enabled
by making the implicit value scala.language.implicitConversions visible.
implicit def ctx2Array(ctx: Context): Array[Context] = Array(ctx)
^
model contains 139 documentable templates
./core/src/main/scala/org/apache/mxnet/ResourceScope.scala:29: warning: Could not find any member to link for "NativeResource".
/**
^
./core/src/main/scala/org/apache/mxnet/module/BaseModule.scala:368: warning: Could not find any member to link for "IOException".
/**
^
./core/src/main/scala/org/apache/mxnet/module/BucketingModule.scala:362: warning: Could not find any member to link for "grad1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/BucketingModule.scala:338: warning: Could not find any member to link for "out1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/BaseModule.scala:206: warning: Could not find any member to link for "out1_batch1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/Module.scala:509: warning: Could not find any member to link for "grad1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/Module.scala:485: warning: Could not find any member to link for "out1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/SequentialModule.scala:369: warning: Could not find any member to link for "grad1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/SequentialModule.scala:345: warning: Could not find any member to link for "out1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/DataParallelExecutorGroup.scala:538: warning: Could not find any member to link for "grad1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/DataParallelExecutorGroup.scala:516: warning: Could not find any member to link for "out1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/BaseModule.scala:518: warning: Could not find any member to link for "grad1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/module/BaseModule.scala:500: warning: Could not find any member to link for "out1_dev1,".
/**
^
./core/src/main/scala/org/apache/mxnet/SymbolAPIBase.scala:1541: warning: Could not find any member to link for "batch_index,".
/**
^
./core/src/main/scala/org/apache/mxnet/ResourceScope.scala:45: warning: Could not find any member to link for "NativeResource".
/**
^
./core/src/main/scala/org/apache/mxnet/ResourceScope.scala:45: warning: Could not find any member to link for "NativeResource.close()".
/**
^
./core/src/main/scala/org/apache/mxnet/NDArrayAPIBase.scala:1541: warning: Could not find any member to link for "batch_index,".
/**
^
./core/src/main/scala/org/apache/mxnet/Executor.scala:260: warning: Could not find any member to link for "IllegalArgumentException".
/**
^
./core/src/main/scala/org/apache/mxnet/Executor.scala:248: warning: Could not find any member to link for "IllegalArgumentException".
/**
^
./core/src/main/scala/org/apache/mxnet/Executor.scala:236: warning: Could not find any member to link for "IllegalArgumentException".
/**
^
./core/src/main/scala/org/apache/mxnet/Executor.scala:224: warning: Could not find any member to link for "IllegalArgumentException".
/**
^
50 warnings found
After progress with https://github.com/apache/incubator-mxnet/pull/13210 and https://github.com/apache/incubator-mxnet/pull/13189, the original 12 deprecation warnings, 17 feature warnings, 29 warnings, and 120 errors has been reduced to one warning. The build command and output (when not run through /docs/Makefile html) are:
ubuntu@ip-172-31-68-239:~/incubator-mxnet/scala-package$ scaladoc `find . -type f -name "*.scala" | egrep "\.\/core|\.\/infer" | egrep -v "Suite"` -classpath `find native -name "*.jar" | grep "target/lib/" | tr '\n' ':'`:`find macros -name "*-SNAPSHOT.jar"` -feature -deprecation
model contains 139 documentable templates
./core/src/main/scala/org/apache/mxnet/module/BaseModule.scala:368: warning: Could not find any member to link for "IOException".
/**
^
one warning found
The IOException warning is because there is no javadoc page to link to for the java standard library's IOException. I believe it requires an addition of the -doc-external-doc flag to the scaladoc command, but I was unable to get it working. I am leaving this issue open to fix the remaining warning.
Hi @zachgk , that's an impressive improvement in the reduction in build warnings. Did you have a chance to revisit the build warnings to prune the list even further ?
I haven't. In fact, believe the list of warnings has actually grown due to contributors not checking the scala docs warnings buried in the maven output. For the IOException warning that I did not fix above, it would require specific attention to fix
At some point, I found a JIRA bug within the scaladoc that explains why the -doc-external-doc flag is not resolving the warning. It was not fixed until a later version of the compiler so this issue requires upgrading the scala compiler past 2.11.8 to fix IOException.
Description
When compiling the docs, there are a number of errors and warnings while generating the scaladocs. Sample output is below: