Skip to content

Commit 9b45869

Browse files
committed
Try to enable -Ycheck:macros in comunity build
1 parent 086d1a8 commit 9b45869

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ final case class SbtCommunityProject(
9191
dependencies: List[CommunityProject] = Nil,
9292
sbtPublishCommand: String = null,
9393
sbtDocCommand: String = null,
94-
scalacOptions: List[String] = List("-Ycheck-init")
94+
scalacOptions: List[String] = SbtCommunityProject.scalacOptions
9595
) extends CommunityProject:
9696
override val binaryName: String = "sbt"
9797

@@ -127,6 +127,12 @@ final case class SbtCommunityProject(
127127
s"--addPluginSbtFile=$sbtPluginFilePath"
128128
)
129129

130+
object SbtCommunityProject:
131+
def scalacOptions = List(
132+
"-Ycheck-init",
133+
"-Ycheck:macros",
134+
)
135+
130136
object projects:
131137

132138
private def forceDoc(projects: String*) =
@@ -452,6 +458,7 @@ object projects:
452458
project = "verify",
453459
sbtTestCommand = "verifyJVM/test",
454460
sbtDocCommand = "verifyJVM/doc",
461+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ycheck:macros") // TODO enable -Ycheck:macros
455462
)
456463

457464
lazy val discipline = SbtCommunityProject(
@@ -473,7 +480,7 @@ object projects:
473480
sbtTestCommand = "test",
474481
sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal",
475482
dependencies = List(discipline),
476-
scalacOptions = Nil // disable -Ycheck-init
483+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ycheck-init")
477484
)
478485

479486
lazy val simulacrumScalafixAnnotations = SbtCommunityProject(
@@ -487,7 +494,8 @@ object projects:
487494
sbtTestCommand = "set scalaJSStage in Global := FastOptStage;buildJVM;validateAllJS",
488495
sbtPublishCommand = "catsJVM/publishLocal;catsJS/publishLocal",
489496
dependencies = List(discipline, disciplineMunit, scalacheck, simulacrumScalafixAnnotations),
490-
scalacOptions = Nil // disable -Ycheck-init, due to -Xfatal-warning
497+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ycheck-init") // disable -Ycheck-init, due to -Xfatal-warning
498+
491499
)
492500

493501
lazy val catsMtl = SbtCommunityProject(

0 commit comments

Comments
 (0)