Skip to content

Commit 3daeaa6

Browse files
committed
Merge branch 'main' into export-diagnostics
2 parents a6dfec2 + b1fc943 commit 3daeaa6

File tree

1,095 files changed

+10588
-3354
lines changed

Some content is hidden

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

1,095 files changed

+10588
-3354
lines changed

.github/workflows/ci.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,11 @@ jobs:
255255
run: |
256256
./project/scripts/sbt ";scala3-interfaces/mimaReportBinaryIssues ;scala3-library-bootstrapped/mimaReportBinaryIssues ;scala3-library-bootstrappedJS/mimaReportBinaryIssues; tasty-core-bootstrapped/mimaReportBinaryIssues; stdlib-bootstrapped/mimaReportBinaryIssues"
257257
258+
- name: TASTy MiMa
259+
run: |
260+
# This script cleans the compiler and recompiles it from scratch (keep as last run)
261+
./project/scripts/stdlib-bootstrapped-tasty-mima.sh
262+
258263
community_build_a:
259264
runs-on: [self-hosted, Linux]
260265
container:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,6 @@ docs/_spec/.jekyll-metadata
9999
# scaladoc related
100100
scaladoc/output/
101101

102+
#coverage
103+
coverage/
104+

.gitmodules

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@
2828
[submodule "community-build/community-projects/scala-xml"]
2929
path = community-build/community-projects/scala-xml
3030
url = https://github.com/dotty-staging/scala-xml
31-
[submodule "community-build/community-projects/shapeless"]
32-
path = community-build/community-projects/shapeless
33-
url = https://github.com/dotty-staging/shapeless
34-
branch = shapeless-3-staging
3531
[submodule "community-build/community-projects/xml-interpolator"]
3632
path = community-build/community-projects/xml-interpolator
3733
url = https://github.com/dotty-staging/xml-interpolator.git
@@ -222,3 +218,6 @@
222218
[submodule "community-build/community-projects/parboiled2"]
223219
path = community-build/community-projects/parboiled2
224220
url = https://github.com/dotty-staging/parboiled2.git
221+
[submodule "community-build/community-projects/shapeless-3"]
222+
path = community-build/community-projects/shapeless-3
223+
url = https://github.com/dotty-staging/shapeless-3.git
Submodule perspective updated 84 files
Lines changed: 0 additions & 1 deletion
This file was deleted.
Submodule shapeless-3 added at d27c5ba

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ final case class SbtCommunityProject(
140140
case Some(ivyHome) => List(s"-Dsbt.ivy.home=$ivyHome")
141141
case _ => Nil
142142
extraSbtArgs ++ sbtProps ++ List(
143-
"-sbt-version", "1.9.0",
143+
"-sbt-version", "1.9.3",
144144
"-Dsbt.supershell=false",
145145
s"-Ddotty.communitybuild.dir=$communitybuildDir",
146146
s"--addPluginSbtFile=$sbtPluginFilePath"
@@ -366,12 +366,10 @@ object projects:
366366
// sbtDocCommand = "library/doc" // Does no compile? No idea :/
367367
)
368368

369-
370-
lazy val shapeless = SbtCommunityProject(
371-
project = "shapeless",
372-
sbtTestCommand = """set deriving/scalacOptions -= "-Xfatal-warnings"; set typeable/scalacOptions -= "-Xfatal-warnings"; test""",
373-
// selectively disable -Xfatal-warnings due to deprecations
374-
sbtDocCommand = forceDoc("typeable", "deriving", "data"),
369+
lazy val shapeless3 = SbtCommunityProject(
370+
project = "shapeless-3",
371+
sbtTestCommand = "testJVM; testJS",
372+
sbtDocCommand = forceDoc("typeable", "deriving"),
375373
scalacOptions = SbtCommunityProject.scalacOptions.filter(_ != "-Ysafe-init"), // due to -Xfatal-warnings
376374
)
377375

@@ -796,7 +794,7 @@ def allProjects = List(
796794
projects.minitest,
797795
projects.fastparse,
798796
projects.stdLib213,
799-
projects.shapeless,
797+
projects.shapeless3,
800798
projects.xmlInterpolator,
801799
projects.effpi,
802800
projects.sconfig,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class CommunityBuildTestC:
9191
@Test def scalaz = projects.scalaz.run()
9292
@Test def scas = projects.scas.run()
9393
@Test def sconfig = projects.sconfig.run()
94-
@Test def shapeless = projects.shapeless.run()
94+
@Test def shapeless3 = projects.shapeless3.run()
9595
@Test def sourcecode = projects.sourcecode.run()
9696
@Test def specs2 = projects.specs2.run()
9797

compiler/src/dotty/tools/MainGenericRunner.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ object MainGenericRunner {
148148
case (o @ javaOption(striped)) :: tail =>
149149
processArgs(tail, settings.withJavaArgs(striped).withScalaArgs(o))
150150
case (o @ scalaOption(_*)) :: tail =>
151-
val remainingArgs = (CommandLineParser.expandArg(o) ++ tail).toList
151+
val remainingArgs = CommandLineParser.expandArg(o) ++ tail
152152
processArgs(remainingArgs, settings)
153153
case (o @ colorOption(_*)) :: tail =>
154154
processArgs(tail, settings.withScalaArgs(o))

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,9 +763,14 @@ trait BCodeSkelBuilder extends BCodeHelpers {
763763
for (p <- params) { locals.makeLocal(p.symbol) }
764764
// debug assert((params.map(p => locals(p.symbol).tk)) == asmMethodType(methSymbol).getArgumentTypes.toList, "debug")
765765

766-
if (params.size > MaximumJvmParameters) {
766+
val paramsSize = params.map { param =>
767+
val tpeTym = param.symbol.info.typeSymbol
768+
if tpeTym == defn.LongClass || tpeTym == defn.DoubleClass then 2 else 1
769+
}.sum
770+
if (paramsSize > MaximumJvmParameters) {
767771
// SI-7324
768-
report.error(em"Platform restriction: a parameter list's length cannot exceed $MaximumJvmParameters.", ctx.source.atSpan(methSymbol.span))
772+
val info = if paramsSize == params.length then "" else " (Long and Double count as 2)" // https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.3.3
773+
report.error(em"Platform restriction: a parameter list's length cannot exceed $MaximumJvmParameters$info.", ctx.source.atSpan(methSymbol.span))
769774
return
770775
}
771776

0 commit comments

Comments
 (0)