Skip to content

Try to enable -Ycheck:macros in comunity build #11621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions community-build/src/scala/dotty/communitybuild/projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ final case class SbtCommunityProject(
dependencies: List[CommunityProject] = Nil,
sbtPublishCommand: String = null,
sbtDocCommand: String = null,
scalacOptions: List[String] = List("-Ycheck-init")
scalacOptions: List[String] = SbtCommunityProject.scalacOptions
) extends CommunityProject:
override val binaryName: String = "sbt"

Expand Down Expand Up @@ -127,6 +127,12 @@ final case class SbtCommunityProject(
s"--addPluginSbtFile=$sbtPluginFilePath"
)

object SbtCommunityProject:
def scalacOptions = List(
"-Ycheck:macros",
"-Ycheck-init",
)

object projects:

private def forceDoc(projects: String*) =
Expand Down Expand Up @@ -452,6 +458,7 @@ object projects:
project = "verify",
sbtTestCommand = "verifyJVM/test",
sbtDocCommand = "verifyJVM/doc",
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ycheck:macros") // TODO enable -Ycheck:macros
)

lazy val discipline = SbtCommunityProject(
Expand All @@ -473,7 +480,7 @@ object projects:
sbtTestCommand = "test",
sbtPublishCommand = "coreJVM/publishLocal;coreJS/publishLocal",
dependencies = List(discipline),
scalacOptions = Nil // disable -Ycheck-init
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ycheck-init")
)

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

)

lazy val catsMtl = SbtCommunityProject(
Expand Down