Skip to content

Switch to the 2.13 standard library #7019

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 88 commits into from
Aug 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
c485603
Remove accidental uses of the companion object Unit
smarter Aug 5, 2019
f3ab8b9
Always fork when running stuff
smarter Aug 8, 2019
f041b1d
Treat some Java interfaces as universal traits
smarter Aug 5, 2019
9953816
Start building Dotty against the 2.13 stdlib
smarter Mar 29, 2019
a6efeb6
Slight build refactoring
smarter Aug 8, 2019
662b7e0
Change extension method naming scheme to match 2.13
smarter Jul 12, 2019
1168003
Handle s and raw interpolator with 2.13 stdlib
smarter Aug 5, 2019
5acd4bf
Cross-compile the compiler with the 2.13 stdlib
smarter Aug 5, 2019
5053e03
Cross-compile dotty-doc with the 2.13 stdlib
smarter Aug 5, 2019
1ac18ba
Cross-compile bench with the 2.13 stdlib
smarter Aug 5, 2019
2ae438d
Compile the language server with the 2.13 stdlib
smarter Aug 5, 2019
72a5b71
Port sbt-bridge unit tests to 2.13 stdlib
smarter Aug 5, 2019
3f53d57
Update scala-xml for the 2.13 stdlib
smarter Aug 8, 2019
af63f66
Allow implementing unapplySeq using scala.collection.Seq
smarter Aug 8, 2019
b9ba16e
Adapt/remove tests for the 2.13 stdlib.
smarter Apr 9, 2018
a767979
fix some deprecations
bishabosha Aug 9, 2019
88b9c26
remove deprecations that can be resolved with 2.12 library
bishabosha Aug 9, 2019
8873694
case class hashCode implementation matches 2.13
bishabosha Aug 9, 2019
73f20b5
refactor, fix caseClassHash test
bishabosha Aug 9, 2019
ab20515
refactor definitions
bishabosha Aug 9, 2019
c1ac8a9
update scalacheck with explicit return type
bishabosha Aug 12, 2019
832e0dd
algebra build with 2.13 stdlib
bishabosha Aug 12, 2019
a08d86b
build squants with 2.13 stdlib
bishabosha Aug 13, 2019
a946a3c
Unmangle external references unpickled from Scala 2
smarter Aug 13, 2019
94485c7
build scalatest with 2.13 stdlib
bishabosha Aug 13, 2019
0eb4885
better-files build with 2.13 stdlib
bishabosha Aug 14, 2019
a60feb8
build scopt with 2.13 stdlib
bishabosha Aug 14, 2019
dd48d1c
drop some tests in effpi
bishabosha Aug 14, 2019
eaa10f1
Say goodbye to the 2.12 stdlib
smarter Aug 9, 2019
983dc85
Allow user-written productElementName
smarter Aug 11, 2019
792d610
Remove i966.scala test and corresponding code path
smarter Aug 13, 2019
0cb2a53
Properly unpickle Scala 2 refinements
smarter Aug 13, 2019
44b4754
Fix classloader confusion in the REPL
smarter Aug 11, 2019
658eecf
Adapt REPL tests for the 2.13 stdlib
smarter Aug 14, 2019
3c2583f
Fix typing of PartialFunction argument to overloaded method
smarter Aug 14, 2019
4cb144d
build xml-interpolator with 2.13 stdlib
bishabosha Aug 15, 2019
8778967
restore some tests to effpi
bishabosha Aug 15, 2019
a7c6df2
modify scalatest build
bishabosha Aug 15, 2019
a220ba1
build minitest with 2.13 stdlib
bishabosha Aug 15, 2019
145132a
Avoid loop in subtype checking of applied types
smarter Aug 15, 2019
0e2aff6
Add back implicit signatures to hk-infer.scala test
smarter Aug 15, 2019
5f8b0bf
Move macro test in the correct directory
smarter Aug 15, 2019
0cf8fd9
remove factory convertors in scalatest
bishabosha Aug 15, 2019
494cb00
Fix exhaustiveness warnings on 2.13
smarter Aug 15, 2019
38a423d
build scalap with stdlib 2.13
bishabosha Aug 15, 2019
02c5293
Adapt macro tests to the 2.13 stdlib
smarter Aug 15, 2019
71a022c
Disable LazyList test until scala/bug#11687 gets fixed
smarter Aug 15, 2019
b2f1eed
drop scalaPB until type inference issue is resolved
bishabosha Aug 16, 2019
ea916ce
build fastparse with 2.13 stdlib
bishabosha Aug 16, 2019
67052f1
build dotty-semanticdb with 2.13 stdlib
bishabosha Aug 16, 2019
4d06960
restore ScalaPB and build it with 2.13 stdlib
bishabosha Aug 18, 2019
1cd41fe
Upgrade to fastparse 2 and add more tests
bishabosha Aug 21, 2019
1fa8e91
rebase sourcecode
bishabosha Aug 21, 2019
f951534
Take number of type parameters into account when choosing an overload
smarter Aug 19, 2019
335806a
scalatest: Fix dotty dependencies
smarter Aug 22, 2019
953b940
fix some tests
bishabosha Aug 22, 2019
9010a4b
.drone.yml: regenerated CI image to update its cache
smarter Aug 22, 2019
00d2bf0
Make sure the community build runs with the correct ivy cache
smarter Aug 22, 2019
f5459d0
Bump version to 0.18.1
smarter Aug 22, 2019
8c856e9
Force a nightly to be published
smarter Aug 22, 2019
af66579
Update reference compiler and remove final deprecations
bishabosha Aug 23, 2019
a75c3f7
fix merge conflict in ParallelTesting
bishabosha Aug 23, 2019
e27eb9d
Reenable fatal warnings
smarter Aug 23, 2019
3d13696
Work around 2.13 collection performance bug
smarter Aug 23, 2019
878db33
ScriptEngine: Avoid classpath pollution
smarter Aug 23, 2019
e8db9d5
Adapt tasty-reflect for the changes in Signature
smarter Aug 23, 2019
6e32d39
Neg test i1650 now needs an extra error marker
smarter Aug 23, 2019
f82d9a3
scalajs-ir has now been published for 2.13
smarter Aug 23, 2019
c5f9b2a
move productElementName generation to SyntheticMethods
bishabosha Aug 23, 2019
87416ea
Remove dead case and update checkfile
smarter Aug 23, 2019
4fd550f
Adapt sbt scripted tests for the 2.13 stdlib
smarter Aug 23, 2019
acfe55c
Make i3187 a fuzzy test
smarter Aug 23, 2019
a553078
Inlining: Constant-fold select trees
smarter Aug 23, 2019
b4b9fe5
Move original t5375 to pending
smarter Aug 23, 2019
79bcc5c
Fix language server tests
smarter Aug 24, 2019
960498b
Fix -Ytest-pickler handling of aliases
smarter Aug 24, 2019
b93d83c
Fix unstable compiler output due to using Set
smarter Aug 24, 2019
13e76a7
update classpath for InterfaceEntryPointTest
bishabosha Aug 25, 2019
23f77c4
Fix infinite-loop when using Jar#iterator
smarter Aug 25, 2019
64bcaad
Update SignatureHelpTest for the 2.13 stdlib
smarter Aug 25, 2019
3e4a9cc
Remove hiding of CanBuildFrom params from the IDE/REPL
smarter Aug 25, 2019
a43efe3
Make Scala.js happy
smarter Aug 25, 2019
9e77e21
Re-fix test failure on Java 11
smarter Oct 1, 2018
ce05244
Fix a typo in Signature
smarter Aug 25, 2019
cd56de3
Delete obsolete comment
smarter Aug 25, 2019
5a3ad0d
Add reference to issue with union types
smarter Aug 25, 2019
6960f8d
Force another nightly to be published
smarter Aug 22, 2019
37fab22
Bump reference compiler to the previous commit
smarter Aug 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ steps:

- name: test
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on: [ clone ]
commands:
- cp -R . /tmp/1/ && cd /tmp/1/
Expand All @@ -36,7 +36,7 @@ steps:

- name: test_bootstrapped
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on: [ clone ]
commands:
- cp -R . /tmp/2/ && cd /tmp/2/
Expand All @@ -45,7 +45,7 @@ steps:

- name: community_build
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on: [ clone ]
commands:
- cp -R . /tmp/3/ && cd /tmp/3/
Expand All @@ -54,7 +54,7 @@ steps:

- name: test_sbt
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on: [ clone ]
commands:
- cp -R . /tmp/4/ && cd /tmp/4/
Expand All @@ -66,7 +66,7 @@ steps:

- name: test_java11
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on: [ clone ]
commands:
- export PATH="/usr/lib/jvm/java-11-openjdk-amd64/bin:$PATH"
Expand All @@ -80,7 +80,7 @@ steps:

- name: documentation
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on:
- test
- test_bootstrapped
Expand All @@ -99,7 +99,7 @@ steps:

- name: publish_nightly
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on:
- test
- test_bootstrapped
Expand All @@ -126,7 +126,7 @@ steps:

- name: publish_release
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on:
- test
- test_bootstrapped
Expand Down Expand Up @@ -169,7 +169,7 @@ steps:

- name: publish_sbt_release
pull: default
image: lampepfl/dotty:2019-04-22
image: lampepfl/dotty:2019-08-22
depends_on:
- test
- test_bootstrapped
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
url = https://github.com/dotty-staging/sourcecode
[submodule "community-build/community-projects/scala-xml"]
path = community-build/community-projects/scala-xml
url = https://github.com/scala/scala-xml
url = https://github.com/dotty-staging/scala-xml
[submodule "community-build/community-projects/shapeless"]
path = community-build/community-projects/shapeless
url = https://github.com/milessabin/shapeless
Expand Down
4 changes: 2 additions & 2 deletions bench/src/main/scala/Benchmarks.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.openjdk.jmh.results.format._
import java.util.concurrent.TimeUnit

import java.io.{File, FileOutputStream, BufferedWriter, FileWriter}
import scala.collection.JavaConversions._
import scala.collection.JavaConverters._
import scala.io.Source

object Bench {
Expand Down Expand Up @@ -86,7 +86,7 @@ class CompilerOptions {

@Setup
def prepare: Unit = {
opts = Bench.readCompileOptions.to[Array]
opts = Bench.readCompileOptions.toArray
}
}

Expand Down
2 changes: 1 addition & 1 deletion community-build/community-projects/ScalaPB
Submodule ScalaPB updated 382 files
2 changes: 1 addition & 1 deletion community-build/community-projects/algebra
Submodule algebra updated 34 files
+19 −0 CODE_OF_CONDUCT.md
+10 −5 README.md
+29 −36 build.sbt
+1 −1 core/src/main/scala/algebra/instances/array.scala
+3 −0 core/src/main/scala/algebra/lattice/Bool.scala
+63 −0 core/src/main/scala/algebra/lattice/DeMorgan.scala
+1 −1 core/src/main/scala/algebra/lattice/Heyting.scala
+70 −0 core/src/main/scala/algebra/lattice/Logic.scala
+1 −1 core/src/main/scala/algebra/ring/Additive.scala
+1 −1 core/src/main/scala/algebra/ring/Multiplicative.scala
+4 −3 core/src/test/scala/algebra/ring/RingTest.scala
+4 −4 docs/src/main/tut/index.md
+9 −0 laws/js/src/main/scala/algebra/laws/platform/Platform.scala
+9 −0 laws/jvm/src/main/scala/algebra/laws/platform/Platform.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/BaseLaws.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/CheckSupport.scala
+57 −0 laws/shared/src/main/scala/algebra/laws/DeMorganLaws.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/GroupLaws.scala
+1 −1 laws/shared/src/main/scala/algebra/laws/IsSerializable.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/LatticeLaws.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/LatticePartialOrderLaws.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/LogicLaws.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/OrderLaws.scala
+1 −1 laws/shared/src/main/scala/algebra/laws/RingLaws.scala
+1 −1 laws/shared/src/main/scala/algebra/laws/Rules.scala
+0 −0 laws/shared/src/main/scala/algebra/laws/package.scala
+0 −0 laws/shared/src/test/scala/algebra/laws/FPApprox.scala
+86 −83 laws/shared/src/test/scala/algebra/laws/LawTests.scala
+0 −0 laws/shared/src/test/scala/algebra/laws/Rat.scala
+53 −0 laws/shared/src/test/scala/algebra/laws/SimpleDeMorgan.scala
+0 −0 laws/shared/src/test/scala/algebra/laws/SimpleHeyting.scala
+1 −1 project/build.properties
+13 −11 project/plugins.sbt
+1 −1 version.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/fastparse
Submodule fastparse updated 211 files
2 changes: 1 addition & 1 deletion community-build/community-projects/minitest
Submodule minitest updated 37 files
+55 −0 .circleci/config.yml
+28 −0 CHANGES.md
+79 −15 README.md
+105 −19 build.sbt
+41 −0 jvm_js/src/main/scala/minitest/platform/package.scala
+2 −2 laws/src/main/scala/minitest/laws/Checkers.scala
+2 −2 laws/src/test/scala/minitest/laws/CheckersTest.scala
+35 −0 native/src/main/scala/minitest/platform/Await.scala
+35 −0 native/src/main/scala/minitest/platform/package.scala
+3 −3 project/build.properties
+10 −5 project/plugins.sbt
+2 −2 publish.sbt
+2 −2 shared/src/main/scala/minitest/SimpleTestSuite.scala
+2 −2 shared/src/main/scala/minitest/TestSuite.scala
+2 −2 shared/src/main/scala/minitest/api/AbstractTestSuite.scala
+20 −2 shared/src/main/scala/minitest/api/Asserts.scala
+2 −2 shared/src/main/scala/minitest/api/Properties.scala
+32 −22 shared/src/main/scala/minitest/api/Result.scala
+2 −2 shared/src/main/scala/minitest/api/SourceLocation.scala
+2 −2 shared/src/main/scala/minitest/api/TestSpec.scala
+2 −2 shared/src/main/scala/minitest/api/Utils.scala
+17 −0 shared/src/main/scala/minitest/api/Void.scala
+2 −2 shared/src/main/scala/minitest/api/exceptions.scala
+3 −3 shared/src/main/scala/minitest/api/package.scala
+38 −0 shared/src/main/scala/minitest/runner/ConsoleLogger.scala
+7 −5 shared/src/main/scala/minitest/runner/Framework.scala
+34 −0 shared/src/main/scala/minitest/runner/Options.scala
+7 −6 shared/src/main/scala/minitest/runner/Runner.scala
+25 −8 shared/src/main/scala/minitest/runner/Task.scala
+1 −1 shared/src/main/scala_2.10/minitest/api/compat.scala
+2 −2 shared/src/main/scala_2.11/minitest/api/compat.scala
+1 −1 shared/src/main/scala_2.12/minitest/api/compat.scala
+1 −1 shared/src/main/scala_2.13/minitest/api/compat.scala
+13 −0 shared/src/test/scala/minitest/tests/DoesNotCompileTest.scala
+3 −3 shared/src/test/scala/minitest/tests/EnvironmentTest.scala
+3 −3 shared/src/test/scala/minitest/tests/SimpleTest.scala
+2 −2 shared/src/test/scala/minitest/tests/SourceLocationTest.scala
2 changes: 1 addition & 1 deletion community-build/community-projects/scalacheck
Submodule scalacheck updated 51 files
+2 −2 CHANGELOG.markdown
+19 −0 CODE_OF_CONDUCT.md
+3 −3 LICENSE
+1 −1 README.markdown
+2 −2 RELEASE.markdown
+45 −24 build.sbt
+56 −25 doc/UserGuide.md
+1 −1 examples/commands-leveldb/build.sbt
+1 −1 examples/commands-nix/build.sbt
+1 −1 examples/commands-redis/build.sbt
+1 −1 examples/scalajs/build.sbt
+1 −1 examples/scalajs/project/build.sbt
+1 −1 examples/simple-sbt/build.sbt
+19 −5 js/src/main/scala/org/scalacheck/Platform.scala
+1 −1 jvm/src/main/scala/org/scalacheck/Platform.scala
+25 −1 jvm/src/test/scala/org/scalacheck/ArbitrarySpecification.scala
+3 −0 jvm/src/test/scala/org/scalacheck/CogenSpecification.scala
+43 −11 jvm/src/test/scala/org/scalacheck/GenSpecification.scala
+1 −1 jvm/src/test/scala/org/scalacheck/LazyPropertiesSpecification.scala
+5 −5 jvm/src/test/scala/org/scalacheck/PropertyFilterSpecification.scala
+1 −1 jvm/src/test/scala/org/scalacheck/TestSpecification.scala
+1 −1 jvm/src/test/scala/org/scalacheck/commands/CommandsSpecification.scala
+2 −2 jvm/src/test/scala/org/scalacheck/examples/StringUtils.scala
+1 −1 jvm/src/test/scala/org/scalacheck/rng/SeedSpecification.scala
+1 −1 native/src/main/scala/org/scalacheck/Platform.scala
+1 −1 project/build.properties
+4 −4 project/plugin.sbt
+40 −0 src/main/scala-2.13+/org/scalacheck/ScalaVersionSpecific.scala
+59 −0 src/main/scala-2.13+/org/scalacheck/util/BuildableVersionSpecific.scala
+39 −0 src/main/scala-2.13-/org/scalacheck/ScalaVersionSpecific.scala
+57 −0 src/main/scala-2.13-/org/scalacheck/util/BuildableVersionSpecific.scala
+7 −13 src/main/scala/org/scalacheck/Arbitrary.scala
+3 −3 src/main/scala/org/scalacheck/Cogen.scala
+34 −17 src/main/scala/org/scalacheck/Gen.scala
+88 −88 src/main/scala/org/scalacheck/GenArities.scala
+4 −4 src/main/scala/org/scalacheck/Prop.scala
+2 −2 src/main/scala/org/scalacheck/Properties.scala
+2 −2 src/main/scala/org/scalacheck/ScalaCheckFramework.scala
+1 −1 src/main/scala/org/scalacheck/Shrink.scala
+17 −10 src/main/scala/org/scalacheck/Test.scala
+1 −1 src/main/scala/org/scalacheck/commands/Commands.scala
+5 −46 src/main/scala/org/scalacheck/util/Buildable.scala
+1 −1 src/main/scala/org/scalacheck/util/CmdLineParser.scala
+1 −1 src/main/scala/org/scalacheck/util/ConsoleReporter.scala
+5 −3 src/main/scala/org/scalacheck/util/FreqMap.scala
+36 −8 src/main/scala/org/scalacheck/util/Pretty.scala
+1 −1 src/test/scala/org/scalacheck/PropSpecification.scala
+1 −1 src/test/scala/org/scalacheck/ShrinkSpecification.scala
+6 −4 src/test/scala/org/scalacheck/util/BuildableSpecification.scala
+44 −5 src/test/scala/org/scalacheck/util/Pretty.scala
+4 −4 tools/codegen.scala
2 changes: 1 addition & 1 deletion community-build/community-projects/scalap
Submodule scalap updated 6825 files
2 changes: 1 addition & 1 deletion community-build/community-projects/scopt
Submodule scopt updated 40 files
+13 −0 .scalafmt.conf
+6 −13 CONTRIBUTING.md
+210 −167 README.md
+52 −42 build.sbt
+9 −4 js/src/main/scala/PlatformReadInstances.scala
+2 −0 js/src/test/scala/scopt/SpecUtilPlatform.scala
+22 −12 jvm/src/main/scala/PlatformReadInstances.scala
+89 −41 jvm/src/test/scala/scopt/ImmutableParserSpecJVM.scala
+117 −0 jvm/src/test/scala/scopt/MonadicParserSpecJVM.scala
+2 −0 jvm/src/test/scala/scopt/SpecUtilPlatform.scala
+25 −0 jvm_js/src/test/scala/scopttest/UriSpec.scala
+0 −166 migration.md
+8 −5 native/src/main/scala/PlatformReadInstances.scala
+5 −0 native/src/test/scala/scopt/SpecUtilPlatform.scala
+0 −69 nativeTest/src/main/scala/scopt/Test.scala
+2 −25 project/Dependencies.scala
+0 −42 project/SonatypePlugin.scala
+1 −1 project/build.properties
+9 −7 project/plugins.sbt
+25 −0 publish.sbt
+14 −0 shared/src/main/scala-2.12/scopt/Seq.scala
+191 −0 shared/src/main/scala/scopt/OParser.scala
+41 −0 shared/src/main/scala/scopt/OParserSetup.scala
+378 −0 shared/src/main/scala/scopt/ORunner.scala
+297 −0 shared/src/main/scala/scopt/OptionDef.scala
+200 −0 shared/src/main/scala/scopt/OptionParser.scala
+125 −0 shared/src/main/scala/scopt/Read.scala
+7 −0 shared/src/main/scala/scopt/RenderingMode.scala
+22 −0 shared/src/main/scala/scopt/Validation.scala
+12 −0 shared/src/main/scala/scopt/Zero.scala
+0 −795 shared/src/main/scala/scopt/options.scala
+0 −755 shared/src/test/scala/scopt/ImmutableParserSpec.scala
+0 −518 shared/src/test/scala/scopt/MutableParserSpec.scala
+0 −8 shared/src/test/scala/scopt/SpecUtil.scala
+248 −0 shared/src/test/scala/scopttest/DiffUtil.scala
+897 −0 shared/src/test/scala/scopttest/ImmutableParserSpec.scala
+537 −0 shared/src/test/scala/scopttest/MonadicParserSpec.scala
+568 −0 shared/src/test/scala/scopttest/MutableParserSpec.scala
+7 −0 shared/src/test/scala/scopttest/PowertAssertions.scala
+28 −0 shared/src/test/scala/scopttest/SpecUtil.scala
2 changes: 1 addition & 1 deletion community-build/community-projects/semanticdb
Submodule semanticdb updated 1 files
+1 −1 build.sbt
2 changes: 1 addition & 1 deletion community-build/community-projects/sourcecode
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.junit.experimental.categories.Category

@Category(Array(classOf[TestCategory]))
class CommunityBuildTest {
lazy val communitybuildDir: Path = Paths.get(sys.props("user.dir") + "/community-build/")
lazy val communitybuildDir: Path = Paths.get(sys.props("user.dir"))

lazy val compilerVersion: String = {
val file = communitybuildDir.resolve("dotty-bootstrapped.version")
Expand Down Expand Up @@ -153,15 +153,15 @@ class CommunityBuildTest {

@Test def fastparse = test(
project = "fastparse",
testCommand = "fastparseJVM/compile",
updateCommand = "fastparseJVM/update"
testCommand = "dotty-community-build/compile;dotty-community-build/test:compile",
updateCommand = "dotty-community-build/update"
)

// TODO: revert to sourcecodeJVM/test
@Test def sourcecode = test(
project = "sourcecode",
testCommand = "sourcecodeJVM/compile",
updateCommand = "sourcecodeJVM/update"
testCommand = "sourcecode/compile;sourcecode/test:compile",
updateCommand = "sourcecode/update"
)

@Test def stdLib213 = test(
Expand Down Expand Up @@ -194,8 +194,16 @@ class CommunityBuildTest {
// We set `useEffpiPlugin := false` because we don't want to run their
// compiler plugin since it relies on external binaries (from the model
// checker mcrl2), however we do compile the compiler plugin.
testCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:compile; plugin/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
updateCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:update; plugin/test:update; benchmarks/test:update; examples/test:update; pluginBenchmarks/test:update"

// We have to drop the plugin and some akka tests for now, the plugin depends on github.com/bmc/scalasti which
// has not been updated since 2018, so no 2.13 compat. Some akka tests are dropped due to MutableBehaviour being
// dropped in the 2.13 compatible release

// testCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:compile; plugin/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
// updateCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:update; plugin/test:update; benchmarks/test:update; examples/test:update; pluginBenchmarks/test:update"

testCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:compile; benchmarks/test:compile; examples/test:compile; pluginBenchmarks/test:compile",
updateCommand = ";set ThisBuild / useEffpiPlugin := false; effpi/test:update; benchmarks/test:update; examples/test:update; pluginBenchmarks/test:update"
)

// TODO @oderky? It got broken by #5458
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
}
debuglog(s"Potentially conflicting names for forwarders: $conflictingNames")

for (m0 <- moduleClass.info.membersBasedOnFlags(ExcludedForwarderFlags, Flag_METHOD)) {
for (m0 <- moduleClass.info.sortedMembersBasedOnFlags(required = Flag_METHOD, excluded = ExcludedForwarderFlags)) {
val m = if (m0.isBridge) m0.nextOverriddenSymbol else m0
if (m == NoSymbol)
log(s"$m0 is a bridge method that overrides nothing, something went wrong in a previous phase.")
Expand Down
6 changes: 5 additions & 1 deletion compiler/src/dotty/tools/backend/jvm/BackendInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,11 @@ abstract class BackendInterface extends BackendInterfaceDefinitions {
def params: List[Symbol]
def resultType: Type
def memberInfo(s: Symbol): Type
def membersBasedOnFlags(excludedFlags: Flags, requiredFlags: Flags): List[Symbol]

/** The members of this type that have all of `required` flags but none of `excluded` flags set.
* The members are sorted by name and signature to guarantee a stable ordering.
*/
def sortedMembersBasedOnFlags(required: Flags, excluded: Flags): List[Symbol]
def members: List[Symbol]
def decls: List[Symbol]
def underlying: Type
Expand Down
15 changes: 0 additions & 15 deletions compiler/src/dotty/tools/backend/jvm/CoreBTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,6 @@ class CoreBTypes[BTFS <: BTypesFromSymbols[_ <: BackendInterface]](val bTypes: B
lazy val srFloatRef : ClassBType = classBTypeFromSymbol(requiredClass[scala.runtime.FloatRef])
lazy val srDoubleRef : ClassBType = classBTypeFromSymbol(requiredClass[scala.runtime.DoubleRef])

// scala.FunctionX and scala.runtim.AbstractFunctionX
lazy val FunctionReference : Vector[ClassBType] = (0 to MaxFunctionArity).map(i => classBTypeFromSymbol(FunctionClass(i)))(collection.breakOut)
lazy val AbstractFunctionReference : Vector[ClassBType] = (0 to MaxFunctionArity).map(i => classBTypeFromSymbol(AbstractFunctionClass(i)))(collection.breakOut)
lazy val AbstractFunctionArityMap : Map[ClassBType, Int] = AbstractFunctionReference.zipWithIndex.toMap

lazy val PartialFunctionReference : ClassBType = classBTypeFromSymbol(PartialFunctionClass)
lazy val AbstractPartialFunctionReference : ClassBType = classBTypeFromSymbol(AbstractPartialFunctionClass)

lazy val BoxesRunTime: ClassBType = classBTypeFromSymbol(requiredClass[scala.runtime.BoxesRunTime])

/**
Expand Down Expand Up @@ -263,13 +255,6 @@ final class CoreBTypesProxy[BTFS <: BTypesFromSymbols[_ <: BackendInterface]](va
def srFloatRef : ClassBType = _coreBTypes.srFloatRef
def srDoubleRef : ClassBType = _coreBTypes.srDoubleRef

def FunctionReference : Vector[ClassBType] = _coreBTypes.FunctionReference
def AbstractFunctionReference : Vector[ClassBType] = _coreBTypes.AbstractFunctionReference
def AbstractFunctionArityMap : Map[ClassBType, Int] = _coreBTypes.AbstractFunctionArityMap

def PartialFunctionReference : ClassBType = _coreBTypes.PartialFunctionReference
def AbstractPartialFunctionReference : ClassBType = _coreBTypes.AbstractPartialFunctionReference

def BoxesRunTime: ClassBType = _coreBTypes.BoxesRunTime

def asmBoxTo : Map[BType, MethodNameAndType] = _coreBTypes.asmBoxTo
Expand Down
14 changes: 12 additions & 2 deletions compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -878,8 +878,18 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma

def =:=(other: Type): Boolean = tp =:= other

def membersBasedOnFlags(excludedFlags: Flags, requiredFlags: Flags): List[Symbol] =
tp.membersBasedOnFlags(termFlagSet(requiredFlags), termFlagSet(excludedFlags)).map(_.symbol).toList
def sortedMembersBasedOnFlags(required: Flags, excluded: Flags): List[Symbol] = {
val requiredFlagSet = termFlagSet(required)
val excludedFlagSet = termFlagSet(excluded)
// The output of `memberNames` is a Set, sort it to guarantee a stable ordering.
val names = tp.memberNames(takeAllFilter).toSeq.sorted
val buffer = mutable.ListBuffer[Symbol]()
names.foreach { name =>
buffer ++= tp.memberBasedOnFlags(name, requiredFlagSet, excludedFlagSet)
.alternatives.sortBy(_.signature)(Signature.lexicographicOrdering).map(_.symbol)
}
buffer.toList
}

def resultType: Type = tp.resultType

Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/backend/jvm/GenBCode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,11 @@ class GenBCodePipeline(val entryPoints: List[Symbol], val int: DottyBackendInter
}
for ((label, i) <- initialLabels.iterator.zipWithIndex) {
mv.visitLabel(label)
emitLambdaDeserializeIndy(groups(i))
emitLambdaDeserializeIndy(groups(i).toIndexedSeq)
mv.visitInsn(ARETURN)
}
mv.visitLabel(terminalLabel)
emitLambdaDeserializeIndy(groups(numGroups - 1))
emitLambdaDeserializeIndy(groups(numGroups - 1).toIndexedSeq)
mv.visitInsn(ARETURN)
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ class JSCodeGen()(implicit ctx: Context) {
ctx.settings.outputDir.value

val pathParts = sym.fullName.toString.split("[./]")
val dir = (outputDirectory /: pathParts.init)(_.subdirectoryNamed(_))
val dir = pathParts.init.foldLeft(outputDirectory)(_.subdirectoryNamed(_))

var filename = pathParts.last
if (sym.is(ModuleClass))
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/Bench.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ object Bench extends Driver {
@sharable private[this] var numRuns = 1

private def ntimes(n: Int)(op: => Reporter): Reporter =
(emptyReporter /: (0 until n)) ((_, _) => op)
(0 until n).foldLeft(emptyReporter)((_, _) => op)

override def doCompile(compiler: Compiler, fileNames: List[String])(implicit ctx: Context): Reporter =
ntimes(numRuns) {
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/Driver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ class Driver {
val (classPaths, classNames) = fileNames0.flatMap { name =>
val path = Paths.get(name)
if (name.endsWith(".jar")) {
new dotty.tools.io.Jar(File(name)).iterator.collect {
new dotty.tools.io.Jar(File(name)).toList.collect {
case e if e.getName.endsWith(".tasty") =>
(name, e.getName.stripSuffix(".tasty").replace("/", "."))
}.toList
}
}
else if (!name.endsWith(".tasty"))
("", name) :: Nil
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/Run.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
ctx.initialize()(start) // re-initialize the base context with start
def addImport(ctx: Context, refFn: () => TermRef) =
ctx.fresh.setImportInfo(ImportInfo.rootImport(refFn)(ctx))
(start.setRun(this) /: defn.RootImportFns)(addImport)
defn.RootImportFns.foldLeft(start.setRun(this))(addImport)
}

private[this] var compiling = false
Expand Down
6 changes: 3 additions & 3 deletions compiler/src/dotty/tools/dotc/ast/CheckTrees.scala.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ object CheckTrees {
check(arg.tpe <:< formal)
}
val MethodType(paramNames, paramTypes) = fn.tpe.widen // checked already at construction
(args, paramNames, paramTypes).zipped foreach checkArg
args.lazyZip(paramNames).lazyZip(paramTypes) foreach checkArg
case TypeApply(fn, args) =>
val pt @ PolyType(_) = fn.tpe.widen // checked already at construction
(args, pt.instantiateBounds(args map (_.tpe))).zipped foreach checkTypeArg
args.lazyZip(pt.instantiateBounds(args map (_.tpe))) foreach checkTypeArg
case Literal(const: Constant) =>
case New(tpt) =>
check(tpt.isValueType)
Expand Down Expand Up @@ -184,7 +184,7 @@ object CheckTrees {
check(tpt.isValueType)
val tparams = tpt.tpe.typeParams
check(sameLength(tparams, args))
(args, tparams map (_.info.bounds)).zipped foreach checkTypeArg
args.lazyZip(tparams map (_.info.bounds)) foreach checkTypeArg
case TypeBoundsTree(lo, hi) =>
check(lo.isValueType); check(hi.isValueType)
check(lo.tpe <:< hi.tpe)
Expand Down
Loading