Skip to content

Commit f2e5fd0

Browse files
Merge pull request #8791 from dotty-staging/drop-update-cmd
Drop update command from the community build
2 parents 17d1633 + a7bbfc5 commit f2e5fd0

File tree

2 files changed

+2
-46
lines changed

2 files changed

+2
-46
lines changed

community-build/test/scala/dotty/communitybuild/CommunityBuildTest.scala

+2-42
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ sealed trait CommunityProject:
3535
private var published = false
3636

3737
val project: String
38-
val updateCommand: String
3938
val testCommand: String
4039
val publishCommand: String
4140
val dependencies: List[CommunityProject]
@@ -44,12 +43,6 @@ sealed trait CommunityProject:
4443

4544
final val projectDir = communitybuildDir.resolve("community-projects").resolve(project)
4645

47-
/** Is this project running in the test or update mode in the
48-
* context of the given suite? @see `run` for more details.
49-
*/
50-
final def isUpdateMode(using suite: CommunityBuildTest) =
51-
suite.isInstanceOf[CommunityBuildUpdate]
52-
5346
/** Depending on the mode of operation, either
5447
* runs the test or updates the project. Updating
5548
* means that all the dependencies are fetched but
@@ -61,9 +54,8 @@ sealed trait CommunityProject:
6154
* for more infrastructural details.
6255
*/
6356
final def run()(using suite: CommunityBuildTest) =
64-
val runCmd = if isUpdateMode then updateCommand else testCommand
65-
if !isUpdateMode then dependencies.foreach(_.publish())
66-
suite.test(project, binaryName, runCommandsArgs :+ runCmd)
57+
dependencies.foreach(_.publish())
58+
suite.test(project, binaryName, runCommandsArgs :+ testCommand)
6759

6860
/** Publish this project to the local Maven repository */
6961
final def publish(): Unit =
@@ -82,22 +74,19 @@ final case class MillCommunityProject(
8274
baseCommand: String,
8375
dependencies: List[CommunityProject] = Nil) extends CommunityProject:
8476
override val binaryName: String = "./mill"
85-
override val updateCommand = s"$baseCommand.compileClasspath"
8677
override val testCommand = s"$baseCommand.test"
8778
override val publishCommand = s"$baseCommand.publishLocal"
8879
override val runCommandsArgs = List("-i", "-D", s"dottyVersion=$compilerVersion")
8980

9081
final case class SbtCommunityProject(
9182
project: String,
9283
sbtTestCommand: String,
93-
sbtUpdateCommand: String,
9484
extraSbtArgs: List[String] = Nil,
9585
dependencies: List[CommunityProject] = Nil,
9686
sbtPublishCommand: String = null) extends CommunityProject:
9787
override val binaryName: String = "sbt"
9888
private val baseCommand = s";clean ;set logLevel in Global := Level.Error ;set updateOptions in Global ~= (_.withLatestSnapshots(false)) ;++$compilerVersion! "
9989
override val testCommand = s"$baseCommand$sbtTestCommand"
100-
override val updateCommand = s"$baseCommand$sbtUpdateCommand"
10190
override val publishCommand = s"$baseCommand$sbtPublishCommand"
10291

10392
override val runCommandsArgs: List[String] =
@@ -142,102 +131,86 @@ object projects:
142131
lazy val intent = SbtCommunityProject(
143132
project = "intent",
144133
sbtTestCommand = "test",
145-
sbtUpdateCommand = "update"
146134
)
147135

148136
lazy val algebra = SbtCommunityProject(
149137
project = "algebra",
150138
sbtTestCommand = "coreJVM/compile",
151-
sbtUpdateCommand = "coreJVM/update"
152139
)
153140

154141
lazy val scalacheck = SbtCommunityProject(
155142
project = "scalacheck",
156143
sbtTestCommand = "jvm/test",
157-
sbtUpdateCommand = "jvm/test:update",
158144
sbtPublishCommand = ";set jvm/publishArtifact in (Compile, packageDoc) := false ;jvm/publishLocal"
159145
)
160146

161147
lazy val scalatest = SbtCommunityProject(
162148
project = "scalatest",
163149
sbtTestCommand = ";scalacticDotty/clean;scalacticTestDotty/test;scalatestTestDotty/test",
164-
sbtUpdateCommand = "scalatest/update",
165150
sbtPublishCommand = ";scalacticDotty/publishLocal; scalatestDotty/publishLocal"
166151
)
167152

168153
lazy val scalatestplusScalacheck = SbtCommunityProject(
169154
project = "scalatestplus-scalacheck",
170155
sbtTestCommand = "scalatestPlusScalaCheckJVM/test",
171-
sbtUpdateCommand = "scalatestPlusScalaCheckJVM/update",
172156
sbtPublishCommand = "scalatestPlusScalaCheckJVM/publishLocal",
173157
dependencies = List(scalatest, scalacheck)
174158
)
175159

176160
lazy val scalaXml = SbtCommunityProject(
177161
project = "scala-xml",
178162
sbtTestCommand = "xml/test",
179-
sbtUpdateCommand = "xml/update"
180163
)
181164

182165
lazy val scopt = SbtCommunityProject(
183166
project = "scopt",
184167
sbtTestCommand = "scoptJVM/compile",
185-
sbtUpdateCommand = "scoptJVM/update"
186168
)
187169

188170
lazy val scalap = SbtCommunityProject(
189171
project = "scalap",
190172
sbtTestCommand = "scalap/compile",
191-
sbtUpdateCommand = "scalap/update"
192173
)
193174

194175
lazy val squants = SbtCommunityProject(
195176
project = "squants",
196177
sbtTestCommand = "squantsJVM/compile",
197-
sbtUpdateCommand = "squantsJVM/update"
198178
)
199179

200180
lazy val betterfiles = SbtCommunityProject(
201181
project = "betterfiles",
202182
sbtTestCommand = "dotty-community-build/compile",
203-
sbtUpdateCommand = "dotty-community-build/update"
204183
)
205184

206185
lazy val ScalaPB = SbtCommunityProject(
207186
project = "ScalaPB",
208187
sbtTestCommand = "dotty-community-build/compile",
209-
sbtUpdateCommand = "dotty-community-build/update"
210188
)
211189

212190
lazy val minitest = SbtCommunityProject(
213191
project = "minitest",
214192
sbtTestCommand = "dotty-community-build/compile",
215-
sbtUpdateCommand = "dotty-community-build/update"
216193
)
217194

218195
lazy val fastparse = SbtCommunityProject(
219196
project = "fastparse",
220197
sbtTestCommand = "dotty-community-build/compile;dotty-community-build/test:compile",
221-
sbtUpdateCommand = "dotty-community-build/update"
222198
)
223199

224200
lazy val stdLib213 = SbtCommunityProject(
225201
project = "stdLib213",
226202
sbtTestCommand = """;set scalacOptions in Global += "-Yerased-terms" ;library/compile""",
227-
sbtUpdateCommand = "library/update",
228203
extraSbtArgs = List("-Dscala.build.compileWithDotty=true")
229204
)
230205

231206
lazy val shapeless = SbtCommunityProject(
232207
project = "shapeless",
233208
sbtTestCommand = "test",
234-
sbtUpdateCommand = "update"
235209
)
236210

237211
lazy val xmlInterpolator = SbtCommunityProject(
238212
project = "xml-interpolator",
239213
sbtTestCommand = "test",
240-
sbtUpdateCommand = "update"
241214
)
242215

243216
lazy val effpi = SbtCommunityProject(
@@ -251,56 +224,47 @@ object projects:
251224
// dropped in the 2.13 compatible release
252225

253226
// sbtTestCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:compile; plugin/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
254-
// sbtUpdateCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:update; plugin/test:update; benchmarks/test:update; examples/test:update; pluginBenchmarks/test:update"
255227

256228
sbtTestCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
257-
sbtUpdateCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:update; benchmarks/test:update; examples/test:update; pluginBenchmarks/test:update"
258229
)
259230

260231
// TODO @odersky? It got broken by #5458
261232
// val pdbp = test(
262233
// project = "pdbp",
263234
// sbtTestCommand = "compile",
264-
// sbtUpdateCommand = "update"
265235
// )
266236

267237
lazy val sconfig = SbtCommunityProject(
268238
project = "sconfig",
269239
sbtTestCommand = "sconfigJVM/test",
270-
sbtUpdateCommand = "sconfigJVM/update"
271240
)
272241

273242
lazy val zio = SbtCommunityProject(
274243
project = "zio",
275244
sbtTestCommand = "testJVMDotty",
276-
sbtUpdateCommand = "update"
277245
)
278246

279247
lazy val munit = SbtCommunityProject(
280248
project = "munit",
281249
sbtTestCommand = "testsJVM/test",
282-
sbtUpdateCommand = "munitJVM/update",
283250
)
284251

285252
lazy val scodecBits = SbtCommunityProject(
286253
project = "scodec-bits",
287254
sbtTestCommand = "coreJVM/test",
288-
sbtUpdateCommand = "coreJVM/update",
289255
sbtPublishCommand = "coreJVM/publishLocal",
290256
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck)
291257
)
292258

293259
lazy val scodec = SbtCommunityProject(
294260
project = "scodec",
295261
sbtTestCommand = "unitTests/test",
296-
sbtUpdateCommand = ";coreJVM/update; unitTests/update",
297262
dependencies = List(scalatest, scalacheck, scalatestplusScalacheck, scodecBits)
298263
)
299264

300265
lazy val scalaParserCombinators = SbtCommunityProject(
301266
project = "scala-parser-combinators",
302267
sbtTestCommand = "parserCombinators/test",
303-
sbtUpdateCommand = "parserCombinators/update"
304268
)
305269

306270
end projects
@@ -395,7 +359,3 @@ class CommunityBuildTest:
395359
end CommunityBuildTest
396360

397361
class TestCategory
398-
class UpdateCategory
399-
400-
@Category(Array(classOf[UpdateCategory]))
401-
class CommunityBuildUpdate extends CommunityBuildTest

project/Build.scala

-4
Original file line numberDiff line numberDiff line change
@@ -1186,8 +1186,6 @@ object Build {
11861186

11871187
val prepareCommunityBuild = taskKey[Unit]("Publish local the compiler and the sbt plugin. Also store the versions of the published local artefacts in two files, community-build/{dotty-bootstrapped.version,sbt-dotty-sbt}.")
11881188

1189-
val updateCommunityBuild = taskKey[Unit]("Updates the community build.")
1190-
11911189
lazy val `community-build` = project.in(file("community-build")).
11921190
dependsOn(dottyLibrary(Bootstrapped)).
11931191
settings(commonBootstrappedSettings).
@@ -1210,8 +1208,6 @@ object Build {
12101208
IO.write(baseDirectory.value / "sbt-dotty-sbt", pluginText)
12111209
IO.write(baseDirectory.value / "dotty-bootstrapped.version", dottyVersion)
12121210
},
1213-
updateCommunityBuild := testOnly.in(Test).toTask(
1214-
" dotty.communitybuild.CommunityBuildUpdate -- --include-categories=dotty.communitybuild.UpdateCategory").value,
12151211
testOptions in Test += Tests.Argument(
12161212
TestFrameworks.JUnit,
12171213
"--include-categories=dotty.communitybuild.TestCategory",

0 commit comments

Comments
 (0)