@@ -40,6 +40,7 @@ sealed trait CommunityProject:
4040 val dependencies : List [CommunityProject ]
4141 val binaryName : String
4242 val runCommandsArgs : List [String ] = Nil
43+ val requiresExperimental : Boolean
4344
4445 final val projectDir = communitybuildDir.resolve(" community-projects" ).resolve(project)
4546
@@ -48,6 +49,7 @@ sealed trait CommunityProject:
4849
4950 /** Publish this project to the local Maven repository */
5051 final def publish (): Unit =
52+ // TODO what should this do with .requiresExperimental?
5153 if ! published then
5254 publishDependencies()
5355 log(s " Publishing $project" )
@@ -59,6 +61,11 @@ sealed trait CommunityProject:
5961 published = true
6062
6163 final def doc (): Unit =
64+ if this .requiresExperimental && ! compilerSupportExperimental then
65+ log(
66+ s " Skipping ${this .project} - it needs experimental features unsupported in this build. "
67+ )
68+ return
6269 publishDependencies()
6370 log(s " Documenting $project" )
6471 if docCommand eq null then
@@ -78,6 +85,7 @@ final case class MillCommunityProject(
7885 baseCommand : String ,
7986 dependencies : List [CommunityProject ] = Nil ,
8087 ignoreDocs : Boolean = false ,
88+ requiresExperimental : Boolean = false ,
8189 ) extends CommunityProject :
8290 override val binaryName : String = " ./mill"
8391 override val testCommand = s " $baseCommand.test "
@@ -94,7 +102,8 @@ final case class SbtCommunityProject(
94102 dependencies : List [CommunityProject ] = Nil ,
95103 sbtPublishCommand : String = null ,
96104 sbtDocCommand : String = null ,
97- scalacOptions : List [String ] = SbtCommunityProject .scalacOptions
105+ scalacOptions : List [String ] = SbtCommunityProject .scalacOptions,
106+ requiresExperimental : Boolean = false ,
98107 ) extends CommunityProject :
99108 override val binaryName : String = " sbt"
100109
@@ -237,13 +246,14 @@ object projects:
237246
238247 lazy val scas = MillCommunityProject (
239248 project = " scas" ,
240- baseCommand = " scas.application"
249+ baseCommand = " scas.application" ,
241250 )
242251
243252 lazy val intent = SbtCommunityProject (
244253 project = " intent" ,
245254 sbtTestCommand = " test" ,
246- sbtDocCommand = " doc"
255+ sbtDocCommand = " doc" ,
256+ requiresExperimental = true ,
247257 )
248258
249259 lazy val algebra = SbtCommunityProject (
@@ -398,15 +408,17 @@ object projects:
398408 sbtTestCommand = " coreJVM/test;coreJS/test" ,
399409 sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
400410 sbtDocCommand = " coreJVM/doc" ,
401- dependencies = List (munit)
411+ dependencies = List (munit),
412+ requiresExperimental = true ,
402413 )
403414
404415 lazy val scodec = SbtCommunityProject (
405416 project = " scodec" ,
406417 sbtTestCommand = " unitTests/test" ,
407418 // Adds <empty> package
408419 sbtDocCommand = " coreJVM/doc" ,
409- dependencies = List (munit, scodecBits)
420+ dependencies = List (munit, scodecBits),
421+ requiresExperimental = true ,
410422 )
411423
412424 lazy val scalaParserCombinators = SbtCommunityProject (
0 commit comments