@@ -27,27 +27,6 @@ def exec(projectDir: Path, binary: String, arguments: String*): Int =
27
27
exitCode
28
28
29
29
30
- /** Versions of published projects, needs to be updated when a project in the build is updated.
31
- *
32
- * TODO: instead of harcoding these numbers, we could get them from the
33
- * projects themselves. This likely requires injecting a custom task in the
34
- * projects to output the version number to a file.
35
- */
36
- object Versions :
37
- val cats = " 2.3.1-SNAPSHOT"
38
- val catsMtl = " 1.1+DOTTY-SNAPSHOT"
39
- val coop = " 1.0+DOTTY-SNAPSHOT"
40
- val discipline = " 1.1.3-SNAPSHOT"
41
- val disciplineMunit = " 1.0.3+DOTTY-SNAPSHOT"
42
- val disciplineSpecs2 = " 1.1.3-SNAPSHOT"
43
- val izumiReflect = " 1.0.0-SNAPSHOT"
44
- val scalacheck = " 1.15.2-SNAPSHOT"
45
- val scalatest = " 3.2.3"
46
- val munit = " 0.7.19+DOTTY-SNAPSHOT"
47
- val scodecBits = " 1.1+DOTTY-SNAPSHOT"
48
- val simulacrumScalafix = " 0.5.1-SNAPSHOT"
49
- val scalaCollectionCompat = " 2.3.0+DOTTY-SNAPSHOT"
50
-
51
30
sealed trait CommunityProject :
52
31
private var published = false
53
32
@@ -115,56 +94,8 @@ final case class SbtCommunityProject(
115
94
) extends CommunityProject :
116
95
override val binaryName : String = " sbt"
117
96
118
- // A project in the community build can depend on an arbitrary version of
119
- // another project in the build, so we force the use of the version that is
120
- // actually in the community build.
121
- val dependencyOverrides = List (
122
- // dependencyOverrides doesn't seem to understand `%%%`
123
- s """ "org.scalacheck" %% "scalacheck" % " ${Versions .scalacheck}" """ ,
124
- s """ "org.scalacheck" %% "scalacheck_sjs1" % " ${Versions .scalacheck}" """ ,
125
- s """ "org.scalatest" %% "scalatest" % " ${Versions .scalatest}" """ ,
126
- s """ "org.scalatest" %% "scalatest_sjs1" % " ${Versions .scalatest}" """ ,
127
- s """ "org.scalatestplus" %% "junit-4-13" % " ${Versions .scalatest}.0" """ ,
128
- s """ "org.scalameta" %% "munit" % " ${Versions .munit}" """ ,
129
- s """ "org.scalameta" %% "munit_sjs1" % " ${Versions .munit}" """ ,
130
- s """ "org.scalameta" %% "munit-scalacheck" % " ${Versions .munit}" """ ,
131
- s """ "org.scalameta" %% "munit-scalacheck_sjs1" % " ${Versions .munit}" """ ,
132
- s """ "org.scalameta" %% "junit-interface" % " ${Versions .munit}" """ ,
133
- s """ "org.scodec" %% "scodec-bits" % " ${Versions .scodecBits}" """ ,
134
- s """ "org.scodec" %% "scodec-bits_sjs1" % " ${Versions .scodecBits}" """ ,
135
- s """ "org.typelevel" %% "discipline-core" % " ${Versions .discipline}" """ ,
136
- s """ "org.typelevel" %% "discipline-core_sjs1" % " ${Versions .discipline}" """ ,
137
- s """ "org.typelevel" %% "discipline-munit" % " ${Versions .disciplineMunit}" """ ,
138
- s """ "org.typelevel" %% "discipline-munit_sjs1" % " ${Versions .disciplineMunit}" """ ,
139
- s """ "org.typelevel" %% "discipline-specs2" % " ${Versions .disciplineSpecs2}" """ ,
140
- s """ "org.typelevel" %% "discipline-specs2_sjs1" % " ${Versions .disciplineSpecs2}" """ ,
141
- s """ "org.typelevel" %% "simulacrum-scalafix-annotations" % " ${Versions .simulacrumScalafix}" """ ,
142
- s """ "org.typelevel" %% "simulacrum-scalafix-annotations_sjs1" % " ${Versions .simulacrumScalafix}" """ ,
143
- s """ "org.typelevel" %% "cats-core" % " ${Versions .cats}" """ ,
144
- s """ "org.typelevel" %% "cats-core_sjs1" % " ${Versions .cats}" """ ,
145
- s """ "org.typelevel" %% "cats-free" % " ${Versions .cats}" """ ,
146
- s """ "org.typelevel" %% "cats-free_sjs1" % " ${Versions .cats}" """ ,
147
- s """ "org.typelevel" %% "cats-kernel" % " ${Versions .cats}" """ ,
148
- s """ "org.typelevel" %% "cats-kernel_sjs1" % " ${Versions .cats}" """ ,
149
- s """ "org.typelevel" %% "cats-kernel-laws" % " ${Versions .cats}" """ ,
150
- s """ "org.typelevel" %% "cats-kernel-laws_sjs1" % " ${Versions .cats}" """ ,
151
- s """ "org.typelevel" %% "cats-laws" % " ${Versions .cats}" """ ,
152
- s """ "org.typelevel" %% "cats-laws_sjs1" % " ${Versions .cats}" """ ,
153
- s """ "org.typelevel" %% "cats-testkit" % " ${Versions .cats}" """ ,
154
- s """ "org.typelevel" %% "cats-testkit_sjs1" % " ${Versions .cats}" """ ,
155
- s """ "org.typelevel" %% "cats-mtl" % " ${Versions .catsMtl}" """ ,
156
- s """ "org.typelevel" %% "cats-mtl_sjs1" % " ${Versions .catsMtl}" """ ,
157
- s """ "org.typelevel" %% "cats-mtl-laws" % " ${Versions .catsMtl}" """ ,
158
- s """ "org.typelevel" %% "cats-mtl-laws_sjs1" % " ${Versions .catsMtl}" """ ,
159
- s """ "org.typelevel" %% "coop" % " ${Versions .coop}" """ ,
160
- s """ "org.typelevel" %% "coop_sjs1" % " ${Versions .coop}" """ ,
161
- s """ "dev.zio" %% "izumi-reflect" % " ${Versions .izumiReflect}" """ ,
162
- s """ "org.scala-lang.modules" %% "scala-collection-compat" % " ${Versions .scalaCollectionCompat}" """ ,
163
- )
164
-
165
97
private val baseCommand =
166
98
" clean; set logLevel in Global := Level.Error; set updateOptions in Global ~= (_.withLatestSnapshots(false)); "
167
- ++ s """ set dependencyOverrides in ThisBuild ++= ${dependencyOverrides.mkString(" Seq(" , " , " , " )" )}; """
168
99
++ s " ++ $compilerVersion!; "
169
100
170
101
override val testCommand =
@@ -186,7 +117,8 @@ final case class SbtCommunityProject(
186
117
case _ => Nil
187
118
extraSbtArgs ++ sbtProps ++ List (
188
119
" -sbt-version" , " 1.4.7" ,
189
- " -Dsbt.supershell=false" ,
120
+ " -Dsbt.supershell=false" ,
121
+ s " -Ddotty.communitybuild.dir= $communitybuildDir" ,
190
122
s " --addPluginSbtFile= $sbtPluginFilePath"
191
123
)
192
124
@@ -423,17 +355,15 @@ object projects:
423
355
lazy val munit = SbtCommunityProject (
424
356
project = " munit" ,
425
357
sbtTestCommand = " testsJVM/test;testsJS/test;" ,
426
- // Hardcode the version to avoid having to deal with something set by sbt-dynver
427
- sbtPublishCommand = s """ set every version := " ${Versions .munit}"; munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal """ ,
358
+ sbtPublishCommand = " munitJVM/publishLocal; munitJS/publishLocal; munitScalacheckJVM/publishLocal; munitScalacheckJS/publishLocal; junit/publishLocal" ,
428
359
sbtDocCommand = " junit/doc; munitJVM/doc" ,
429
360
dependencies = List (scalacheck)
430
361
)
431
362
432
363
lazy val scodecBits = SbtCommunityProject (
433
364
project = " scodec-bits" ,
434
365
sbtTestCommand = " coreJVM/test;coreJS/test" ,
435
- // Hardcode the version to avoid having to deal with something set by sbt-git
436
- sbtPublishCommand = s """ set every version := " ${Versions .scodecBits}"; coreJVM/publishLocal;coreJS/publishLocal """ ,
366
+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
437
367
sbtDocCommand = " coreJVM/doc" ,
438
368
dependencies = List (munit)
439
369
)
@@ -509,7 +439,7 @@ object projects:
509
439
lazy val scalaCollectionCompat = SbtCommunityProject (
510
440
project = " scala-collection-compat" ,
511
441
sbtTestCommand = " compat30/test" ,
512
- sbtPublishCommand = s """ set every version := " ${ Versions .scalaCollectionCompat} "; compat30/publishLocal"" " ,
442
+ sbtPublishCommand = " compat30/publishLocal" ,
513
443
)
514
444
515
445
lazy val verify = SbtCommunityProject (
@@ -528,7 +458,7 @@ object projects:
528
458
lazy val disciplineMunit = SbtCommunityProject (
529
459
project = " discipline-munit" ,
530
460
sbtTestCommand = " test" ,
531
- sbtPublishCommand = s """ set every version := " ${ Versions .disciplineMunit} "; coreJVM/publishLocal;coreJS/publishLocal"" " ,
461
+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
532
462
dependencies = List (discipline, munit)
533
463
)
534
464
@@ -555,14 +485,14 @@ object projects:
555
485
lazy val catsMtl = SbtCommunityProject (
556
486
project = " cats-mtl" ,
557
487
sbtTestCommand = " testsJVM/test;testsJS/test" ,
558
- sbtPublishCommand = s """ set every version := " ${ Versions .catsMtl} "; coreJVM/publishLocal;coreJS/publishLocal;lawsJVM/publishLocal;lawsJS/publishLocal"" " ,
488
+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal;lawsJVM/publishLocal;lawsJS/publishLocal" ,
559
489
dependencies = List (cats, disciplineMunit)
560
490
)
561
491
562
492
lazy val coop = SbtCommunityProject (
563
493
project = " coop" ,
564
494
sbtTestCommand = " test" ,
565
- sbtPublishCommand = s """ set every version := " ${ Versions .coop} "; coreJVM/publishLocal;coreJS/publishLocal"" " ,
495
+ sbtPublishCommand = " coreJVM/publishLocal;coreJS/publishLocal" ,
566
496
dependencies = List (cats, catsMtl)
567
497
)
568
498
0 commit comments