summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4481 from lrytz/2.12.xv2.12.0-M1Lukas Rytz2015-05-012-15/+42
|\ | | | | Fixes to the release script, remove existing artifacts before building.
| * Remove existing builds from private-repo before building a release.Lukas Rytz2015-05-011-0/+25
| |
| * Revert back to Scalacheck 1.11.x, fixes to bootstrap scriptAdriaan Moors2015-05-012-15/+17
| | | | | | | | | | | | | | | | | | Scalacheck 1.12.x cross-compiles to JS and will take more work to integrate. Make sure we never attempt to publish scalacheck to sonatype. Force checkout module refs in case of dirty workspace.
* | Merge pull request #4480 from retronym/merge/2.11.x-to-2.12.x-20150501Lukas Rytz2015-05-01127-575/+2561
|\ \ | |/ |/| Merge 2.11.x to 2.12.x [ci: last-only]
| * Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-05-01127-575/+2561
| |\ | | | | | | | | | merge/2.11.x-to-2.12.x-20150501
| | * Merge pull request #4471 from smarter/spec/remove-NotNullAdriaan Moors2015-04-282-6/+1
| | |\ | | | | | | | | spec: Remove obsolete rules related to scala.NotNull
| | | * spec: Remove obsolete rules related to scala.NotNullGuillaume Martres2015-04-282-6/+1
| | |/ | | | | | | | | | | | | These rules were removed in #2244 and scala.NotNull itself was deprecated.
| | * Merge pull request #4404 from soc/topic/specAdriaan Moors2015-04-2741-465/+1618
| | |\ | | | | | | | | Spec improvements
| | | * Spec improvementsSimon Ochsenreither2015-04-2541-465/+1618
| | | |
| | * | Merge pull request #4465 from retronym/ticket/9279Lukas Rytz2015-04-271-5/+5
| | |\ \ | | | |/ | | |/| SI-9279 Improve performance of bash runner script
| | | * SI-9279 Improve performance of bash runner scriptJason Zaugg2015-04-231-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In fbe897d16, the template for bash scripts (scala/scalac/etc) was modified to fix processing of `-J`, `-bootcp`. This involved looping through the argument array and filtering out options like `-bootcp` that only influence the script, and shouldn't be passed to the JVM. However, the mechanism to do this uses an inefficient, erm, "CanBuildFrom", and under the load of even a few hundred source files takes half a second before the JVM starts. Throw 2000 files at it, and you have to wait ten seconds! This commit uses a more efficient array append operator. This requires Bash 3 or above. Hopefully it is safe to presume this version these days, it's been around for a decade. Results: ``` % time ~/scala/2.11.6/bin/scalac -J-NOJVM abcdedfghijklmnopqrtsuvwxyv{1..2000} 2>&1 Unrecognized option: -NOJVM Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. real 0m7.765s user 0m7.734s sys 0m0.028s % time ./build/quick/bin/scalac -J-NOJVM abcdedfghijklmnopqrtsuvwxyv{1..2000} 2>&1 Unrecognized option: -NOJVM Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. real 0m0.144s user 0m0.124s sys 0m0.022s ``` Thanks to Stephan Schmidt for pointing out the performance gulf.
| | * | Merge pull request #4415 from Ichoran/issue/9254Adriaan Moors2015-04-222-5/+32
| | |\ \ | | | | | | | | | | SI-9254 UnrolledBuffer appends in wrong position
| | | * | SI-9254 UnrolledBuffer appends in wrong positionRex Kerr2015-03-312-5/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed two bugs in insertion (insertAll of Unrolled): 1. Incorrect recursion leading to an inability to insert past the first chunk 2. Incorect repositioning of `lastptr` leading to strange `append` behavior after early insertion Added tests checking that both of these things now work. Also added a comment that "waterlineDelim" is misnamed. But we can't fix it now--it's part of the public API. (Shouldn't be, but it is.)
| | * | | Merge pull request #4416 from Ichoran/issue/9197Adriaan Moors2015-04-222-1/+28
| | |\ \ \ | | | | | | | | | | | | SI-9197 Duration.Inf not a singleton when deserialized
| | | * | | SI-9197 Duration.Inf not a singleton when deserializedRex Kerr2015-03-312-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made `Duration.Undefined`, `.Inf`, and `.MinusInf` all give back the singleton instance instead of creating a new copy by overriding readResolve. This override can be (and is) private, which at least on Sun's JDK8 doesn't mess with the auto-generated SerialVersionUIDs. Thus, the patch should make things strictly better: if you're on 2.11.7+ on JVMs which pick the same SerialVersionUIDs, you can recover singletons. Everywhere else you were already in trouble anyway.
| | * | | | Merge pull request #4462 from som-snytt/issue/badtabAdriaan Moors2015-04-222-5/+30
| | |\ \ \ \ | | | | | | | | | | | | | | SI-9275 Fix row-first display in REPL
| | | * | | | SI-9275 Fix row-first display in REPLSom Snytt2015-04-212-5/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A missing range check in case anyone ever wants to use ``` -Dscala.repl.format=across ``` which was observed only because of competition from Ammonite.
| | * | | | | Merge pull request #4461 from adriaanm/rebase-4446Adriaan Moors2015-04-2255-69/+69
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Fix many typos
| | | * | | | | Fix many typosMichał Pociecha2015-04-2155-69/+69
| | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit corrects many typos found in scaladocs and comments. There's also fixed the name of a private method in ICodeCheckers.
| | * | | | | Merge pull request #4452 from lrytz/valueClassSelfTypeBCodeAdriaan Moors2015-04-222-2/+56
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Don't crash GenBCode for value classes with a self declaration
| | | * | | | | Don't crash GenBCode for value classes with a self declarationLukas Rytz2015-04-162-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a value class has a self declaration class V(x: Long) extends AnyVal { self => /* ... */ } `vClassSymbol.typeOfThis.typeSymbol` is `class Long` in the backend. The InlineInfo for traits contains a field for the self type of the trait. This is required for re-writing calls to final trait methods to the static implementation method: the self type appears in the impl method signature. By mistake, the backend was recording the self type of all classes, not only of traits. In the case of a value class with a self declaration, this broke the assumption that the self type is always a class type (not a primitive type). The simple fix: only record the self type for traits.
| | * | | | | | Merge pull request #4455 from adriaanm/sbt-buildAdriaan Moors2015-04-2210-5/+521
| | |\ \ \ \ \ \ | | | |_|_|_|_|/ | | |/| | | | | Experimental sbt build [ci: last-only]
| | | * | | | | Remove stdout/stderr output from Junit testsJason Zaugg2015-04-211-1/+0
| | | | | | | |
| | | * | | | | Avoid unwanted boostrap JARs in the subproject classpathsJason Zaugg2015-04-211-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I added build configuration to ask SBT to forcible override the Scala version in the subproject to the declared bootstrap version. I did this in response to a warning by SBT the declared `scalaVersion` has been evicted. However, we actually *want* the newer version. To get rid of the warning, we need to exclude all `"org.scala-lang" % "*"` when depending on Scala modules. This cleanly breaks the cycle. Here's a diff of `*/dependencyClasspath` as a result of this patch: https://gist.github.com/retronym/217c76001b1b81798042
| | | * | | | | Avoid wildcard ignorance of files named 'target'.Jason Zaugg2015-04-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In favour of explicitly ignoring the ones we know contain SBT build output. Rationale: we used to have a package named target. Admittedly we thought better of that (55109d0d253) so it is now called `meta`, but let's not get lazy and encode a poor practice into our gitignore.
| | | * | | | | 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.
| | | * | | | | Script that diffs `build/` and `build-sbt/`Grzegorz Kossakowski2015-04-172-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To ensure the sbt build matches the ant build, diff their output. The scripts just delegates to `diff` command that compares directories recursively. We've added some handy ignore patterns (e.g. for .complete files). Ignore locker and deps dirs when comparing build and build-sbt, these directories are needed by Ant build only. Ignore irrelevant jars in build/pack/lib generated by the Ant build.
| | | * | | | | `test/it:test` runs partest regression testsGrzegorz Kossakowski2015-04-171-2/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partest tests are defined in Integration configuration. This means you need to run them with `test/it:test` command. We put them in separate configuration because they are slow to run so user needs to ask explicitly for partest to run. Introduce a common way of setting jar location so it can be reused between `scalaSubprojectSettings` and `partestJavaAgent`.
| | | * | | | | `test` task runs Junit testsJason Zaugg2015-04-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add dependency on scaladoc in junit subproject, as required by 6e6632e (it introduced a junit test for scaladoc). Enable assertion stack traces and info logging of each test.
| | | * | | | | Tweak formatting of build.sbtJason Zaugg2015-04-171-45/+44
| | | | | | | |
| | | * | | | | Projects for partest-extras and junitJason Zaugg2015-04-171-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Explicitly set [un]managed[re]sourceDirectories for all projects to improve the import into IntelliJ - Add partest extras project, that contains scala/scala specific extensions to partest for use in partest and junit tests. - Add junit project, which contains unit tests for the compiler and library.
| | | * | | | | Rework library dependenciesGrzegorz Kossakowski2015-04-171-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Common library dependencies are extracted into vals. Those dependencies define "scala-library" as an excluded transitive dependency so we don't get eviction warnings during `update`. Lastly, version numbers for dependencies are obtained from `versions.properties` file.
| | | * | | | | Always fork in run.Grzegorz Kossakowski2015-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we don't need to worry about mixing classes for Scala compiler that sbt is invoking and the one we just built. For an example of possible problem, check out: https://github.com/gkossakowski/scala/pull/2#issuecomment-78169188
| | | * | | | | Generate shell scripts.Grzegorz Kossakowski2015-04-173-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shell scripts are generated with `mkBin` sbt task that calls ScalaTool. ScalaTool is defined in project/ and is a port of Ant task that lives in scala.tools.ant.ScalaTool. While porting, we've simplified the code significantly. The `mkBin` task is defined in a new subproject: dist. This subproject will become responsible for building the distribution in the future.
| | | * | | | | Included required resources in jarsGrzegorz Kossakowski2015-04-171-3/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static resources are stored along source files in our current layout. Therefore we set resourceDirectory to be sourceDirectory but make sure that includeFilter includes nothing by default. Subprojects like library or compiler set their own include filters. The include filters have been ported from the Ant build definition. Generate properties for: library, reflect, compiler & actors.
| | | * | | | | Add "scala-" prefix to the name of a subproject.Grzegorz Kossakowski2015-04-171-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scala artifacts (like library or compiler) are published are published with "scala-" prefix in their name. We keep project ids short so we can refer to projects simply by e.g. `library` and not `scala-library`. Given that `name` settings will have a different value, we switch to `Project.id` when constructing paths for target directories. We had to tweak properties generation because over there we use project name as a file name without "scala-" prefix. Since our projects are not named uniformly (e.g., "repl" and not "scala-repl"), add a setting for each subproject that requires special handling.
| | | * | | | | Document sbt build as experimental.Grzegorz Kossakowski2015-04-172-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add welcome message that is shown at sbt's startup. The message clearly indicates experimental status of sbt build. Also, add a short paragraph to README.md explaining status of sbt build.
| | | * | | | | Root project shouldn't compile any sources.Grzegorz Kossakowski2015-04-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's override `sources` task to return empty collections of sources to compile. Otherwise, sbt by default would pick up sources in the root directory which is not what we want.
| | | * | | | | Exclude transitive scala-library dependencyJason Zaugg2015-04-171-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scaladoc depends on scala-xml, etc, built with the previous stable version of Scala. This isn't ideal, but we're stuck with this for now. We were relying on Ivy to evict the transitive dependency on the old version of scala-library. However, SBT treats evictions of scala-library as suspicious and emits a custom warning. This commit explicitly excludes the transitive dependency so as to avoid these warnings. It also makes the output of `show update` a little easier to read.
| | | * | | | | Avoid circular deps: override `scalaInstance`Grzegorz Kossakowski2015-04-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested in sbt/sbt#1872, specify ScalaInstance manually and use sbt's launcher as a context for Ivy resolution. This way we avoid the circular dependency problem described in the issue.
| | | * | | | | Compiler jar includes interactive, scaladoc & replGrzegorz Kossakowski2015-04-171-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mirror ant by disabling docs and publishing tasks in these subprojects. Class files are included by merging `mappings`: the `package` task uses it to determine which class files should end up in a jar file.
| | | * | | | | ScaladocGrzegorz Kossakowski2015-04-171-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put library class files to scaladoc's classpath when documenting the library. TODO: why is this needed? Bug in scaladoc? Pass `src/library-aux` to scaladoc using `-doc-no-compile` option. To mimic ant, output docs into `buildDirectory/scaladoc/$name`.
| | | * | | | | Asm and fork/join: no docs, publishing,...Grzegorz Kossakowski2015-04-171-10/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As they are forks of external Java projects, don't document/publish them. TODO: move them out of the repo As in ant, pass -g, -source and -target options to javac to get byte-identical outputs for Java files between Ant and sbt builds.
| | | * | | | | Split `commonSettings` into smaller chunks.Grzegorz Kossakowski2015-04-171-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move most of `commonSettings` to `subprojectSettings` and keep `commonSettings` truly minimal.
| | | * | | | | Introduce `buildDirectory` setting.Grzegorz Kossakowski2015-04-171-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This settings determines location of where class files, jars, and other build products will go. By default, it's `./build-sbt`. It makes it easier to compare what Ant and sbt builds do. Also, changed `SettingKey` to `settingKey`. The latter is a macro that automatically determines `label` of a setting and takes a description as argument. Before that, `SettingKey("my desc")` would create a setting key with `label` set to "my desc". Not what we wanted.
| | | * | | | | Change project's base to src/$nameGrzegorz Kossakowski2015-04-171-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, Project.base was set to ./$name and we tweaked manually the `baseDirectory` setting to point at `.`. This was confusing sbt and its plugins. We are setting Project.base to ./src/$name and leave `baseDirectory` intact (so it will point at `./src/$name`. Adapt settings that depend on `baseDirectory` accordingly. Refactor configuration as a subproject into a common method. Given that `baseDirectory` is pointing at `src/$name`, we don't have to worry about `sourcesInBase`.
| | | * | | | | Generate .properties files, pack in jars.dumpstate2015-04-171-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an sbt task that generates .properties files that are packaged into jars. The properties file contains Scala version in various formats. The task is registered as a resource generator so sbt can properly track generated files and make sure they are included in packaged jars. The implementation of generateVersionPropertiesFile contains a note on arbitrary order of written properties. We could consider using https://github.com/etiennestuder/java-ordered-properties to guarantee a stable order. Or simply ditch using Properties class and generate a String. Our property files are simple enough that nothing more fancy is needed.
| | | * | | | | Package jars into build/pack/lib directory.Grzegorz Kossakowski2015-04-171-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Override default location for jars to be build/pack/lib. This turned out to be a bit more involved than I expected. Check the diff for details. Strip down the -version suffix from jar names. For now we're trying to mimic Ant's build as closely as possible. Ant does not embed version numbers in jar names it creates in build/pack/lib directory.
| | | * | | | | Introduce sbt buildGrzegorz Kossakowski2015-04-173-0/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It mimics the ant build as closely as necessary to compare the produced artifacts between the two builds, to build confidence in the transition: - all projects are built into the same directories in build/quick - include legacy projects: forkjoin, asm, actors - TODO: Include forkjoin & asm into library & compiler jars, respectively. We don't carry over ant's built-in bootstrapping process; this will be scripted outside of the build, publishing layers locally. NOTE: the root project cannot be named `scala`: it shadows the `scala` package in e.g., `projectConsole`.
| | * | | | | | Merge pull request #4464 from gourlaysama/wip/scaladoc-deprecatedVlad Ureche2015-04-228-4/+140
| | |\ \ \ \ \ \ | | | |_|_|/ / / | | |/| | | | | SI-4476 add an index of deprecated members to scaladoc