Skip to content
This repository has been archived by the owner on Sep 1, 2020. It is now read-only.
Miles Sabin edited this page Sep 10, 2016 · 3 revisions

Update — the information on this wiki page is very out of date, please see the instructions for working with the new SBT build here: https://github.com/scala/scala#build-setup

  • Use test/partest --grep PATTERN to only run tests matching PATTERN. (Or: tools/partest-ack PATTERN)
  • Use files/pos and files/neg to ensure code compiles or not, respectively.
  • Add foo.scala and foo.check to files/run to ensure that the test produces the right output.
  • Use test/partest --show-diff --show-log --failed to run only failed tests. (Or: tools/partest-ack -f)
  • ...test/partest --update-check to update checkfiles with changed output. (Or: tools/partest-ack -u)
  • ...and look at the other options to partest-ack.
  • Get the jvm and run tests to pass first, they take the most time.
  • Ensure you run build/quick/bin/scala -nc so that you don't use fsc, since that will have stale stuff.
  • If you get "tried to access field $x from class $y" then you have a stale compilation, either clean and rebuild or just touch $y's source.
  • If you get test failures in the presentation compiler tests relating to diffed output, which appears visually identical, you probably have a problem with your system encoding. Try regenerating your locale.
  • The build script requires a lot of memory to run the tests. Try doubling the values on line 199 of build.xml.
  • Do an ant replacelocker if you make changes which should affect the Scala library.
  • "scalac -Dscala.color -Ytyper-debug -Ystop-after:typer" is the right alias on some days.
  • Do ant -Dlocker.skip=1 build to skip the boostrapping step. This will use Scala 2.11.0 as locker, and use that to build quick/pack (/ht @retronym)