mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-20 05:53:06 +01:00
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:
parent
afbce5bc4a
commit
11a635f3be
5 changed files with 8 additions and 3 deletions
|
@ -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 {
|
||||||
|
|
|
@ -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"))
|
|
@ -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",
|
||||||
|
|
|
@ -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"))
|
||||||
|
|
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue