Ref #2634
updateSbtClassifiers uses an artificially created dependency graph set
in classifiersModule. The problem is that ivyScala instance is reused
from the outer scope that has the user project's scalaVersion as
demonstrated as follows:
scala> val is = (ivyScala in updateSbtClassifiers).eval
is: Option[sbt.IvyScala] =
Some(IvyScala(2.9.3,2.9.3,List(),true,false,true,org.scala-lang))
This change fixes#2686 by redefining ivyScala with scalaVersion and
scalaBinaryVersion scoped to updateSbtClassifiers task. The existing
scripted test was modified to reproduce the bug.
LogManager implementation is modified to use ManagedLogger, which can swap out backing Appenders without re-creating the log instance.
The State was also changed to track `currentCommand: Option[Exec]`. `Exec` knows the origin of the command invocation, and using that we can now send the network-originated events only to the network clients.
Combined together, this implements log splitting between the sbt clients (channels).
Fixes#2546. Ref #958
scripted compiler-project/error-in-invalidated has been failing
frequently on Travis CI. It seems like incremental compiler is not
catching the change in source occasionally for `changes/A2.scala`.
Forward-port of #2565
This adds support to generate synthetic subprojects from an auto plugin.
In addition, a method called `projectOrigin` is added to distinguish
Organic, BuildExtra, ProjectExtra, and GenericRoot.
Forward-port of #2717 and #2738
Fixes#2734, Ref #1041e93c4450a1 added a feature called early
command, which uses `--` as a prefix to denote some commands that runs
ahead of session loading. While the feature might be useful especially
for logging, `--` is too useful just for this purpose.
The old operators `<<=`, `<+=`, and `<++=` are now replaced with
Restligeist macros that will always fail during compile-time but can
display migration guide as the error message.
This would provide better upgrade experience than simply removing the
methods and displaying `<<= is not a member of sbt.TaskKey`.
* Remove .value from input tasks. Ref #2709
Calling `.value` method on an input task returns `InputTask[A]`, which
is completely unintuitive and often results to a bug.
In most cases `.evaluated` should be called, which returns `A` by
evaluating the task. Just in case `InputTask[A]` is needed,
`toInputTask` method is now provided.
* Fixed test
* Rename toInputTask to inputTaskValue
There seems to be an issue with the discovery of auto plugins in an
inner nested class. The error you would get is:
[info] java.lang.ClassNotFoundException: sbttest.Imports.A$
[info] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[info] at java.security.AccessController.doPrivileged(Native Method)
[info] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[info] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[info] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[info] at java.lang.Class.forName0(Native Method)
[info] at java.lang.Class.forName(Class.java:249)
[info] at
sbt.internal.inc.ModuleUtilities$.getObject(ModuleUtilities.scala:16)
[info] at
sbt.internal.inc.ModuleUtilities$.getCheckedObject(ModuleUtilities.scala
:22)
[info] at
sbt.internal.inc.ModuleUtilities$$anonfun$getCheckedObjects$1.apply(Modu
leUtilities.scala:25)
[info] at
sbt.internal.inc.ModuleUtilities$$anonfun$getCheckedObjects$1.apply(Modu
leUtilities.scala:25)
[info] at scala.collection.immutable.Stream.map(Stream.scala:418)
[info] at
sbt.internal.inc.ModuleUtilities$.getCheckedObjects(ModuleUtilities.scal
a:25)
[info] at sbt.PluginDiscovery$.loadModules(PluginDiscovery.scala:138)
[info] at
sbt.PluginDiscovery$.binarySourceModules(PluginDiscovery.scala:132)
[info] at sbt.PluginDiscovery$.discover$1(PluginDiscovery.scala:36)
[info] at sbt.PluginDiscovery$.discoverAll(PluginDiscovery.scala:45)
[info] at sbt.internal.Load$.loadPlugins(Load.scala:856)