Skip to content

Commit 5df04b3

Browse files
committed
conflict resolve
2 parents 61822d2 + fe7535f commit 5df04b3

File tree

118 files changed

+1198
-746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1198
-746
lines changed

.github/workflows/ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ jobs:
232232
git submodule update --init --recursive --jobs 7
233233
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
234234
235+
- name: Show dependency tracking file
236+
if: ${{ always() }}
237+
run: cat community-build/dotty-community-build-deps || true
238+
235239
community_build_b:
236240
runs-on: [self-hosted, Linux]
237241
container:
@@ -275,6 +279,10 @@ jobs:
275279
git submodule update --init --recursive --jobs 7
276280
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
277281
282+
- name: Show dependency tracking file
283+
if: ${{ always() }}
284+
run: cat community-build/dotty-community-build-deps || true
285+
278286
community_build_c:
279287
runs-on: [self-hosted, Linux]
280288
container:
@@ -318,6 +326,10 @@ jobs:
318326
git submodule update --init --recursive --jobs 7
319327
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
320328
329+
- name: Show dependency tracking file
330+
if: ${{ always() }}
331+
run: cat community-build/dotty-community-build-deps || true
332+
321333
community_build_forward_compat:
322334
runs-on: [self-hosted, Linux]
323335
container:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ compiler/after-pickling.txt
6565
bench/compile.txt
6666

6767
community-build/scala3-bootstrapped.version
68+
community-build/sbt-injected-plugins
6869
community-build/sbt-dotty-sbt
6970
community-build/sbt-scalajs-sbt
7071
community-build/dotty-community-build-deps

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[submodule "community-build/community-projects/algebra"]
2-
path = community-build/community-projects/algebra
3-
url = https://github.com/dotty-staging/algebra
41
[submodule "community-build/community-projects/betterfiles"]
52
path = community-build/community-projects/betterfiles
63
url = https://github.com/dotty-staging/better-files
@@ -250,3 +247,6 @@
250247
[submodule "community-build/community-projects/scalacheck-forward-compat"]
251248
path = community-build/community-projects/scalacheck-forward-compat
252249
url = https://github.com/dotty-staging/scalacheck
250+
[submodule "community-build/community-projects/http4s"]
251+
path = community-build/community-projects/http4s
252+
url = https://github.com/dotty-staging/http4s.git

bench/profiles/projects.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ charts:
2626

2727
scripts:
2828
dotty:
29-
- measure -with-compiler $(find $PROG_HOME/dotty/compiler/src/dotty -name *.scala -o -name *.java)
29+
- measure -feature -deprecation -unchecked -Xfatal-warnings -encoding UTF8 -language:implicitConversions -Yexplicit-nulls -with-compiler $(find $PROG_HOME/dotty/compiler/src/dotty -name *.scala -o -name *.java)
3030

3131
re2s:
3232
- measure $(find $PROG_HOME/tests/re2s/src -name *.scala)
Submodule http4s added at fc0a18d

community-build/src/scala/dotty/communitybuild/CommunityBuildRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ trait CommunityBuildRunner:
3434
/** Build the given project with the published local compiler and sbt plugin.
3535
*
3636
* This test reads the compiler version from community-build/dotty-bootstrapped.version
37-
* and expects community-build/sbt-dotty-sbt to set the compiler plugin.
37+
* and expects community-build/sbt-injected-plugins to set any necessary plugins.
3838
*
3939
* @param project The project name, should be a git submodule in community-build/
4040
* @param command The binary file of the program used to test the project – usually

community-build/src/scala/dotty/communitybuild/projects.scala

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lazy val testedCompilerVersion: String =
1313
lazy val sbtPluginFilePath: String =
1414
// Workaround for https://github.com/sbt/sbt/issues/4395
1515
new File(sys.props("user.home") + "/.sbt/1.0/plugins").mkdirs()
16-
communitybuildDir.resolve("sbt-dotty-sbt").toAbsolutePath().toString()
16+
communitybuildDir.resolve("sbt-injected-plugins").toAbsolutePath().toString()
1717

1818
def log(msg: String) = println(Console.GREEN + msg + Console.RESET)
1919

@@ -145,7 +145,7 @@ final case class SbtCommunityProject(
145145
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
146146
case _ => Nil
147147
extraSbtArgs ++ sbtProps ++ List(
148-
"-sbt-version", "1.6.1",
148+
"-sbt-version", "1.6.2",
149149
"-Dsbt.supershell=false",
150150
s"-Ddotty.communitybuild.dir=$communitybuildDir",
151151
s"--addPluginSbtFile=$sbtPluginFilePath"
@@ -281,12 +281,6 @@ object projects:
281281
requiresExperimental = true,
282282
)
283283

284-
lazy val algebra = SbtCommunityProject(
285-
project = "algebra",
286-
sbtTestCommand = "coreJVM/compile",
287-
sbtDocCommand = forceDoc("coreJVM")
288-
)
289-
290284
lazy val scalacheck = SbtCommunityProject(
291285
project = "scalacheck",
292286
sbtTestCommand = "jvm/test;js/test",
@@ -305,10 +299,9 @@ object projects:
305299
// Some scalatest's tests are flaky (https://github.com/scalatest/scalatest/issues/2049)
306300
// so we disable them, this list is based on the one used in the Scala 2 community build
307301
// (https://github.com/scala/community-build/blob/2.13.x/proj/scalatest.conf).
308-
"""set scalatestTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "GeneratorSpec.scala" || "FrameworkSuite.scala" || "WaitersSpec.scala" || "TestSortingReporterSpec.scala" || "JavaFuturesSpec.scala" || "ParallelTestExecutionSpec.scala" || "TimeLimitsSpec.scala" || "TestThreadsStartingCounterSpec.scala" || "SuiteSortingReporterSpec.scala" || "CommonGeneratorsSpec.scala" || "PropCheckerAssertingSpec.scala" || "ConductorMethodsSuite.scala"""",
309-
"""set scalacticTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "NonEmptyArraySpec.scala"""",
302+
"""set scalatestTestDotty / Test / managedSources ~= (_.filterNot(_.getName == "GeneratorSpec.scala").filterNot(_.getName == "FrameworkSuite.scala").filterNot(_.getName == "WaitersSpec.scala").filterNot(_.getName == "TestSortingReporterSpec.scala").filterNot(_.getName == "JavaFuturesSpec.scala").filterNot(_.getName == "ParallelTestExecutionSpec.scala").filterNot(_.getName == "TimeLimitsSpec.scala").filterNot(_.getName == "DispatchReporterSpec.scala").filterNot(_.getName == "TestThreadsStartingCounterSpec.scala").filterNot(_.getName == "SuiteSortingReporterSpec.scala").filterNot(_.getName == "CommonGeneratorsSpec.scala").filterNot(_.getName == "PropCheckerAssertingSpec.scala").filterNot(_.getName == "ConductorMethodsSuite.scala").filterNot(_.getName == "EventuallySpec.scala"))""",
303+
"""set scalacticTestDotty / Test / managedSources ~= (_.filterNot(_.getName == "NonEmptyArraySpec.scala"))""",
310304
"""set genRegularTests4 / Test / managedSources ~= (_.filterNot(_.getName == "FrameworkSuite.scala").filterNot(_.getName == "GeneratorSpec.scala").filterNot(_.getName == "CommonGeneratorsSpec.scala").filterNot(_.getName == "ParallelTestExecutionSpec.scala").filterNot(_.getName == "DispatchReporterSpec.scala").filterNot(_.getName == "TestThreadsStartingCounterSpec.scala").filterNot(_.getName == "EventuallySpec.scala"))""",
311-
312305
"scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile"
313306
).mkString("; "),
314307
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal; scalacticDottyJS/publishLocal; scalatestDottyJS/publishLocal",
@@ -364,7 +357,7 @@ object projects:
364357

365358
lazy val scalaPB = SbtCommunityProject(
366359
project = "ScalaPB",
367-
sbtTestCommand = "dotty-community-build/compile",
360+
sbtTestCommand = "lensesJVM3/compile; runtimeJVM3/compile; grpcRuntimeJVM3/compile; compilerPluginJVM3/compile",
368361
// aggregateDoc("runtimeJVM")("scalapbc", "grpcRuntime", "compilerPlugin") fails with
369362
// module class ScalaPbCodeGenerator$ has non-class parent: TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class <root>)),module protocbridge),ProtocCodeGenerator)
370363
// Also it seems that we do not handle correctly aggreagation projects
@@ -442,6 +435,7 @@ object projects:
442435
project = "zio",
443436
sbtTestCommand = "testJVMDotty",
444437
sbtDocCommand = forceDoc("coreJVM"),
438+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
445439
dependencies = () => List(izumiReflect)
446440
)
447441

@@ -468,12 +462,13 @@ object projects:
468462
sbtTestCommand = "unitTests/test",
469463
// Adds <empty> package
470464
sbtDocCommand = "coreJVM/doc",
465+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
471466
dependencies = () => List(munit, scodecBits),
472467
)
473468

474469
lazy val scalaParserCombinators = SbtCommunityProject(
475470
project = "scala-parser-combinators",
476-
sbtTestCommand = "parserCombinatorsJVM/test",
471+
sbtTestCommand = "set every versionPolicyIntention := Compatibility.None; parserCombinatorsJVM/test",
477472
sbtDocCommand = forceDoc("parserCombinatorsJVM"),
478473
)
479474

@@ -512,7 +507,7 @@ object projects:
512507

513508
lazy val catsEffect3 = SbtCommunityProject(
514509
project = "cats-effect-3",
515-
sbtTestCommand = "test",
510+
sbtTestCommand = "ciJVM",
516511
sbtPublishCommand = "publishLocal",
517512
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
518513
dependencies = () => List(cats, coop, disciplineSpecs2, scalacheck)
@@ -552,6 +547,7 @@ object projects:
552547
project = "discipline",
553548
sbtTestCommand = "coreJVM/test;coreJS/test",
554549
sbtPublishCommand = "set every credentials := Nil;coreJVM/publishLocal;coreJS/publishLocal",
550+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
555551
dependencies = () => List(scalacheck)
556552
)
557553

@@ -679,9 +675,9 @@ object projects:
679675

680676
lazy val scissLucre = SbtCommunityProject(
681677
project = "Lucre",
682-
sbtTestCommand = "adjunctJVM/test;baseJVM/test;confluentJVM/test;coreJVM/test;dataJVM/test;expr0JVM/test;expr1JVM/test;exprJVM/test;geomJVM/test;lucre-bdb/test;testsJVM/test",
678+
sbtTestCommand = "adjunctJVM/test;baseJVM/test;confluentJVM/test;coreJVM/test;dataJVM/test;exprJVM/test;geomJVM/test;lucre-bdb/test;testsJVM/test",
683679
extraSbtArgs = List("-Dde.sciss.lucre.ShortTests=true"),
684-
sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;expr0JVM/publishLocal;expr1JVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal",
680+
sbtPublishCommand = "adjunctJVM/publishLocal;baseJVM/publishLocal;confluentJVM/publishLocal;coreJVM/publishLocal;dataJVM/publishLocal;exprJVM/publishLocal;geomJVM/publishLocal;lucre-bdb/publishLocal",
685681
dependencies = () => List(scalaSTM, scissAsyncFile, scissEqual, scissFingerTree, scissLog, scissModel, scissNumbers, scissSerial, scissSpan, scalatest),
686682
)
687683

@@ -711,6 +707,7 @@ object projects:
711707
"""set actorTests/Compile/scalacOptions -= "-Xfatal-warnings"""",
712708
"akka-actor-tests/Test/compile",
713709
).mkString("; "),
710+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
714711
dependencies = () => List(scalatest, scalatestplusJunit, scalatestplusScalacheck)
715712
)
716713

@@ -761,6 +758,7 @@ object projects:
761758
project = "fs2",
762759
sbtTestCommand = "coreJVM/test; coreJS/test", // io/test requires JDK9+
763760
sbtPublishCommand = "coreJVM/publishLocal; coreJS/publishLocal",
761+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
764762
dependencies = () => List(cats, catsEffect3, munitCatsEffect, scalacheckEffect, scodecBits)
765763
)
766764

@@ -789,9 +787,18 @@ object projects:
789787
project = "spire",
790788
sbtTestCommand = "test",
791789
sbtPublishCommand = "publishLocal",
790+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
792791
dependencies = () => List(cats, disciplineMunit)
793792
)
794793

794+
lazy val http4s = SbtCommunityProject(
795+
project = "http4s",
796+
sbtTestCommand = "tests/test; server/test; client/test; ember-core/test; ember-server/test; ember-client/test; circe/test",
797+
sbtPublishCommand = "publishLocal",
798+
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
799+
dependencies = () => List(cats, catsEffect3, fs2, disciplineMunit, scalacheckEffect)
800+
)
801+
795802
end projects
796803

797804
lazy val forwardCompatMapping = Map[CommunityProject, CommunityProject](
@@ -824,7 +831,6 @@ def allProjects = List(
824831
projects.cask,
825832
projects.scas,
826833
projects.intent,
827-
projects.algebra,
828834
projects.scalacheck,
829835
projects.scalacheckForwardCompat,
830836
projects.scalatest,
@@ -894,7 +900,9 @@ def allProjects = List(
894900
projects.jacksonModuleScala,
895901
projects.specs2,
896902
projects.coop,
897-
projects.coopForwardCompat
903+
projects.coopForwardCompat,
904+
projects.spire,
905+
projects.http4s
898906
)
899907

900908
lazy val projectMap = allProjects.groupBy(_.project)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,21 @@ class CommunityBuildTestB:
4343
@Test def disciplineMunit = projects.disciplineMunit.run()
4444
@Test def disciplineSpecs2 = projects.disciplineSpecs2.run()
4545
@Test def fs2 = projects.fs2.run()
46+
@Test def monocle = projects.monocle.run()
4647
@Test def munit = projects.munit.run()
4748
@Test def munitCatsEffect = projects.munitCatsEffect.run()
4849
@Test def perspective = projects.perspective.run()
4950
@Test def scalacheckEffect = projects.scalacheckEffect.run()
5051
@Test def scodec = projects.scodec.run()
5152
@Test def scodecBits = projects.scodecBits.run()
52-
@Test def monocle = projects.monocle.run()
5353
@Test def simulacrumScalafixAnnotations = projects.simulacrumScalafixAnnotations.run()
54+
@Test def spire = projects.spire.run()
55+
@Test def http4s = projects.http4s.run()
5456
end CommunityBuildTestB
5557

5658
@Category(Array(classOf[TestCategory]))
5759
class CommunityBuildTestC:
5860
@Test def akka = projects.akka.run()
59-
@Test def algebra = projects.algebra.run()
6061
@Test def betterfiles = projects.betterfiles.run()
6162
@Test def cask = projects.cask.run()
6263
// Temporarily disabled until problem discovered in comments to #9449 is fixed
@@ -90,7 +91,6 @@ class CommunityBuildTestC:
9091
@Test def scas = projects.scas.run()
9192
@Test def sconfig = projects.sconfig.run()
9293
@Test def shapeless = projects.shapeless.run()
93-
@Test def spire = projects.spire.run()
9494
@Test def sourcecode = projects.sourcecode.run()
9595
@Test def specs2 = projects.specs2.run()
9696
@Test def stdLib213 = projects.stdLib213.run()

compiler/src/dotty/tools/backend/jvm/BytecodeWriters.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ trait BytecodeWriters {
100100
super.writeClass(label, jclassName, jclassBytes, outfile)
101101

102102
val segments = jclassName.split("[./]")
103-
val asmpFile = segments.foldLeft(baseDir: Path)(_ / _) changeExtension "asmp" toFile;
103+
val asmpFile = segments.foldLeft(baseDir: Path)(_ / _).changeExtension("asmp").toFile
104104

105105
asmpFile.parent.createDirectory()
106106
emitAsmp(jclassBytes, asmpFile)
@@ -131,7 +131,7 @@ trait BytecodeWriters {
131131
super.writeClass(label, jclassName, jclassBytes, outfile)
132132

133133
val pathName = jclassName
134-
val dumpFile = pathName.split("[./]").foldLeft(baseDir: Path) (_ / _) changeExtension "class" toFile;
134+
val dumpFile = pathName.split("[./]").foldLeft(baseDir: Path) (_ / _).changeExtension("class").toFile
135135
dumpFile.parent.createDirectory()
136136
val outstream = new DataOutputStream(new FileOutputStream(dumpFile.path))
137137

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4563,14 +4563,7 @@ class JSCodeGen()(using genCtx: Context) {
45634563
val module = annot.argumentConstantString(0).getOrElse {
45644564
unexpected("could not read the module argument as a string literal")
45654565
}
4566-
val path = annot.argumentConstantString(1).fold {
4567-
if (annot.arguments.sizeIs < 2)
4568-
parsePath(sym.defaultJSName)
4569-
else
4570-
Nil
4571-
} { pathName =>
4572-
parsePath(pathName)
4573-
}
4566+
val path = annot.argumentConstantString(1).fold[List[String]](Nil)(parsePath)
45744567
val importSpec = Import(module, path)
45754568
annot.argumentConstantString(2).fold[js.JSNativeLoadSpec] {
45764569
importSpec

0 commit comments

Comments
 (0)