{"name":"Scala","tagline":"Documentation on the development of the Scala compiler and standard library.","body":"# More information\r\n - [The official Scala website](http://www.scala-lang.org)\r\n - [Scala documentation](http://docs.scala-lang.org)\r\n - [Report a bug or request a feature](https://issues.scala-lang.org)\r\n - [Scala Jenkins dashboard](https://scala-webapps.epfl.ch/jenkins/)\r\n - Scala mailing lists:\r\n - [Users of Scala](https://groups.google.com/group/scala-user)\r\n - [Scala language discussion](https://groups.google.com/group/scala-language)\r\n - [Compiler and standard library development](https://groups.google.com/group/scala-internals)\r\n - [Scala Improvement Process](https://groups.google.com/group/scala-sips)\r\n - [Debate](https://groups.google.com/group/scala-debate)\r\n - [Announcements](https://groups.google.com/group/scala-announce)\r\n\r\n\r\n# Building\r\nRun `ant build-opt` to build an optimized version of the compiler.\r\nVerify your build using `ant test-opt`.\r\n\r\nThe Scala build system is based on Apache Ant. Most required pre-compiled\r\nlibraries are part of the repository (in 'lib/'). The following however is\r\nassumed to be installed on the build machine:\r\n\r\n## Requirements\r\n - A Java runtime environment (JRE) or SDK 1.6 or above.\r\n - Apache Ant version 1.8.0 or above.\r\n - bash (via cygwin for windows)\r\n - curl\r\n\r\n# Contributing\r\nWe ask all contributors [sign the Scala Contributor License Agreement](http://typesafe.com/contribute/cla/scala),\r\nwhich allows us to ensure that all code submitted to the project is unencumbered by copyrights or patents.\r\n\r\nPlease follow the guidelines outlined in our (Pull Request Policy)[https://github.com/scala/scala/wiki/Pull-Request-Policy].\r\n\r\n## Repository structure\r\n\r\n```\r\nscala/\r\n+--build.xml The main Ant build script, see also under src/build.\r\n+--lib/ Pre-compiled libraries for the build.\r\n+--pull-binary-libs.sh Pulls binary artifacts from remote repository.\r\n+--src/ All the source files of Scala.\r\n+--test/ The Scala test suite.\r\n+--build/ [Generated] Build products output directory for ant.\r\n+--dist/ [Generated] The destination folder for Scala distributions.\r\n```\r\n\r\n## Tips and tricks\r\nHere are some common commands. Most ant targets offer a `-opt` variant that runs under `-optimise`.\r\n\r\n - `./pull-binary-libs.sh` downloads all binary artifacts associated with this commit.\r\n This requires internet access to http://typesafe.artifactoryonline.com/typesafe.\r\n\r\n - `ant -p` prints out information about the commonly used ant targets. The interested\r\n developer can find the rest in the XML files.\r\n\r\n - `ant` or `ant build`: A quick compilation (to quick) of your changes using the locker compiler.\r\n - This will rebuild all quick if locker changed.\r\n - This will also rebuild locker if starr changed.\r\n\r\n - `ln -s build/quick/bin qbin` (once):\r\n - `ant && qbin/scalac -d sandbox sandbox/test.scala && qbin/scala -cp sandbox Test`\r\n Incrementally builds quick, and then uses it to compile and run the file\r\n `sandbox/test.scala`. This is a typical debug cycle.\r\n\r\n - `ant test` tests that your code is working and fit to be committed.\r\n - Runs the test suite and bootstrapping test on quick.\r\n - You can run the suite only (skipping strap) with 'ant test.suite'.\r\n\r\n - `ant docs` generates the HTML documentation for the library from the sources using the\r\n scaladoc tool in quick. Note: on most machines this requires more heap than\r\n is allocate by default. You can adjust the parameters with ANT_OPTS.\r\n Example command line::\r\n `ANT_OPTS = \"-Xms512M -Xmx2048M -Xss1M -XX:MaxPermSize=128M\" ant docs`\r\n\r\n - `ant dist` builds a distribution in 'dists/latest'.\r\n\r\n - `ant all.clean` Removes all build files and all distributions.\r\n\r\n\r\n# Bootstrapping (soon to be legacy)\r\n\r\nIn order to guarantee the bootstrapping of the Scala compiler, SABBUS builds\r\nScala in layers. Each layer is a complete compiled Scala compiler and library.\r\nA superior layer is always compiled by the layer just below it. Here is a short\r\ndescription of the four layers that SABBUS uses, from bottom to top:\r\n\r\n - `starr`: the stable reference Scala release which is shared by all the\r\n developers. It is found in the repository as 'lib/scala-compiler.jar' and\r\n 'lib/scala-library.jar'. Any committable source code must be compiled directly\r\n by starr to guarantee the bootstrapping of the compiler.\r\n\r\n - `locker`: the local reference which is compiled by starr and is the work\r\n compiler in a typical development cycle. When it has been built once, it is\r\n “frozen” in this state. Updating it to fit the current source code must be\r\n explicitly requested (see below).\r\n\r\n - `quick`: the layer which is incrementally built when testing changes in the\r\n compiler or library. This is considered an actual new version when locker is\r\n up-to-date in relation to the source code.\r\n\r\n - `strap`: a test layer used to check stability of the build.\r\n\r\nSABBUS compiles, for each layer, the Scala library first and the compiler next.\r\nThat means that any changes in the library can immediately be used in the\r\ncompiler without an intermediate build. On the other hand, if building the\r\nlibrary requires changes in the compiler, a new locker must be built if\r\nbootstrapping is still possible, or a new starr if it is not.\r\n\r\nUse `ant replacelocker` to \"unfreeze\" locker by updating it to match the current source code.\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}