* Remove MaxPermSize from another scripted opts
* Reduce memory of sbt host to 1g instead of 2g
* Add Xms java options to scripted
* Enable parallelism with 512M for sbt tests
* Parallelism + batch mode
For that, we:
* Change the existing infrastructure to recycle as much code as
possible.
* Use `BatchScriptRunner` since `ScriptRunner` is too restrictive to
programmatically control the underlying sbt servers.
* Unify `TestRunner` to the more general way for both batch and
non-batch modes.
This covers the case described in #1361 plus an esoteric case too.
Parsers are initialized when sbt starts and text completions use the
knowledge at that time. If we happen to move a new file that should
influence the behaviour of the tab completion, that file will not be
picked up. Before, since we were throwing an error, the previous case
that would no produce any tab completion would also fail, though the
files are legitimately in the correct place.
The following commit minimises the amount of exceptions that leak
through our internal signatures. It thus changes the return type
signature of `scriptedTest` to return an `Option` instead of `Unit`.
At the call-site of `scriptedTest`, we also remove the code to handle
the exceptions thrown by it.
Add binary-compatible methods to run scripted tests in parallel using
parallel collections. Parallel collections are not tuned and a default
of 4 cores is used for the `ForkJoinPool`. This can be a matter of
experimentation in the future but for now I prefer to stay with it.
The non-parallel methods are not affected by this change.
The changes to the scripted plugin have not been used, only the sbt
scripted plugin is using `runInParallel`. In the future, this change can
also happen so that plugin authors can benefit from parallel sbt
testing. This is not a priority for me now :)
We don't have to care about migrations in these removals because no one
should be depending on these methods directly. People consume scripted
via the sbt plugin.
This commit also removes the unused `CompatibilityLevel` which is
completely outdated, making reference to Scala 2.9 et al.
This was already supported in the internal Scripted used by sbt but not
in the ScriptedPlugin. This is fixed by just copy-pasting the modified
parser. We will have to wait for sbt itself to be built using an sbt
with the upgraded ScriptedPlugin to be able to avoid the code duplication.
To pass File => Unit callback across the classloader boundary
I am encoding it as a java.util.List[File] by overriding
method.
This was needed since Java didn't allow me to cast
from one classloader to the other.
The scripted newer command was effectively a noop, it always passed
because it returned false instead of throwing an exception when it
failed.
Implemented specs for most of the scripted file commands as well.