Skip to content

Commit

Permalink
conflict resolve
Browse files Browse the repository at this point in the history
  • Loading branch information
rochala committed Mar 15, 2022
2 parents 61822d2 + fe7535f commit 5df04b3
Show file tree
Hide file tree
Showing 118 changed files with 1,198 additions and 746 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ jobs:
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestA"
- name: Show dependency tracking file
if: ${{ always() }}
run: cat community-build/dotty-community-build-deps || true

community_build_b:
runs-on: [self-hosted, Linux]
container:
Expand Down Expand Up @@ -275,6 +279,10 @@ jobs:
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestB"
- name: Show dependency tracking file
if: ${{ always() }}
run: cat community-build/dotty-community-build-deps || true

community_build_c:
runs-on: [self-hosted, Linux]
container:
Expand Down Expand Up @@ -318,6 +326,10 @@ jobs:
git submodule update --init --recursive --jobs 7
./project/scripts/sbt "community-build/testOnly dotty.communitybuild.CommunityBuildTestC"
- name: Show dependency tracking file
if: ${{ always() }}
run: cat community-build/dotty-community-build-deps || true

community_build_forward_compat:
runs-on: [self-hosted, Linux]
container:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ compiler/after-pickling.txt
bench/compile.txt

community-build/scala3-bootstrapped.version
community-build/sbt-injected-plugins
community-build/sbt-dotty-sbt
community-build/sbt-scalajs-sbt
community-build/dotty-community-build-deps
Expand Down
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "community-build/community-projects/algebra"]
path = community-build/community-projects/algebra
url = https://github.com/dotty-staging/algebra
[submodule "community-build/community-projects/betterfiles"]
path = community-build/community-projects/betterfiles
url = https://github.com/dotty-staging/better-files
Expand Down Expand Up @@ -250,3 +247,6 @@
[submodule "community-build/community-projects/scalacheck-forward-compat"]
path = community-build/community-projects/scalacheck-forward-compat
url = https://github.com/dotty-staging/scalacheck
[submodule "community-build/community-projects/http4s"]
path = community-build/community-projects/http4s
url = https://github.com/dotty-staging/http4s.git
2 changes: 1 addition & 1 deletion bench/profiles/projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ charts:

scripts:
dotty:
- measure -with-compiler $(find $PROG_HOME/dotty/compiler/src/dotty -name *.scala -o -name *.java)
- 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)

re2s:
- measure $(find $PROG_HOME/tests/re2s/src -name *.scala)
Expand Down
1 change: 1 addition & 0 deletions community-build/community-projects/http4s
Submodule http4s added at fc0a18
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ trait CommunityBuildRunner:
/** Build the given project with the published local compiler and sbt plugin.
*
* This test reads the compiler version from community-build/dotty-bootstrapped.version
* and expects community-build/sbt-dotty-sbt to set the compiler plugin.
* and expects community-build/sbt-injected-plugins to set any necessary plugins.
*
* @param project The project name, should be a git submodule in community-build/
* @param command The binary file of the program used to test the project – usually
Expand Down
44 changes: 26 additions & 18 deletions community-build/src/scala/dotty/communitybuild/projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lazy val testedCompilerVersion: String =
lazy val sbtPluginFilePath: String =
// Workaround for https://github.com/sbt/sbt/issues/4395
new File(sys.props("user.home") + "/.sbt/1.0/plugins").mkdirs()
communitybuildDir.resolve("sbt-dotty-sbt").toAbsolutePath().toString()
communitybuildDir.resolve("sbt-injected-plugins").toAbsolutePath().toString()

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

Expand Down Expand Up @@ -145,7 +145,7 @@ final case class SbtCommunityProject(
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
case _ => Nil
extraSbtArgs ++ sbtProps ++ List(
"-sbt-version", "1.6.1",
"-sbt-version", "1.6.2",
"-Dsbt.supershell=false",
s"-Ddotty.communitybuild.dir=$communitybuildDir",
s"--addPluginSbtFile=$sbtPluginFilePath"
Expand Down Expand Up @@ -281,12 +281,6 @@ object projects:
requiresExperimental = true,
)

lazy val algebra = SbtCommunityProject(
project = "algebra",
sbtTestCommand = "coreJVM/compile",
sbtDocCommand = forceDoc("coreJVM")
)

lazy val scalacheck = SbtCommunityProject(
project = "scalacheck",
sbtTestCommand = "jvm/test;js/test",
Expand All @@ -305,10 +299,9 @@ object projects:
// Some scalatest's tests are flaky (https://github.com/scalatest/scalatest/issues/2049)
// so we disable them, this list is based on the one used in the Scala 2 community build
// (https://github.com/scala/community-build/blob/2.13.x/proj/scalatest.conf).
"""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"""",
"""set scalacticTest / Test / unmanagedSources / excludeFilter := HiddenFileFilter || "NonEmptyArraySpec.scala"""",
"""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"))""",
"""set scalacticTestDotty / Test / managedSources ~= (_.filterNot(_.getName == "NonEmptyArraySpec.scala"))""",
"""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"))""",

"scalacticTestDotty/test; scalatestTestDotty/test; scalacticDottyJS/compile; scalatestDottyJS/compile"
).mkString("; "),
sbtPublishCommand = "scalacticDotty/publishLocal; scalatestDotty/publishLocal; scalacticDottyJS/publishLocal; scalatestDottyJS/publishLocal",
Expand Down Expand Up @@ -364,7 +357,7 @@ object projects:

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

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

lazy val scalaParserCombinators = SbtCommunityProject(
project = "scala-parser-combinators",
sbtTestCommand = "parserCombinatorsJVM/test",
sbtTestCommand = "set every versionPolicyIntention := Compatibility.None; parserCombinatorsJVM/test",
sbtDocCommand = forceDoc("parserCombinatorsJVM"),
)

Expand Down Expand Up @@ -512,7 +507,7 @@ object projects:

lazy val catsEffect3 = SbtCommunityProject(
project = "cats-effect-3",
sbtTestCommand = "test",
sbtTestCommand = "ciJVM",
sbtPublishCommand = "publishLocal",
sbtDocCommand = ";coreJVM/doc ;lawsJVM/doc ;kernelJVM/doc",
dependencies = () => List(cats, coop, disciplineSpecs2, scalacheck)
Expand Down Expand Up @@ -552,6 +547,7 @@ object projects:
project = "discipline",
sbtTestCommand = "coreJVM/test;coreJS/test",
sbtPublishCommand = "set every credentials := Nil;coreJVM/publishLocal;coreJS/publishLocal",
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
dependencies = () => List(scalacheck)
)

Expand Down Expand Up @@ -679,9 +675,9 @@ object projects:

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

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

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

Expand Down Expand Up @@ -789,9 +787,18 @@ object projects:
project = "spire",
sbtTestCommand = "test",
sbtPublishCommand = "publishLocal",
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Xcheck-macros"),
dependencies = () => List(cats, disciplineMunit)
)

lazy val http4s = SbtCommunityProject(
project = "http4s",
sbtTestCommand = "tests/test; server/test; client/test; ember-core/test; ember-server/test; ember-client/test; circe/test",
sbtPublishCommand = "publishLocal",
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"),
dependencies = () => List(cats, catsEffect3, fs2, disciplineMunit, scalacheckEffect)
)

end projects

lazy val forwardCompatMapping = Map[CommunityProject, CommunityProject](
Expand Down Expand Up @@ -824,7 +831,6 @@ def allProjects = List(
projects.cask,
projects.scas,
projects.intent,
projects.algebra,
projects.scalacheck,
projects.scalacheckForwardCompat,
projects.scalatest,
Expand Down Expand Up @@ -894,7 +900,9 @@ def allProjects = List(
projects.jacksonModuleScala,
projects.specs2,
projects.coop,
projects.coopForwardCompat
projects.coopForwardCompat,
projects.spire,
projects.http4s
)

lazy val projectMap = allProjects.groupBy(_.project)
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,21 @@ class CommunityBuildTestB:
@Test def disciplineMunit = projects.disciplineMunit.run()
@Test def disciplineSpecs2 = projects.disciplineSpecs2.run()
@Test def fs2 = projects.fs2.run()
@Test def monocle = projects.monocle.run()
@Test def munit = projects.munit.run()
@Test def munitCatsEffect = projects.munitCatsEffect.run()
@Test def perspective = projects.perspective.run()
@Test def scalacheckEffect = projects.scalacheckEffect.run()
@Test def scodec = projects.scodec.run()
@Test def scodecBits = projects.scodecBits.run()
@Test def monocle = projects.monocle.run()
@Test def simulacrumScalafixAnnotations = projects.simulacrumScalafixAnnotations.run()
@Test def spire = projects.spire.run()
@Test def http4s = projects.http4s.run()
end CommunityBuildTestB

@Category(Array(classOf[TestCategory]))
class CommunityBuildTestC:
@Test def akka = projects.akka.run()
@Test def algebra = projects.algebra.run()
@Test def betterfiles = projects.betterfiles.run()
@Test def cask = projects.cask.run()
// Temporarily disabled until problem discovered in comments to #9449 is fixed
Expand Down Expand Up @@ -90,7 +91,6 @@ class CommunityBuildTestC:
@Test def scas = projects.scas.run()
@Test def sconfig = projects.sconfig.run()
@Test def shapeless = projects.shapeless.run()
@Test def spire = projects.spire.run()
@Test def sourcecode = projects.sourcecode.run()
@Test def specs2 = projects.specs2.run()
@Test def stdLib213 = projects.stdLib213.run()
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/backend/jvm/BytecodeWriters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ trait BytecodeWriters {
super.writeClass(label, jclassName, jclassBytes, outfile)

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

asmpFile.parent.createDirectory()
emitAsmp(jclassBytes, asmpFile)
Expand Down Expand Up @@ -131,7 +131,7 @@ trait BytecodeWriters {
super.writeClass(label, jclassName, jclassBytes, outfile)

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

Expand Down
9 changes: 1 addition & 8 deletions compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4563,14 +4563,7 @@ class JSCodeGen()(using genCtx: Context) {
val module = annot.argumentConstantString(0).getOrElse {
unexpected("could not read the module argument as a string literal")
}
val path = annot.argumentConstantString(1).fold {
if (annot.arguments.sizeIs < 2)
parsePath(sym.defaultJSName)
else
Nil
} { pathName =>
parsePath(pathName)
}
val path = annot.argumentConstantString(1).fold[List[String]](Nil)(parsePath)
val importSpec = Import(module, path)
annot.argumentConstantString(2).fold[js.JSNativeLoadSpec] {
importSpec
Expand Down
Loading

0 comments on commit 5df04b3

Please sign in to comment.