You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>We ask all contributors <ahref="http://typesafe.com/contribute/cla/scala">sign the Scala Contributor License Agreement</a>,
72
+
which allows us to ensure that all code submitted to the project is unencumbered by copyrights or patents.</p>
73
+
74
+
<p>Please follow the guidelines outlined in our (Pull Request Policy)[<ahref="https://github.com/scala/scala/wiki/Pull-Request-Policy">https://github.com/scala/scala/wiki/Pull-Request-Policy</a>].</p>
Incrementally builds quick, and then uses it to compile and run the file
110
+
<code>sandbox/test.scala</code>. This is a typical debug cycle.</p></li>
111
+
<li>
112
+
<p><code>ant test</code> tests that your code is working and fit to be committed.</p>
113
+
114
+
<ul>
115
+
<li>Runs the test suite and bootstrapping test on quick.</li>
116
+
<li>You can run the suite only (skipping strap) with 'ant test.suite'.</li>
117
+
</ul>
118
+
</li>
119
+
<li><p><code>ant docs</code> generates the HTML documentation for the library from the sources using the
120
+
scaladoc tool in quick. Note: on most machines this requires more heap than
121
+
is allocate by default. You can adjust the parameters with ANT_OPTS.
122
+
Example command line::
123
+
<code>ANT_OPTS = "-Xms512M -Xmx2048M -Xss1M -XX:MaxPermSize=128M" ant docs</code></p></li>
124
+
<li><p><code>ant dist</code> builds a distribution in 'dists/latest'.</p></li>
125
+
<li><p><code>ant all.clean</code> Removes all build files and all distributions.</p></li>
126
+
</ul><h1>
127
+
<aname="bootstrapping-soon-to-be-legacy" class="anchor" href="#bootstrapping-soon-to-be-legacy"><spanclass="octicon octicon-link"></span></a>Bootstrapping (soon to be legacy)</h1>
128
+
129
+
<p>In order to guarantee the bootstrapping of the Scala compiler, SABBUS builds
130
+
Scala in layers. Each layer is a complete compiled Scala compiler and library.
131
+
A superior layer is always compiled by the layer just below it. Here is a short
132
+
description of the four layers that SABBUS uses, from bottom to top:</p>
133
+
134
+
<ul>
135
+
<li><p><code>starr</code>: the stable reference Scala release which is shared by all the
136
+
developers. It is found in the repository as 'lib/scala-compiler.jar' and
137
+
'lib/scala-library.jar'. Any committable source code must be compiled directly
138
+
by starr to guarantee the bootstrapping of the compiler.</p></li>
139
+
<li><p><code>locker</code>: the local reference which is compiled by starr and is the work
140
+
compiler in a typical development cycle. When it has been built once, it is
141
+
“frozen” in this state. Updating it to fit the current source code must be
142
+
explicitly requested (see below).</p></li>
143
+
<li><p><code>quick</code>: the layer which is incrementally built when testing changes in the
144
+
compiler or library. This is considered an actual new version when locker is
145
+
up-to-date in relation to the source code.</p></li>
146
+
<li><p><code>strap</code>: a test layer used to check stability of the build.</p></li>
147
+
</ul><p>SABBUS compiles, for each layer, the Scala library first and the compiler next.
148
+
That means that any changes in the library can immediately be used in the
149
+
compiler without an intermediate build. On the other hand, if building the
150
+
library requires changes in the compiler, a new locker must be built if
151
+
bootstrapping is still possible, or a new starr if it is not.</p>
152
+
153
+
<p>Use <code>ant replacelocker</code> to "unfreeze" locker by updating it to match the current source code.</p>
154
+
</section>
155
+
<footer>
156
+
<p>This project is maintained by <ahref="https://github.com/scala">scala</a></p>
157
+
<p><small>Hosted on GitHub Pages — Theme by <ahref="https://github.com/orderedlist">orderedlist</a></small></p>
{"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."}
0 commit comments