diff options
| author | Schuyler Eldridge | 2020-03-30 14:33:35 -0400 |
|---|---|---|
| committer | GitHub | 2020-03-30 14:33:35 -0400 |
| commit | 21b9c8404b0be78f7e3f937fc322c731bf4371b7 (patch) | |
| tree | 8e0e50036bb68689392b6abcfe45d7e13edbde5b | |
| parent | a458754f2c308c08bc152df1785a8468edfc27a4 (diff) | |
| parent | d3b3f8c2498c564b4f021bd2115b006564ca4f99 (diff) | |
Merge pull request #1471 from freechipsproject/scaladoc-no-warnings-1-se
Nuclear Option (-Xfatal-warnings) for Scaladoc Build
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rw-r--r-- | build.sbt | 17 | ||||
| -rw-r--r-- | project/plugins.sbt | 2 | ||||
| -rw-r--r-- | src/main/scala/firrtl/transforms/Flatten.scala | 2 |
4 files changed, 12 insertions, 13 deletions
diff --git a/.travis.yml b/.travis.yml index 9e552319..404c12ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,10 @@ jobs: - bash .install_yosys.sh - yosys -V - stage: test + name: "Unidoc builds (no warnings)" + script: + - sbt $SBT_ARGS unidoc + - stage: test name: "Tests: FIRRTL (2.12)" script: - verilator --version @@ -39,6 +39,9 @@ lazy val commonSettings = Seq( scalacOptions := scalacOptionsVersion(scalaVersion.value) ++ Seq( "-deprecation", "-unchecked", + "-language:reflectiveCalls", + "-language:existentials", + "-language:implicitConversions", "-Yrangepos", // required by SemanticDB compiler plugin "-Ywarn-unused-import" // required by `RemoveUnused` rule ), @@ -132,19 +135,9 @@ lazy val publishSettings = Seq( lazy val docSettings = Seq( doc in Compile := (doc in ScalaUnidoc).value, autoAPIMappings := true, - apiMappings ++= { - Option(System.getProperty("sun.boot.class.path")).flatMap { classPath => - classPath.split(java.io.File.pathSeparator).find(_.endsWith(java.io.File.separator + "rt.jar")) - }.map { jarPath => - Map( - file(jarPath) -> url("https://docs.oracle.com/javase/8/docs/api") - ) - }.getOrElse { - streams.value.log.warn("Failed to add bootstrap class path of Java to apiMappings") - Map.empty[File,URL] - } - }, scalacOptions in Compile in doc ++= Seq( + "-Xfatal-warnings", + "-feature", "-diagrams", "-diagrams-max-classes", "25", "-doc-version", version.value, diff --git a/project/plugins.sbt b/project/plugins.sbt index 2ce9aa89..d4de9ef5 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -22,4 +22,6 @@ addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % "0.6.5") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.12") +addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") + libraryDependencies += "com.github.os72" % "protoc-jar" % "3.11.1" diff --git a/src/main/scala/firrtl/transforms/Flatten.scala b/src/main/scala/firrtl/transforms/Flatten.scala index 26d2b06d..68cfa3d0 100644 --- a/src/main/scala/firrtl/transforms/Flatten.scala +++ b/src/main/scala/firrtl/transforms/Flatten.scala @@ -47,7 +47,7 @@ class Flatten extends Transform { * @return modified circuit and ModuleNames to inline */ def duplicateSubCircuitsFromAnno(c: Circuit, mods: Set[ModuleName], insts: Set[ComponentName]): (Circuit, Set[ModuleName]) = { - val modMap = c.modules.map(m => m.name->m) toMap + val modMap = c.modules.map(m => m.name->m).toMap val seedMods = mutable.Map.empty[String, String] val newModDefs = mutable.Set.empty[DefModule] val nsp = Namespace(c) |
