Repository: 7mind/izumi
Pull request #1114 (2020-06-17 04:04:14)

Update scalafmt-core to 2.6.0
Updates [org.scalameta:scalafmt-core](https://github.com/scalameta/scalafmt) from 2.5.3 to 2.6.0.
[GitHub Release Notes](https://github.com/scalameta/scalafmt/releases/tag/v2.6.0) - [Version Diff](https://github.com/scalameta/scalafmt/compare/v2.5.3...v2.6.0)

I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.

If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.

Configure Scala Steward for your repository with a [`.scala-steward.conf`](https://github.com/fthomas/scala-steward/blob/3dbe3134e6fde16d22285e8636339fbf5c521fb7/docs/repo-specific-configuration.md) file.

Have a fantastic day writing Scala!

<details>
<summary>Ignore future updates</summary>

Add this to your `.scala-steward.conf` file to ignore future updates of this dependency:
```
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]
```
</details>

labels: library-update, semver-minor


Patch:
diff --git a/.scalafmt.conf b/.scalafmt.conf
index d3f8b89bc..eaa8f3974 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version = "2.5.3"
+version = "2.6.0"
 edition = "2020-05"
 project.git = true
 
diff --git a/distage/distage-core-api/src/main/scala/izumi/distage/model/definition/Activation.scala b/distage/distage-core-api/src/main/scala/izumi/distage/model/definition/Activation.scala
index f02e09ad8..058b951be 100644
--- a/distage/distage-core-api/src/main/scala/izumi/distage/model/definition/Activation.scala
+++ b/distage/distage-core-api/src/main/scala/izumi/distage/model/definition/Activation.scala
@@ -4,9 +4,11 @@ import izumi.distage.model.definition.Axis.AxisValue
 
 final case class Activation(activeChoices: Map[Axis, AxisValue]) extends AnyVal {
   @inline def ++(activation: Activation): Activation = Activation(activeChoices ++ activation.activeChoices)
+  @inline def +(axisChoice: (Axis, AxisValue)): Activation = this ++ Activation(axisChoice._1 -> axisChoice._2)
 }
 
 object Activation {
   def apply(activeChoices: (Axis, AxisValue)*): Activation = Activation(Map(activeChoices: _*))
+  def apply(): Activation = empty
   val empty: Activation = new Activation(Map.empty)
 }
diff --git a/project/Versions.scala b/project/Versions.scala
index 06c9bc17d..544f4490a 100644
--- a/project/Versions.scala
+++ b/project/Versions.scala
@@ -36,5 +36,5 @@ object V {
 
   // good to drop - java
   val cglib_nodep = "3.3.0"
-  val docker_java = "3.2.2"
+  val docker_java = "3.2.3"
 }


Test patch:
diff --git a/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/TestConfig.scala b/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/TestConfig.scala
index edf632707..9cef03d50 100644
--- a/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/TestConfig.scala
+++ b/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/TestConfig.scala
@@ -5,6 +5,7 @@ import distage.{Activation, BootstrapModule, DIKey, Module, StandardAxis}
 import izumi.distage.framework.config.PlanningOptions
 import izumi.distage.plugins.PluginConfig
 import izumi.distage.testkit.TestConfig.ParallelLevel
+import izumi.distage.testkit.services.dstest.BootstrapFactory
 import izumi.logstage.api.Log
 
 /**
@@ -69,6 +70,8 @@ import izumi.logstage.api.Log
   *
   * @param configOverrides       Overriding definitions on top of main loaded config, default `None`
   *
+  * @param bootstrapFactory      [[BootstrapFactory]], controls config loading & initial modules
+
   * @param planningOptions       [[PlanningOptions]], debug options for [[distage.Planner]]
   *
   * @param logLevel              Log level for the [[logstage.IzLogger]] used in testkit and provided to the tests (will be overriden by plugin / module bindings if exist)
@@ -93,6 +96,7 @@ final case class TestConfig(
   // other options
   configBaseName: String,
   configOverrides: Option[AppConfig] = None,
+  bootstrapFactory: BootstrapFactory = BootstrapFactory.Impl,
   planningOptions: PlanningOptions = PlanningOptions(),
   logLevel: Log.Level = Log.Level.Info,
   debugOutput: Boolean = false,
diff --git a/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestEnv.scala b/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestEnv.scala
index 51cc6ea0e..37d263381 100644
--- a/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestEnv.scala
+++ b/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestEnv.scala
@@ -39,7 +39,6 @@ trait DistageTestEnv {
     val appModule = mergeStrategy.merge(appPlugins) overridenBy testConfig.moduleOverrides
     val bootstrapModule = mergeStrategy.merge(bsPlugins) overridenBy testConfig.bootstrapOverrides
     val availableActivations = ActivationInfoExtractor.findAvailableChoices(appModule)
-    val activation = testConfig.activation
 
     val bsModule = bootstrapModule overridenBy new BootstrapModuleDef {
         make[PlanMergingPolicy].from[PruningPlanMergingPolicyLoggedImpl]
@@ -51,11 +50,11 @@ trait DistageTestEnv {
       appModule = appModule,
       roles = roles,
       activationInfo = availableActivations,
-      activation = activation,
+      activation = testConfig.activation,
       memoizationRoots = testConfig.memoizationRoots.toSet,
       forcedRoots = testConfig.forcedRoots.toSet,
       parallelEnvs = testConfig.parallelEnvs,
-      bootstrapFactory = BootstrapFactory.Impl,
+      bootstrapFactory = testConfig.bootstrapFactory,
       configBaseName = testConfig.configBaseName,
       configOverrides = testConfig.configOverrides,
       planningOptions = testConfig.planningOptions,
diff --git a/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestRunner.scala b/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestRunner.scala
index 5059b03f4..1db9937df 100644
--- a/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestRunner.scala
+++ b/distage/distage-testkit-core/src/main/scala/izumi/distage/testkit/services/dstest/DistageTestRunner.scala
@@ -447,12 +447,12 @@ class DistageTestRunner[F[_]: TagK](
             .bootstrapFactory
             .makeConfigLoader(env.configBaseName, envLogger)
             .map {
-              c =>
+              appConfig =>
                 env.configOverrides match {
                   case Some(overrides) =>
-                    AppConfig(overrides.config.withFallback(c.config).resolve())
+                    AppConfig(overrides.config.withFallback(appConfig.config).resolve())
                   case None =>
-                    c
+                    appConfig
                 }
             }
           configLoader.loadConfig()