@@ -90,13 +90,17 @@ final case class SbtCommunityProject(
90
90
extraSbtArgs : List [String ] = Nil ,
91
91
dependencies : List [CommunityProject ] = Nil ,
92
92
sbtPublishCommand : String = null ,
93
- sbtDocCommand : String = null
93
+ sbtDocCommand : String = null ,
94
+ scalacOptions : List [String ] = List (" -Ycheck-init" )
94
95
) extends CommunityProject :
95
96
override val binaryName : String = " sbt"
96
97
98
+ private def scalacOptionsString : String =
99
+ scalacOptions.map(" \" " + _ + " \" " ).mkString(" List(" , " ," , " )" )
100
+
97
101
private val baseCommand =
98
102
" clean; set logLevel in Global := Level.Error; set updateOptions in Global ~= (_.withLatestSnapshots(false)); "
99
- ++ """ set scalacOptions in Global += "-Ycheck-init" ;"""
103
+ ++ ( if scalacOptions.isEmpty then " " else s """ set scalacOptions in Global ++= $scalacOptionsString ; """ )
100
104
++ s " ++ $compilerVersion!; "
101
105
102
106
override val testCommand =
@@ -467,7 +471,8 @@ object projects:
467
471
project = " discipline-specs2" ,
468
472
sbtTestCommand = " test" ,
469
473
sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
470
- dependencies = List (discipline)
474
+ dependencies = List (discipline),
475
+ scalacOptions = Nil // disabble -Ycheck-init
471
476
)
472
477
473
478
lazy val simulacrumScalafixAnnotations = SbtCommunityProject (
@@ -480,7 +485,8 @@ object projects:
480
485
project = " cats" ,
481
486
sbtTestCommand = " set scalaJSStage in Global := FastOptStage;buildJVM;validateAllJS" ,
482
487
sbtPublishCommand = " catsJVM/publishLocal;catsJS/publishLocal" ,
483
- dependencies = List (discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations)
488
+ dependencies = List (discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations),
489
+ scalacOptions = Nil // disable -Ycheck-init, due to -Xfatal-warning
484
490
)
485
491
486
492
lazy val catsMtl = SbtCommunityProject (
0 commit comments