Add -Xfatal-warnings on Scala 2.13 (#1483)

* Add -Xfatal-warnings on Scala 2.13

* Turn off -Xfatal-warnings in docs/
This commit is contained in:
Chris Stewart 2020-05-29 06:21:56 -05:00 committed by GitHub
parent afbce5bc4a
commit 11a635f3be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 3 deletions

View file

@ -23,6 +23,7 @@ import scala.util.{Failure, Success}
* and when the corresponding web socket event was received. It writes all results into [[OutputFileName]] * and when the corresponding web socket event was received. It writes all results into [[OutputFileName]]
* in CSV format. * in CSV format.
*/ */
@scala.annotation.nowarn
object EclairBench extends App with EclairRpcTestUtil { object EclairBench extends App with EclairRpcTestUtil {
import PaymentLog._ import PaymentLog._
@ -97,6 +98,7 @@ object EclairBench extends App with EclairRpcTestUtil {
}) })
} yield paymentIds.flatten } yield paymentIds.flatten
def runTests(network: EclairNetwork): Future[Vector[PaymentLogEntry]] = { def runTests(network: EclairNetwork): Future[Vector[PaymentLogEntry]] = {
println("Setting up the test network") println("Setting up the test network")
for { for {

View file

@ -43,3 +43,6 @@ Test / bloopGenerate := None
Compile / bloopGenerate := None Compile / bloopGenerate := None
libraryDependencies ++= Deps.docs libraryDependencies ++= Deps.docs
//https://stackoverflow.com/questions/26940253/in-sbt-how-do-you-override-scalacoptions-for-console-in-all-configurations
scalacOptions in Compile ~= (_.filterNot(s => s == "-Xfatal-warnings"))

View file

@ -72,7 +72,7 @@ object CommonSettings {
) )
} }
private val scala2_13CompilerOpts = Seq("-Xlint:unused") private val scala2_13CompilerOpts = Seq("-Xlint:unused","-Xfatal-warnings")
private val nonScala2_13CompilerOpts = Seq( private val nonScala2_13CompilerOpts = Seq(
"-Xmax-classfile-name", "-Xmax-classfile-name",

View file

@ -63,7 +63,7 @@ trait EclairRpcTestUtil extends BitcoinSLogger {
val path = binaryDirectory val path = binaryDirectory
.resolve(eclairVersionOpt.getOrElse(EclairRpcClient.version)) .resolve(eclairVersionOpt.getOrElse(EclairRpcClient.version))
.resolve( .resolve(
s"eclair-node-${EclairRpcClient.version}-${EclairRpcClient.commit}") s"eclair-node-${EclairRpcClient.version}-${eclairCommitOpt.getOrElse(EclairRpcClient.commit)}")
.resolve("bin") .resolve("bin")
.resolve( .resolve(
if (sys.props("os.name").toLowerCase.contains("windows")) if (sys.props("os.name").toLowerCase.contains("windows"))

View file

@ -820,7 +820,7 @@ trait BitcoindRpcTestUtil extends BitcoinSLogger {
val v17 = new BitcoindV17RpcClient(other.instance) val v17 = new BitcoindV17RpcClient(other.instance)
v17.getAddressInfo(address).map(_.pubkey) v17.getAddressInfo(address).map(_.pubkey)
} else { } else {
other.validateAddress(address).map(_.pubkey) other.getAddressInfo(address).map(_.pubkey)
} }
} }
} }