Grading environment with specific Scala version in path.
This image extends grade-java.
The base layer has Scala 3.4 and Java 11 installed.
Images are tagged with Scala and grading-base versions in the format <scala>-<grading-base>.
Version tag can also include uN meaning update N where N is an increasing number.
The update part is used to indicate updates to the image, where software versions did not change.
For an example, 3.1-4.2u1 includes Scala 3.1 on top of grading-base 4.2 and has one update after the first release.
There are additional versions of the image:
python-*includes Python3
This image provides following convenience utilities.
-
scala-compile [-M] [-m ok_message] [files/dirs..]Passes
files/dirstomove-to-package-dirsand then executesscalacwith all matched files. Iffiles/dirsis empty (no argument), then all*.scalafiles in the working tree are moved and compiled.You can control classpath via
CLASSPATHenvironment variable. You can define options forscalacusingSCALACFLAGSenvironment variable. Default options are-encoding utf-8 -deprecation -feature -language:postfixOps.If compilation is successfull, then
ok_messageis printed. By default, it isok, but it can be suppressed with-M. -
scalatest [-r runner] [files..]Executes scala using
runneras the class andfilesas arguments. Defaultrunnerisorg.scalatest.tools.Runner. For this runner, script passes arguments-R . -eWand for single argument-s argument. To search from module, use-- -m module. -
run-all-scalatests [-C] [-p points_per_test_class]Command to do it all. Can replace
run.shin trivial cases.First, script compiles all
*.scalafiles from the current tree and /exercise, unless-Cis provided. If compilation fails, then no tests are run. Second, script finds all files matching*Test*.scalapattern from the current tree. Then, it runs all files that contain stringorg.scalatest.usingtestcaseandscalatest. Testcase will givepoints_per_test_classmany points per successful execution of scalatest.