* 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
Clean up first analysis to make sure that test utilities using
information from analysis have correct information that does not collide
with the compilation analysis of the previous runs (batch tests).
Those tests using `checkIterations` were not working because an
invariant was working: the first iterations number is 0. As we reuse
sbt for running several tests, this is no longer true, so this commit
makes sure that they are updated with the pertinent infrastructure to
compute the performed iterations from the latest known number of
iterations.
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.
This test was always failing but was marked as passed by the previous
scripted framework because the test files were only checking the failure
of tests.
The test case depends on bintray, which could never have been resolved
for sbt 1.0.0-SNAPSHOT. This resolution error was the one "hidden".
This change is necessary in the cases where we have global
initialization issues that have no position, like:
```
[info] [error] scala.reflect.internal.MissingRequirementError: object scala in compiler mirror not found.
```
Before, it was failing with a `sys.error` exception. Now we will report
these issues with a console reporter that is not meant to be
thread-safe.
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.
Introduces by Mark in d928047678.
Dropped because Project#copy no longer exists (publically) in sbt 1.
It looks like it might have been added to deal with transitive
dependencies of scala-compiler, possibly JLine. Now it looks like it's
only used by launcher-interface, which has 0 dependencies.
For some reason using ClasspathDependency doesn't work in sbt 1, while
ClasspathDep[ProjectReference] does. The latter is less specific and
works just as well.
This test shows how sbt is recomputing the settings completely (even if
they have side effect) every time a `Project.extract` and settings
manipulations are performed.
This is worrying because it's:
* Inefficient.
* Surprising.
* Incorrect -- settings may produce side effects.
Unless I'm mistaken, this proves that the computation of settings is not
performed once.
The `cachedUpdate` implementation does not need to be in `Defaults`
since it's not using any of the tasks/settings defined there, that's
`updateTask`'s job.
This commit moves the utilities required by `updateTask` to the
`sbt.internal.librarymanagement` namespace.
This commit does some changes to the implementation with the purpose of
making this code more readable. I find that this rewrite was necessary
as I was implementing the dependency lock file.
This commit has two goals:
* Simplify the `load` API endpoints, removing the unused ones to shorten
the surface of the API.
* Add documentation to the main `load` methods.
Sbt has a feature to show timed logs for every operation at startup.
However, its output is cluttered and users cannot read how much time
single methods consume nor if they call other methods.
This commit improves the status quo by adding indentation.
This commit reduces the complexity around `loadPluginDefinition` et al.
`pluginDefinitionLoader` is not used anywhere in sbt, so the extra
definitions are removed.
Both the implementation of `loadPluginDefinition` and
`pluginDefinitionLoader` are reduced to a bare minimum where the
components at hand (definition classpath, dependency classpath) are
properly defined.
Documentation to the three methods has been added.
It mainly does three things:
* Clean up the implementation, removing unused values like
`globalPluginDefs`.
* Make the implementation more readable.
* And the big one: Remove the creation of a classloader that we were
instantiating but whose value we were throwing away. This has an impact
in performance, but I'm yet to benchmark how much it is.