Skip to content

Commit

Permalink
Demote some warnings to echos to avoid failing with -Xfatal-warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Aug 11, 2020
1 parent e085744 commit 105fcaa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ final class Dependency(val global: CallbackGlobal) extends LocateClassFile with
case Some(classOrModuleDef) =>
memberRef(ClassDependency(classOrModuleDef, dep))
case None =>
reporter.warning(unit.position(0), Feedback.OrphanTopLevelImports)
reporter.echo(unit.position(0), Feedback.OrphanTopLevelImports) // package-info.java & empty scala files
orphanImportsReported = true
}
}
Expand Down
3 changes: 3 additions & 0 deletions internal/compiler-bridge/src/main/scala/xsbt/ExtractAPI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,9 @@ class ExtractAPI[GlobalType <: Global](
"sbt-api: Unexpected nullary method type " + in + " in " + in.owner
)
Constants.emptyType
case MethodType(_, _) =>
reporter.echo(NoPosition, s"sbt-api: Unhandled method type $in in ${in.owner}")
Constants.emptyType
case _ =>
reporter.warning(NoPosition, "sbt-api: Unhandled type " + t.getClass + " : " + t)
Constants.emptyType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ExtractUsedNames[GlobalType <: CallbackGlobal](val global: GlobalType)
}

case None =>
reporter.warning(unit.position(0), Feedback.OrphanNames)
reporter.echo(unit.position(0), Feedback.OrphanNames)
}
}

Expand Down

0 comments on commit 105fcaa

Please sign in to comment.