summaryrefslogtreecommitdiff
path: root/build.xml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-231-1/+1
|\ | | | | | | merge/2.11.x-to-2.12.x-20152307
| * SI-8744 fix version.number in scaladoc.propertiesSeth Tisue2015-07-131-1/+1
| | | | | | | | the fix is as suggested by Adriaan in the ticket
* | Remove our fork of forkjoin. Java 8 bundles it.Adriaan Moors2015-07-151-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide deprecated compatibility stubs for the types and static members, which forward as follows: ``` scala.concurrent.forkjoin.ForkJoinPool => java.util.concurrent.ForkJoinPool scala.concurrent.forkjoin.ForkJoinTask => java.util.concurrent.ForkJoinTask scala.concurrent.forkjoin.ForkJoinWorkerThread => java.util.concurrent.ForkJoinWorkerThread scala.concurrent.forkjoin.LinkedTransferQueue => java.util.concurrent.LinkedTransferQueue scala.concurrent.forkjoin.RecursiveAction => java.util.concurrent.RecursiveAction scala.concurrent.forkjoin.RecursiveTask => java.util.concurrent.RecursiveTask scala.concurrent.forkjoin.ThreadLocalRandom => java.util.concurrent.ThreadLocalRandom ``` To prepare for Java 9, the Scala library does not itself use `sun.misc.Unsafe`. However, for now, it provide a convenience accessor for it via `scala.concurrent.util.Unsafe`. This (deprecated) class will be removed as soon as the eco-system drops its use (akka-actor, I'm looking at you).
* | Enable the new optimizer when building scalaLukas Rytz2015-07-031-4/+4
| | | | | | | | | | | | | | No change in build.sbt, there's no optimizer settings there yet. Ignore the inliner warning in presentation/t7678 and run/t8029.scala, noted in https://issues.scala-lang.org/browse/SI-9378
* | Include sources for scala-java8-compat instead of jarLukas Rytz2015-07-011-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e1895d64f87dc3c699a3ccbc8a3143b18d3b5bb1, titled "Add scala-java8-compat to scala-library.jar". Move SAM functions and `LambdaDeserializer` (from scala/scala-java8-compat@9253ed9) into `scala.runtime.java8` package under `src/library`. (The package name is the only diff -- they were in `scala.compat.java8` before). The original LambdaDeserializer: https://github.com/scala/scala-java8-compat/blob/c0732e6/src/main/java/scala/compat/java8/runtime/LambdaDeserializer.scala
* | Prepare build for inclusion of java8-compatLukas Rytz2015-07-011-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <h1>Allow mixed builds in ant</h1> The `JFunction` classes depend on the `FunctionN` traits, so the Java compiler needs the Scala library on the classpath. At the same time, while compiling the Scala library, the symbols for `JFunction` classes need to be available to emit indy-lambda closures. Therefore we pass the `JFunctions` as Java sources while compiling the Scala library. <h1>Upgrade versions of osgi tools</h1> Set the required java version in bnd files (JavaSE-1.8). Introduce `scala-swing.version.osgi` as a quick hack to allow manually deriving an osgi-friendly version number for the `scala-swing.version.number`. The latter is used to resolve the artifact, the osgi version is just so we can generate a bundle that osgi will accept. Bnd 1.50 doesn't work with Java 8 classfiles, so upgrade to 2.4.1. Also upgrade all other tools to make tests pass. For `org.eclipse.osgi` we moved to the group ID `org.eclipse.tycho`, where there's a newer version available. The osgi tests would fail with the most recent version available in the `org.eclipse.osgi` groupID. The new version of bnd only copies *classfiles* from the original into the resulting jar, while the old version also copied all other files. This caused osgi test failure with a `NoClassDefFound`, which was really due to a `NumberFormatException` in `ScalaVersion`, as it couldn't find the properties file to parse the version in... Include resources from source jar into osgi bundle as follows: ``` Include-Resource: @@SOURCE_JARNAME@ ``` This makes bnd copy all resources from the source jar. I ran the following on the osgi artifacts of this branch, and on 2.11.x: ``` for f in `find build/osgi -name '*.jar' -a -not -name '*src.jar'`; do unzip -l $f | grep -v '\.class' ; done ``` Comparing the two file lists, things look OK: https://gist.github.com/lrytz/be08db051a53eded192d
* | Merge branch '2.11.x' into merge/2.11.x-to-2.12.x-20150624Jason Zaugg2015-06-241-3/+39
|\|
| * SI-9339 Support classpaths with no single compatible jlineAdriaan Moors2015-06-181-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, the repl will use whatever jline 2 jar on the classpath, if there is one. Failing that, there's a fallback and an override. If instantiating the standard `jline.InteractiveReader` fails, we fall back to an embedded, shaded, version of jline, provided by `jline_embedded.InteractiveReader`. (Assume `import scala.tools.nsc.interpreter._` for this message.) The instantiation of `InteractiveReader` eagerly exercises jline, so that a linkage error will result if jline is missing or if the provided one is not binary compatible. The property `scala.repl.reader` overrides this behavior, if set to the FQN of a class that looks like `YourInteractiveReader` below. ``` class YourInteractiveReader(completer: () => Completion) extends InteractiveReader ``` The repl logs which classes it tried to instantiate under `-Ydebug`. # Changes to source & build The core of the repl (`src/repl`) no longer depends on jline. The jline interface is now in `src/repl-jline`. The embedded jline + our interface to it are generated by the `quick.repl` target. The build now also enforces that only `src/repl-jline` depends on jline. The sources in `src/repl` are now sure to be independent of it, though they do use reflection to instantiate a suitable subclass of `InteractiveReader`, as explained above. The `quick.repl` target builds the sources in `src/repl` and `src/repl-jline`, producing a jar for the `repl-jline` classes, which is then transformed using jarjar to obtain a shaded copy of the `scala.tools.nsc.interpreter.jline` package. Jarjar is used to combine the `jline` jar and the `repl-jline` into a new jar, rewriting package names as follows: - `org.fusesource` -> `scala.tools.fusesource_embedded` - `jline` -> `scala.tools.jline_embedded` - `scala.tools.nsc.interpreter.jline` -> `scala.tools.nsc.interpreter.jline_embedded` Classes not reachable from `scala.tools.**` are pruned, as well as empty dirs. The classes in the `repl-jline` jar as well as those in the rewritten one are copied to the repl's output directory. PS: The sbt build is not updated, sorry. PPS: A more recent fork of jarjar: https://github.com/shevek/jarjar.
| * Update to scala-java8-compat 0.5.0Jason Zaugg2015-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | This contains LambdaDeserializer, which we refer to in our synthetic `$deserializeLambda$` method under -target:jvm-1.8. Note: this library is only reference in the Ant build under a non-standard build flag that includes that library into scala-library.jar. This is only for our internal use in running partest for indylambda. The SBT build doesn't have the same option at the moment.
| * Merge pull request #4497 from retronym/topic/indylambda-diy-boxingJason Zaugg2015-05-161-1/+1
| |\ | | | | | | [indylambda] Relieve LambdaMetafactory of boxing duties [ci: last-only]
| | * Update to scala-java8-compat 0.4.0Jason Zaugg2015-05-111-1/+1
| | |
* | | Require and target Java 8Jason Zaugg2015-05-261-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Require Java 8 in ant build - use -source 1.8 and -target 1.8 for javac - Default scalac's -target to `jvm-1.8`, ignore and deprecate attempts to use `jvm-1.{6.7}` - Remove fragile javap-app test. The feature itself is slated for removal. - Remove obsolete Java6 checkfile - Adapt DCE tests - Remove deprecated/redundant -target:jvm-1.6 from flags where the intent was to trigger generation of stack map frames. - Remove tests with -target:jvm-1.5 that tested without stack map frames - Ignore OpenJDK JVM warnings (via test/[files|scaladoc]/filters).
* | | Compile & run partest-extras using quick libraryAdriaan Moors2015-05-181-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Suppress (transitive) dependency on external scala-library (through scala-partest). This caused trouble when binary compatibility was not preserved for scala-library, as in #4297. We already were doing this for `partest.compilation.path.noncore`, but we seem to have missed `quick.partest-extras.build.path`.
* | | Merge commit '297eeb3' into merge-2.11-may-12Lukas Rytz2015-05-121-11/+13
|\| |
| * | Merge pull request #4499 from lrytz/removeAsmLukas Rytz2015-05-121-11/+13
| |\ \ | | |/ | |/| Move ASM out of the repository [ci: last-only]
| | * Include ASM as a dependency in ANT buildLukas Rytz2015-05-111-11/+13
| | | | | | | | | | | | The classfiles are still integrated into scala-compiler.jar.
| * | [backport] remove references to private-repo.typesafe.comLukas Rytz2015-05-061-2/+2
| |/ | | | | | | Backport of 9cd3e6505aa4285750e63263e2551ab71f36ff8d
* | Merge commit '1b7e660' into merge-2.11-may-12Lukas Rytz2015-05-121-0/+38
|\|
| * Merge pull request #4463 from retronym/topic/indylambda-emit-indyLukas Rytz2015-05-041-0/+38
| |\ | | | | | | Use LambdaMetafactory where possible for lambda creation.
| | * Add scala-java8-compat to scala-library.jarJason Zaugg2015-04-211-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the ant build is run with `-Dscala-java8-compat.package`, the contents of `org.scala-lang.modules:scala-java8-compat` are spliced into `scala-library.jar`. This is handy to facilitate downstream testing of indy lambdas, we can just use the the compiler options `-target 1.8 -Ydelambdafy:method -Xexperimental` without needed to add `scala-java8-compat.jar` to the compile and runtime classpaths. (Classpath augmentation doesn't appear to be straight forward in partest or in the community build.)
* | | Merge pull request #4480 from retronym/merge/2.11.x-to-2.12.x-20150501Lukas Rytz2015-05-011-4/+4
|\ \ \ | | | | | | | | Merge 2.11.x to 2.12.x [ci: last-only]
| * | | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-05-011-4/+4
| |\| | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150501
| | * | Align how ant builds asm & forkjoinGrzegorz Kossakowski2015-04-171-4/+4
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were two inconsistencies in building asm & forkjoin: 1. Asm classes lived in `build/asm`, while forkjoin's were in `build/libs/classes/forkjoin`. 2. Though no jars are needed for these projects, forkjoin was packaged, but asm was not. No reason for these inconsistencies could be found in the history.
* | | Remove akka-actor from scala-library-allLukas Rytz2015-04-301-2/+0
| | | | | | | | | | | | The 2.12 distribution will no longer ship an akka-actors jar.
* | | remove references to private-repo.typesafe.comLukas Rytz2015-04-301-2/+2
|/ /
* | Remove scala.actors and the actors migration module dependencyLukas Rytz2015-04-231-46/+7
| |
* | Remove the continuations plugin module dependencyLukas Rytz2015-04-231-32/+3
| |
* | Merge commit '32f520f' into merge/2.11-to-2.12-apr-1Lukas Rytz2015-04-011-0/+1
|\|
| * SI-9038 fix scaladoc syntax highlightning to leave unicode aloneAntoine Gourlay2015-03-261-0/+1
| | | | | | | | | | | | | | | | Syntax highlightning in code blocks used to manipulate the raw bytes of a String, converting them to chars when needed, which breaks Unicode surrogate pairs. Using a char array instead of a byte array will leave them alone.
* | Merge commit 'fcc20fe' into merge/2.11-to-2.12-apr-1Lukas Rytz2015-04-011-10/+11
|\|
| * Reuse the same compiler instance for all tests in a JUnit classLukas Rytz2015-03-111-0/+9
| | | | | | | | | | | | | | | | | | | | Note that JUnit creates a new instance of the test class for running each test method. So the compiler instance is added to the companion. However, the JVM would quickly run out of memory when running multiple tests, as the compilers cannot be GCd. So we make it a `var`, and set it to null when a class is done. For that we use JUnit's `@AfterClass` which is required to be on a static method. Therefore we add a Java class with such a static method that we can extend from Scala.
| * Correct dependency for test.junit.compAdriaan Moors2015-02-181-10/+2
| | | | | | | | | | | | It needs a packed build. Skip the optimization of only compiling junit tests when those source change, since we should also rebuild when e.g., library source changes
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-01-291-3/+4
|\| | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150129 Conflicts: build.number src/library/scala/concurrent/Future.scala versions.properties
| * SI-8642 Enable OSGi tests under Java 8Jason Zaugg2015-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the PAX Exam framework to integration test that the OSGi metadata we add to our JARs allows them to be loaded into the Felix and Equinox containers. However, we had to disable this test under Java 8 due to an incompatibility between that framework and the modern Java version. I have found a combination that works in Java 6, 7, and 8, so the test is now run under all Java versions. I have left a `skip` property to disable them, following the established convention. Tip of the hat to: - @soc / @rkrzewski for the work in #4066 that paved the way for this small change - Harald Wellman, for sharing [1] the Java 8 compatible combination of PAX and Felix . Testing: ``` for V in 1.6 1.7 1.8; do java_use $V; ant -q test.osgi; done java version "1.6.0_65" Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716) Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 31 seconds java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 22 seconds java version "1.8.0_25" Java(TM) SE Runtime Environment (build 1.8.0_25-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode) ... [echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi [echo] Test pass 1 of 2 using Apache Felix 4.4.0 [echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1 BUILD SUCCESSFUL Total time: 16 seconds ``` [1] https://groups.google.com/d/msg/ops4j/TN0sZFf6wLs/vUP0GML6-TQJ
| * Add an IntelliJ module for the Pax Exam based OSGi testsJason Zaugg2015-01-281-2/+3
| | | | | | | | We can now edit these in IntelliJ, as per the regular JUnit tests.
* | Merge commit '7ba38a0' into merge/2.11.x-to-2.12.x-20150129Jason Zaugg2015-01-291-14/+45
|\| | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala src/library/scala/collection/Iterator.scala versions.properties
| * Merge pull request #4130 from mpociecha/let-specify-build-repos-homeGrzegorz Kossakowski2014-11-261-0/+2
| |\ | | | | | | Let users specify a different location for build repos than user home
| | * Let users specify a different location for build repos than user homempociecha2014-11-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change is helpful e.g. when setting up CI for Scala and it's important which directories are used by a build. By default it uses .m2, .pax and .sbt/cache from user home (in general $HOME). Sometimes it's not possible to use this location and also changing a value of $HOME is not an option. The required location should be specified both for ant's build.xml and used scripts. In the first case specifying -Duser.home is all, what we need. But we can't just set _JAVA_OPTIONS as then partest tests fail due to the unexpected output (an additional 'Picked up java options (...)' messages). We can set ANT_OPTS instead of this. The only problem was that OSGi JUnit tests (only they) were using $HOME anyway. I forced them to use -Duser.home by propagating this option in build.xml. binary-repo-lib.sh is changed to use a special env variable or $HOME, when this variable is not set. Then we can do: export SCALA_BUILD_REPOS_HOME=<some_dir> export ANT_OPTS="$ANT_OPTS -Duser.home=$SCALA_BUILD_REPOS_HOME" ant dist and it will create all directories .m2, .pax and .sbt/cache in a specified $SCALA_BUILD_REPOS_HOME directory. Note: maven's settings.xml should be located in this used $SCALA_BUILD_REPOS_HOME/.m2 and point to the repository like <some_dir>/.m2/repository
| * | SI-8977 remove duplicate decoder.properties from scalapAntoine Gourlay2014-11-111-2/+1
| |/ | | | | | | | | All .properties files in sources folder are already included in the packed jar (see line 1028), so there is no need to add it again.
| * SI-8927 Update OSGi stuff to get rid of bndlib warningRafał Krzewski2014-10-231-12/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The way the desired OSGi frameworks are chosen has changed between Pax Exam versions: On earlier versions, specifying it in code was fine, but PAX Exam 4.x runs the tests on the first OSGi framework it finds on classpath. An exclusion for the transitive dependency org.osgi.core was added, because it seems that artifact has broken dependecies (which would have brought us back to square one). Good thing is that it isn't needed here, because the OSGi framework JARs contain all necessary classes.
* | Merge commit 'eb15950' into merge/2.11.x-to-2.12.x-20150129Jason Zaugg2015-01-291-1/+1
|\|
| * Better ant / junit interactionAntoine Gourlay2014-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently junit test sources are always rebuilt, that's wasteful. The second dependency on the junit task is there so that the first can be skipped if sources haven't changed. Also normalize package names versus location in the `test/junit` folder: ant isn't very clever when it comes to selectively recompiling tests, so now editing a test will only cause that one to be recompiled (instead of ~13 files every time). This makes TDD with junit even faster.
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2014-09-171-5/+11
|\| | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20140917 Conflicts: build.xml The merge conflict was centred around the introduction of the build property `test.bc.skip`, and was straight forward to resolve.
| * Merge pull request #3972 from lrytz/BCodeDelambdafyFixJason Zaugg2014-09-161-2/+7
| |\ | | | | | | isAnonymousClass/Function for delambdafy classes is not true
| | * isAnonymousClass/Function for delambdafy classes is not trueLukas Rytz2014-09-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ydelambdafy:method lambda classes are not anonymous classes, and not anonymous function classes either. They are somethig new, so there's a new predicate isDelambdafyFunction. They are not anonymous classes (or functions) because anonymous classes in Java speak are nested. Delambdafy classes are always top-level, they are just synthetic. Before this patch, isAnonymous was sometimes accidentailly true: if the lambda is nested in an anonymous class. Now it's always false.
| * | JUnit tests for dead code elimination.Lukas Rytz2014-09-101-0/+1
| |/ | | | | | | JUnit tests may use tools from partest-extras (ASMConverters)
* | Merge commit '47908f1' into ↵Lukas Rytz2014-09-021-1/+7
|\| | | | | | | | | | | | | merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer Conflicts: src/library/scala/util/matching/Regex.scala
| * Add support for running a specific Junit test/method.Antoine Gourlay2014-08-251-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unless I really missed something, there is currently no way to run a specific Junit test (class or method). Running the whole thing is going to get worse and worse since Junit is supposed to be the preferred way, so here it goes: // will run all methods in a test file ant test.junit -Dtest.class=scala.WhateverTest // will run a specific method (just an alias for the one below) ant test.junit -Dtest.class=scala.WhateverTest -Dtest.method=mymethod // will run several methods (comma separated) ant test.junit -Dtest.class=scala.WhateverTest -Dtest.methods="foo,bar" `test.method(s)` without `test.class` is just ignored (all tests are run).
| * Also update jline.version when update.versions is set during buildLukas Rytz2014-07-221-0/+2
| |
* | Merge commit '01f2d27' into ↵Lukas Rytz2014-09-021-2/+0
|\| | | | | | | merge/2.11-to-2.12-is-it-really-sept-2-already-where-was-summer