Reduce GCSTest by more, remove unused warnings when using scala console from sbt (#779)

This commit is contained in:
Chris Stewart 2019-10-03 09:46:43 -05:00 committed by GitHub
parent 2fb9d163f3
commit e819baf0dd
2 changed files with 11 additions and 1 deletions

View File

@ -189,7 +189,7 @@ class GCSTest extends BitcoinSUnitTest {
def items: Gen[(Vector[UInt64], UInt8)] = {
NumberGenerator.genP.flatMap { p =>
Gen.choose(1, 500).flatMap { size =>
Gen.choose(1, 250).flatMap { size =>
// If hash's quotient when divided by 2^p is too large, we hang converting to unary
val upperBound: Long = 1L << (p.toInt * 1.75).toInt

View File

@ -36,8 +36,18 @@ object CommonSettings {
apiURL := homepage.value.map(_.toString + "/api").map(url(_)),
// scaladoc settings end
////
scalacOptions in Compile := compilerOpts(scalaVersion.value),
//remove annoying import unused things in the scala console
//https://stackoverflow.com/questions/26940253/in-sbt-how-do-you-override-scalacoptions-for-console-in-all-configurations
scalacOptions in (Compile, console) ~= (_ filterNot (s =>
s == "-Ywarn-unused-import"
|| s =="-Ywarn-unused"
//for 2.13 -- they use different compiler opts
|| s == "-Xlint:unused")),
scalacOptions in (Test, console) := (scalacOptions in (Compile, console)).value,
scalacOptions in Test := testCompilerOpts,
Compile / compile / javacOptions ++= {
if (isCI) {
//jdk11 is used on CI, we need to use the --release flag to make sure