Skip to content

Commit 801fb79

Browse files
koeningertdas
authored andcommitted
[SPARK-16359][STREAMING][KAFKA] unidoc skip kafka 0.10
## What changes were proposed in this pull request? during sbt unidoc task, skip the streamingKafka010 subproject and filter kafka 0.10 classes from the classpath, so that at least existing kafka 0.8 doc can be included in unidoc without error ## How was this patch tested? sbt spark/scalaunidoc:doc | grep -i error Author: cody koeninger <[email protected]> Closes #14041 from koeninger/SPARK-16359. (cherry picked from commit 1f0d021) Signed-off-by: Tathagata Das <[email protected]>
1 parent 9c1596b commit 801fb79

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

project/SparkBuild.scala

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -701,15 +701,29 @@ object Unidoc {
701701
.map(_.filterNot(_.getCanonicalPath.contains("org/apache/spark/sql/hive/test")))
702702
}
703703

704+
private def ignoreClasspaths(classpaths: Seq[Classpath]): Seq[Classpath] = {
705+
classpaths
706+
.map(_.filterNot(_.data.getCanonicalPath.matches(""".*kafka-clients-0\.10.*""")))
707+
.map(_.filterNot(_.data.getCanonicalPath.matches(""".*kafka_2\..*-0\.10.*""")))
708+
}
709+
704710
val unidocSourceBase = settingKey[String]("Base URL of source links in Scaladoc.")
705711

706712
lazy val settings = scalaJavaUnidocSettings ++ Seq (
707713
publish := {},
708714

709715
unidocProjectFilter in(ScalaUnidoc, unidoc) :=
710-
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags),
716+
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags, streamingKafka010),
711717
unidocProjectFilter in(JavaUnidoc, unidoc) :=
712-
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags),
718+
inAnyProject -- inProjects(OldDeps.project, repl, examples, tools, streamingFlumeSink, yarn, tags, streamingKafka010),
719+
720+
unidocAllClasspaths in (ScalaUnidoc, unidoc) := {
721+
ignoreClasspaths((unidocAllClasspaths in (ScalaUnidoc, unidoc)).value)
722+
},
723+
724+
unidocAllClasspaths in (JavaUnidoc, unidoc) := {
725+
ignoreClasspaths((unidocAllClasspaths in (JavaUnidoc, unidoc)).value)
726+
},
713727

714728
// Skip actual catalyst, but include the subproject.
715729
// Catalyst is not public API and contains quasiquotes which break scaladoc.

0 commit comments

Comments
 (0)