summaryrefslogtreecommitdiff
path: root/test/files/run/t7747-repl.scala
Commit message (Collapse)AuthorAgeFilesLines
* Determistically enter classes from directory into package scopeJason Zaugg2016-08-191-3/+1
| | | | | | | | | | | | | | | | | | | | On Linux, the directory listing is not automatically sorted on Mac. This leads to non-determistic ids of Symbols of the classes in a directory, which in turn leads to instability of the ordering of parents within inferred refinement types. Notable, with this patch, we will stably infer: ``` scala> case class C(); case class D(); List(C(), D()).head defined class C defined class D res0: Product with Serializable = C() ``` rather than sometimes getting `Serializable with Product` on Linux. As such, I've removed the workarounds for this instability in two test cases.
* Switch the bootstrap build over to sbtStefan Zeiger2016-07-151-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | All of the individual ant builds that occured during `bootstrap` are replaced by equivalent sbt builds. - Allow extra dashes in version suffix when using SPLIT - Clean up ScriptCommands - Building an extra `locker` for stability testing with ant was not necessary but sbt also drops `strap`, so we need to build again with `quick` to get the equivalent of `strap`. The script for checking stability is invoked directly from the bootstrap script, not from sbt. - `STARR` and `locker` build output is still logged to `logs/builds`, the main build runs log directly to the main console with colored output. - Allow `—show-log` option on partest command line in sbt - Normalize inferred LUB in `run/t7747-repl.scala` - Add `normalize` feature from `ReplTest` to `InteractiveTest` - Normalize inferred LUBs in `presentation/callcc-interpreter`
* Fully qualify types in REPL generated codeDale Wijnand2016-05-261-5/+1
|
* Fix some tests, move others to pending/Lukas Rytz2015-07-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move run/t8960 to pending It tests the serialVersionUID field on closure classes. The field doesn't exist for indyLambda closures. See https://issues.scala-lang.org/browse/SI-9373 Move some reify tests to pending They fail at runtime in GenBCode since scala is built with indyLambda enabled: java.lang.AssertionError: assertion failed: Bad superClass for trait JFunction1: class Any at scala.tools.nsc.Global.assert(Global.scala:261) at scala.tools.nsc.backend.jvm.BTypesFromSymbols.setClassInfo(BTypesFromSymbols.scala:228) Noted in https://issues.scala-lang.org/browse/SI-9374 force t6546 to GenASM - no closure elimination in GenBCode yet Noted in https://issues.scala-lang.org/browse/SI-9364. Fix or disable some tests that fail because of the old optimizer The old inliner fails more often when the library is built with indylambda. Noted in https://issues.scala-lang.org/browse/SI-9374. Example: List.foreach ➜ sandbox git:(jfun) ✗ qs -Ybackend:GenASM -optimize -Yinline-warnings Welcome to Scala version 2.12.0-20150630-220939-1cb032d806 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45). Type in expressions to have them evaluated. Type :help for more information. scala> List(1,2,3).foreach(x => x + 1) <console>:11: warning: Could not inline required method foreach because bytecode unavailable. List(1,2,3).foreach(x => x + 1) ^ <console>:11: warning: At the end of the day, could not inline @inline-marked method foreach List(1,2,3).foreach(x => x + 1) ^ Upate a number of tests for having indyLambda enabled The delambdafyLambdaClassNames tests was removed, there's nothing to tests with indyLambda.
* SI-7747 More tests and logic according to our conclusions on #4522.Prashant Sharma2015-06-101-0/+4
|
* SI-7747 Make REPL wrappers serialization friendlyPrashant Sharma2015-05-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Spark has been shipping a forked version of our REPL for sometime. We have been trying to fold the patches back into the mainline so they can defork. This is the last outstanding issue. Consider this REPL session: ``` scala> val x = StdIn.readInt scala> class A(a: Int) scala> serializedAndExecuteRemotely { () => new A(x) } ``` As shown by the enclosed test, the REPL, even with the Spark friendly option `-Yrepl-class-based`, will re-initialize `x` on the remote system. This test simulates this by running a REPL session, and then deserializing the resulting closure into a fresh classloader based on the class files generated by that session. Before this patch, it printed "evaluating x" twice. This is based on the Spark change described: https://github.com/mesos/spark/pull/535#discussion_r3541925 A followup commit will avoid the `val lineN$read = ` part if we import classes or type aliases only. [Original commit from Prashant Sharma, test case from Jason Zaugg]
* SI-7747 Support class based wrappers as alternative through switch ↵Prashant Sharma2013-11-101-0/+69
-Yrepl-class-based Refactoring to reduce the number of if-else Fix test.