@@ -40,6 +40,7 @@ sealed trait CommunityProject:
40
40
val dependencies : List [CommunityProject ]
41
41
val binaryName : String
42
42
val runCommandsArgs : List [String ] = Nil
43
+ val requiresExperimental : Boolean
43
44
44
45
final val projectDir = communitybuildDir.resolve(" community-projects" ).resolve(project)
45
46
@@ -48,6 +49,7 @@ sealed trait CommunityProject:
48
49
49
50
/** Publish this project to the local Maven repository */
50
51
final def publish (): Unit =
52
+ // TODO what should this do with .requiresExperimental?
51
53
if ! published then
52
54
publishDependencies()
53
55
log(s " Publishing $project" )
@@ -59,6 +61,11 @@ sealed trait CommunityProject:
59
61
published = true
60
62
61
63
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
62
69
publishDependencies()
63
70
log(s " Documenting $project" )
64
71
if docCommand eq null then
@@ -78,6 +85,7 @@ final case class MillCommunityProject(
78
85
baseCommand : String ,
79
86
dependencies : List [CommunityProject ] = Nil ,
80
87
ignoreDocs : Boolean = false ,
88
+ requiresExperimental : Boolean = false ,
81
89
) extends CommunityProject :
82
90
override val binaryName : String = " ./mill"
83
91
override val testCommand = s " $baseCommand.test "
@@ -94,7 +102,8 @@ final case class SbtCommunityProject(
94
102
dependencies : List [CommunityProject ] = Nil ,
95
103
sbtPublishCommand : String = null ,
96
104
sbtDocCommand : String = null ,
97
- scalacOptions : List [String ] = SbtCommunityProject .scalacOptions
105
+ scalacOptions : List [String ] = SbtCommunityProject .scalacOptions,
106
+ requiresExperimental : Boolean = false ,
98
107
) extends CommunityProject :
99
108
override val binaryName : String = " sbt"
100
109
@@ -237,13 +246,15 @@ object projects:
237
246
238
247
lazy val scas = MillCommunityProject (
239
248
project = " scas" ,
240
- baseCommand = " scas.application"
249
+ baseCommand = " scas.application" ,
250
+ requiresExperimental = true
241
251
)
242
252
243
253
lazy val intent = SbtCommunityProject (
244
254
project = " intent" ,
245
255
sbtTestCommand = " test" ,
246
- sbtDocCommand = " doc"
256
+ sbtDocCommand = " doc" ,
257
+ requiresExperimental = true ,
247
258
)
248
259
249
260
lazy val algebra = SbtCommunityProject (
@@ -398,15 +409,17 @@ object projects:
398
409
sbtTestCommand = " coreJVM/test;coreJS/test" ,
399
410
sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
400
411
sbtDocCommand = " coreJVM/doc" ,
401
- dependencies = List (munit)
412
+ dependencies = List (munit),
413
+ requiresExperimental = true ,
402
414
)
403
415
404
416
lazy val scodec = SbtCommunityProject (
405
417
project = " scodec" ,
406
418
sbtTestCommand = " unitTests/test" ,
407
419
// Adds <empty> package
408
420
sbtDocCommand = " coreJVM/doc" ,
409
- dependencies = List (munit, scodecBits)
421
+ dependencies = List (munit, scodecBits),
422
+ requiresExperimental = true ,
410
423
)
411
424
412
425
lazy val scalaParserCombinators = SbtCommunityProject (
0 commit comments