Repository: 7mind/izumi
Pull request #893 (2020-02-15 21:02:07)

Update docker-java to 3.2.0-rc4
Updates [com.github.docker-java:docker-java](https://github.com/docker-java/docker-java) from 3.2.0-rc3 to 3.2.0-rc4.
[GitHub Release Notes](https://github.com/docker-java/docker-java/releases/tag/3.2.0-rc4) - [Changelog](https://github.com/docker-java/docker-java/blob/master/CHANGELOG.md) - [Version Diff](https://github.com/docker-java/docker-java/compare/3.2.0-rc3...3.2.0-rc4)

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.

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 = "com.github.docker-java", artifactId = "docker-java" } ]
```
</details>

labels: library-update, semver-pre-release


Patch:
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 47fdd3c1d..01942e43f 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -51,29 +51,36 @@ jobs:
             - script: |
                 bash sbtgen.sc --js
                 bash .build.sh secrets site
-        - job: publish
-          displayName: 'Publish to Maven Central'
-          dependsOn:
-            - build_212
-            - build_213
-          steps:
-            - script: |
-                bash sbtgen.sc --js --native
-                bash .build.sh scala-all secrets publishScala
-
-#        - job: publish212
-#          displayName: 'Publish to Maven Central 2.12'
+#        - job: publish
+#          displayName: 'Publish to Maven Central'
 #          dependsOn:
 #            - build_212
-#          steps:
-#            - script: |
-#                bash sbtgen.sc --js --native
-#                bash .build.sh 2.12 secrets publishScala
-#        - job: publish213
-#          displayName: 'Publish to Maven Central 2.13'
-#          dependsOn:
 #            - build_213
 #          steps:
 #            - script: |
 #                bash sbtgen.sc --js --native
-#                bash .build.sh 2.13 secrets publishScala
+#                bash .build.sh scala-all secrets publishScala
+        - job: publish211
+          displayName: 'Publish to Maven Central (2.11)'
+          dependsOn:
+            - build_212
+          steps:
+            - script: |
+                bash sbtgen.sc --js --native
+                bash .build.sh 2.11 secrets publishScala
+        - job: publish212
+          displayName: 'Publish to Maven Central (2.12)'
+          dependsOn:
+            - build_212
+          steps:
+            - script: |
+                bash sbtgen.sc --js
+                bash .build.sh 2.12 secrets publishScala
+        - job: publish213
+          displayName: 'Publish to Maven Central (2.13)'
+          dependsOn:
+            - build_213
+          steps:
+            - script: |
+                bash sbtgen.sc --js
+                bash .build.sh 2.13 secrets publishScala
diff --git a/.build.sh b/.build.sh
index 941e51522..893c0a702 100644
--- a/.build.sh
+++ b/.build.sh
@@ -16,6 +16,12 @@ function scala212 {
   VERSION_COMMAND="++ $SCALA212 "
 }
 
+function scala211 {
+  echo "Using Scala 2.11..."
+  VERSION_COMMAND="++ $SCALA211 "
+}
+
+
 function scalaall {
   VERSION_COMMAND="+"
 }
@@ -36,7 +42,7 @@ function csbt {
 
 function coverage {
   csbt clean coverage "'${VERSION_COMMAND}test'" "'${VERSION_COMMAND}coverageReport'" || exit 1
-  bash <(curl -s https://codecov.io/bash)
+  bash <(curl -s https://codecov.io/bash) || true # codecov.io may be offline for some reason
 }
 
 # function scripted {
@@ -106,6 +112,7 @@ function init {
     export IVY_CACHE_FOLDER=${IVY_CACHE_FOLDER:-`~/.ivy2`}
 
     export IZUMI_VERSION=$(cat version.sbt | sed -r 's/.*\"(.*)\".**/\1/' | sed -E "s/SNAPSHOT/build."${CI_BUILD_NUMBER}"/")
+    export SCALA211=$(cat project/Deps.sc | grep 'val scala211 ' |  sed -r 's/.*\"(.*)\".**/\1/')
     export SCALA212=$(cat project/Deps.sc | grep 'val scala212 ' |  sed -r 's/.*\"(.*)\".**/\1/')
     export SCALA213=$(cat project/Deps.sc | grep 'val scala213 ' |  sed -r 's/.*\"(.*)\".**/\1/')
 
@@ -150,6 +157,10 @@ case $i in
         scala212
     ;;
 
+    2.11)
+        scala211
+    ;;
+
     scala-all)
         scalaall
     ;;
diff --git a/build.sbt b/build.sbt
index cda5a5e31..358ee789f 100644
--- a/build.sbt
+++ b/build.sbt
@@ -99,7 +99,8 @@ lazy val `fundamentals-collections` = crossProject(JVMPlatform, JSPlatform, Nati
     scalaVersion := crossScalaVersions.value.head,
     crossScalaVersions := Seq(
       "2.12.10",
-      "2.13.1"
+      "2.13.1",
+      "2.11.12"
     ),
     coverageEnabled := false,
     scalaJSModuleKind := ModuleKind.CommonJSModule
@@ -110,7 +111,8 @@ lazy val `fundamentals-collections` = crossProject(JVMPlatform, JSPlatform, Nati
       "2.11.12"
     ),
     coverageEnabled := false,
-    test := {}
+    test := {},
+    test in Test := {}
   )
 lazy val `fundamentals-collectionsJVM` = `fundamentals-collections`.jvm
   .disablePlugins(AssemblyPlugin)
@@ -224,7 +226,8 @@ lazy val `fundamentals-platform` = crossProject(JVMPlatform, JSPlatform, NativeP
     scalaVersion := crossScalaVersions.value.head,
     crossScalaVersions := Seq(
       "2.12.10",
-      "2.13.1"
+      "2.13.1",
+      "2.11.12"
     ),
     coverageEnabled := false,
     scalaJSModuleKind := ModuleKind.CommonJSModule,
@@ -238,7 +241,8 @@ lazy val `fundamentals-platform` = crossProject(JVMPlatform, JSPlatform, NativeP
       "2.11.12"
     ),
     coverageEnabled := false,
-    test := {}
+    test := {},
+    test in Test := {}
   )
 lazy val `fundamentals-platformJVM` = `fundamentals-platform`.jvm
   .disablePlugins(AssemblyPlugin)
@@ -340,7 +344,8 @@ lazy val `fundamentals-functional` = crossProject(JVMPlatform, JSPlatform, Nativ
     scalaVersion := crossScalaVersions.value.head,
     crossScalaVersions := Seq(
       "2.12.10",
-      "2.13.1"
+      "2.13.1",
+      "2.11.12"
     ),
     coverageEnabled := false,
     scalaJSModuleKind := ModuleKind.CommonJSModule
@@ -351,7 +356,8 @@ lazy val `fundamentals-functional` = crossProject(JVMPlatform, JSPlatform, Nativ
       "2.11.12"
     ),
     coverageEnabled := false,
-    test := {}
+    test := {},
+    test in Test := {}
   )
 lazy val `fundamentals-functionalJVM` = `fundamentals-functional`.jvm
   .disablePlugins(AssemblyPlugin)
@@ -463,7 +469,8 @@ lazy val `fundamentals-thirdparty-boopickle-shaded` = crossProject(JVMPlatform,
     scalaVersion := crossScalaVersions.value.head,
     crossScalaVersions := Seq(
       "2.12.10",
-      "2.13.1"
+      "2.13.1",
+      "2.11.12"
     ),
     coverageEnabled := false,
     scalaJSModuleKind := ModuleKind.CommonJSModule
@@ -474,7 +481,8 @@ lazy val `fundamentals-thirdparty-boopickle-shaded` = crossProject(JVMPlatform,
       "2.11.12"
     ),
     coverageEnabled := false,
-    test := {}
+    test := {},
+    test in Test := {}
   )
 lazy val `fundamentals-thirdparty-boopickle-shadedJVM` = `fundamentals-thirdparty-boopickle-shaded`.jvm
   .disablePlugins(AssemblyPlugin)
@@ -581,7 +589,8 @@ lazy val `fundamentals-reflection` = crossProject(JVMPlatform, JSPlatform, Nativ
     scalaVersion := crossScalaVersions.value.head,
     crossScalaVersions := Seq(
       "2.12.10",
-      "2.13.1"
+      "2.13.1",
+      "2.11.12"
     ),
     coverageEnabled := false,
     scalaJSModuleKind := ModuleKind.CommonJSModule
@@ -592,7 +601,8 @@ lazy val `fundamentals-reflection` = crossProject(JVMPlatform, JSPlatform, Nativ
       "2.11.12"
     ),
     coverageEnabled := false,
-    test := {}
+    test := {},
+    test in Test := {}
   )
 lazy val `fundamentals-reflectionJVM` = `fundamentals-reflection`.jvm
   .disablePlugins(AssemblyPlugin)
@@ -2433,6 +2443,11 @@ lazy val `logstage-sink-slf4j` = project.in(file("logstage/logstage-sink-slf4j")
 
 lazy val `microsite` = project.in(file("doc/microsite"))
   .dependsOn(
+    `fundamentals-collectionsJVM` % "test->compile;compile->compile",
+    `fundamentals-platformJVM` % "test->compile;compile->compile",
+    `fundamentals-functionalJVM` % "test->compile;compile->compile",
+    `fundamentals-thirdparty-boopickle-shadedJVM` % "test->compile;compile->compile",
+    `fundamentals-reflectionJVM` % "test->compile;compile->compile",
     `fundamentals-bioJVM` % "test->compile;compile->compile",
     `fundamentals-json-circeJVM` % "test->compile;compile->compile",
     `distage-core-apiJVM` % "test->compile;compile->compile",
@@ -2686,7 +2701,7 @@ lazy val `sbt-izumi-deps` = project.in(file("sbt-plugins/sbt-izumi-deps"))
   )
   .disablePlugins(ScoverageSbtPlugin, AssemblyPlugin)
 
-lazy val `fundamentals-cross` = (project in file(".agg/fundamentals-fundamentals-cross"))
+lazy val `fundamentals` = (project in file(".agg/fundamentals-fundamentals"))
   .settings(
     skip in publish := true,
     crossScalaVersions := Nil
@@ -2707,10 +2722,14 @@ lazy val `fundamentals-cross` = (project in file(".agg/fundamentals-fundamentals
     `fundamentals-thirdparty-boopickle-shadedNative`,
     `fundamentals-reflectionJVM`,
     `fundamentals-reflectionJS`,
-    `fundamentals-reflectionNative`
+    `fundamentals-reflectionNative`,
+    `fundamentals-bioJVM`,
+    `fundamentals-bioJS`,
+    `fundamentals-json-circeJVM`,
+    `fundamentals-json-circeJS`
   )
 
-lazy val `fundamentals-cross-jvm` = (project in file(".agg/fundamentals-fundamentals-cross-jvm"))
+lazy val `fundamentals-jvm` = (project in file(".agg/fundamentals-fundamentals-jvm"))
   .settings(
     skip in publish := true,
     crossScalaVersions := Nil
@@ -2721,10 +2740,12 @@ lazy val `fundamentals-cross-jvm` = (project in file(".agg/fundamentals-fundamen
     `fundamentals-platformJVM`,
     `fundamentals-functionalJVM`,
     `fundamentals-thirdparty-boopickle-shadedJVM`,
-    `fundamentals-reflectionJVM`
+    `fundamentals-reflectionJVM`,
+    `fundamentals-bioJVM`,
+    `fundamentals-json-circeJVM`
   )
 
-lazy val `fundamentals-cross-js` = (project in file(".agg/fundamentals-fundamentals-cross-js"))
+lazy val `fundamentals-js` = (project in file(".agg/fundamentals-fundamentals-js"))
   .settings(
     skip in publish := true,
     crossScalaVersions := Nil
@@ -2735,10 +2756,12 @@ lazy val `fundamentals-cross-js` = (project in file(".agg/fundamentals-fundament
     `fundamentals-platformJS`,
     `fundamentals-functionalJS`,
     `fundamentals-thirdparty-boopickle-shadedJS`,
-    `fundamentals-reflectionJS`
+    `fundamentals-reflectionJS`,
+    `fundamentals-bioJS`,
+    `fundamentals-json-circeJS`
   )
 
-lazy val `fundamentals-cross-native` = (project in file(".agg/fundamentals-fundamentals-cross-native"))
+lazy val `fundamentals-native` = (project in file(".agg/fundamentals-fundamentals-native"))
   .settings(
     skip in publish := true,
     crossScalaVersions := Nil
@@ -2751,53 +2774,6 @@ lazy val `fundamentals-cross-native` = (project in file(".agg/fundamentals-funda
     `fundamentals-reflectionNative`
   )
 
-lazy val `fundamentals` = (project in file(".agg/fundamentals-fundamentals"))
-  .settings(
-    skip in publish := true,
-    crossScalaVersions := Seq(
-      "2.12.10",
-      "2.13.1"
-    ),
-    scalaVersion := crossScalaVersions.value.head
-  )
-  .disablePlugins(AssemblyPlugin)
-  .aggregate(
-    `fundamentals-bioJVM`,
-    `fundamentals-bioJS`,
-    `fundamentals-json-circeJVM`,
-    `fundamentals-json-circeJS`
-  )
-
-lazy val `fundamentals-jvm` = (project in file(".agg/fundamentals-fundamentals-jvm"))
-  .settings(
-    skip in publish := true,
-    crossScalaVersions := Seq(
-      "2.12.10",
-      "2.13.1"
-    ),
-    scalaVersion := crossScalaVersions.value.head
-  )
-  .disablePlugins(AssemblyPlugin)
-  .aggregate(
-    `fundamentals-bioJVM`,
-    `fundamentals-json-circeJVM`
-  )
-
-lazy val `fundamentals-js` = (project in file(".agg/fundamentals-fundamentals-js"))
-  .settings(
-    skip in publish := true,
-    crossScalaVersions := Seq(
-      "2.12.10",
-      "2.13.1"
-    ),
-    scalaVersion := crossScalaVersions.value.head
-  )
-  .disablePlugins(AssemblyPlugin)
-  .aggregate(
-    `fundamentals-bioJS`,
-    `fundamentals-json-circeJS`
-  )
-
 lazy val `distage` = (project in file(".agg/distage-distage"))
   .settings(
     skip in publish := true,
@@ -3065,7 +3041,6 @@ lazy val `izumi-jvm` = (project in file(".agg/.agg-jvm"))
   )
   .disablePlugins(AssemblyPlugin)
   .aggregate(
-    `fundamentals-cross-jvm`,
     `fundamentals-jvm`,
     `distage-jvm`,
     `logstage-jvm`,
@@ -3083,7 +3058,6 @@ lazy val `izumi-js` = (project in file(".agg/.agg-js"))
   )
   .disablePlugins(AssemblyPlugin)
   .aggregate(
-    `fundamentals-cross-js`,
     `fundamentals-js`,
     `distage-js`,
     `logstage-js`,
@@ -3100,7 +3074,7 @@ lazy val `izumi-native` = (project in file(".agg/.agg-native"))
     scalaVersion := crossScalaVersions.value.head
   )
   .aggregate(
-    `fundamentals-cross-native`,
+    `fundamentals-native`,
     `distage-native`,
     `logstage-native`,
     `sbt-plugins-native`
@@ -3160,7 +3134,6 @@ lazy val `izumi` = (project in file("."))
   )
   .disablePlugins(AssemblyPlugin)
   .aggregate(
-    `fundamentals-cross`,
     `fundamentals`,
     `distage`,
     `logstage`,
diff --git a/doc/md/build.md b/doc/md/build.md
index deed237a3..2eb4bb93e 100644
--- a/doc/md/build.md
+++ b/doc/md/build.md
@@ -9,31 +9,17 @@ On mac:
 ```bash
 brew tap caskroom/versions
 brew update
-brew install homebrew/cask/java sbt npm go
-npm i -g typescript
+brew install homebrew/cask/java sbt
 ```
 
-Build options
--------------
-
-1. `build.publish.overwrite` - enable stable artifact reuploading
-2. `build.coursier.use` - enable Coursier resolver (not available in dependent projects)
-3. `build.coursier.version` - override Coursier version (not available in dependent projects)
-
-SBT plugin debugging
---------------------
-
-Once you have the project published locally you may open projects from `sbt/sbt-tests` in IDEA.
-
-So, in case you wish to work with IDL animal model project you should:
-
-1. Perform `sbt publishLocal` from project root
-2. `cd` into [sbt/sbt-tests/src/sbt-test](sbt/sbt-tests/src/sbt-test/) or open it as a project
-3. Play 
-
 Docs
 ----
 
 ```bash
 sbt 'mdoc --no-link-hygiene --watch'
 ```
+
+Build options
+-------------
+
+1. `build.publish.overwrite` - enable stable artifact reuploading
diff --git a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTag.scala b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTag.scala
index 95bb54dda..de930f760 100644
--- a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTag.scala
+++ b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTag.scala
@@ -9,6 +9,15 @@ import izumi.fundamentals.reflection.macrortti.LightTypeTagRef.SymName.{SymTermN
 import izumi.fundamentals.reflection.macrortti.LightTypeTagRef.{AbstractReference, AppliedNamedReference, AppliedReference, NameReference, SymName}
 import izumi.thirdparty.internal.boopickle.Default.Pickler
 
+/**
+  * Extracts internal databases from [[LightTypeTag]].
+  * Should be not used under normal circumstances.
+  */
+case class LightTypeTagUnpacker(tag: LightTypeTag) {
+  def bases: Map[AbstractReference, Set[AbstractReference]] = tag.basesdb
+  def inheritance: Map[NameReference, Set[NameReference]] = tag.idb
+}
+
 abstract class LightTypeTag
 (
   bases: () => Map[AbstractReference, Set[AbstractReference]],
@@ -171,9 +180,9 @@ object LightTypeTag {
     def mergedBasesDB = LightTypeTag.mergeIDBs(structure.basesdb, intersection.iterator.map(_.basesdb))
     def mergedInheritanceDb = LightTypeTag.mergeIDBs(structure.idb, intersection.iterator.map(_.idb))
 
-    val intersectionRef = LightTypeTagRef.IntersectionReference(
-      intersection.iterator.collect { case l if l.ref.isInstanceOf[AppliedNamedReference] => l.ref.asInstanceOf[AppliedNamedReference] }.toSet
-    )
+    val parts = intersection.iterator.collect { case l if l.ref.isInstanceOf[AppliedNamedReference] => l.ref.asInstanceOf[AppliedNamedReference] }.toSet
+    val intersectionRef = LightTypeTagRef.maybeIntersection(parts)
+
     val ref = structure.ref match {
       case LightTypeTagRef.Refinement(_, decls) if decls.nonEmpty =>
         LightTypeTagRef.Refinement(intersectionRef, decls)
diff --git a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagImpl.scala b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagImpl.scala
index b3559a7dc..1026ccc4d 100644
--- a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagImpl.scala
+++ b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagImpl.scala
@@ -340,7 +340,8 @@ final class LightTypeTagImpl[U <: SingletonUniverse](val u: U, withCache: Boolea
       UniRefinement.breakRefinement(t) match {
         case Broken.Compound(tpes, decls) =>
           val parts = tpes.map(p => unpack(p, rules))
-          val intersection = IntersectionReference(parts)
+
+          val intersection = LightTypeTagRef.maybeIntersection(parts)
 
           if (decls.nonEmpty) {
             Refinement(intersection, UniRefinement.convertDecls(decls.toList, rules).toSet)
diff --git a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagInheritance.scala b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagInheritance.scala
index 22887e288..2bf62d01d 100644
--- a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagInheritance.scala
+++ b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagInheritance.scala
@@ -5,12 +5,15 @@ import izumi.fundamentals.platform.basics.IzBoolean._
 import izumi.fundamentals.platform.console.TrivialLogger
 import izumi.fundamentals.platform.console.TrivialLogger.Config
 import izumi.fundamentals.platform.strings.IzString._
-import izumi.fundamentals.reflection.macrortti.LightTypeTagInheritance.Ctx
 import izumi.fundamentals.reflection.macrortti.LightTypeTagRef._
 
 import scala.collection.mutable
 
 object LightTypeTagInheritance {
+  protected[macrortti] final val tpeNothing = NameReference("scala.Nothing")
+  protected[macrortti] final val tpeAny = NameReference("scala.Any")
+  protected[macrortti] final val tpeAnyRef = NameReference("scala.AnyRef")
+  protected[macrortti] final val tpeObject = NameReference(classOf[Object].getName)
 
   final case class Ctx(params: List[LambdaParameter], logger: TrivialLogger) {
     def next(): Ctx = Ctx(params, logger.sub())
@@ -21,11 +24,7 @@ object LightTypeTagInheritance {
 }
 
 final class LightTypeTagInheritance(self: LightTypeTag, other: LightTypeTag) {
-  private final val tpeNothing = NameReference("scala.Nothing")
-  private final val tpeAny = NameReference("scala.Any")
-  private final val tpeAnyRef = NameReference("scala.AnyRef")
-  private final val tpeObject = NameReference(classOf[Object].getName)
-
+  import LightTypeTagInheritance._
   private lazy val ib: ImmutableMultiMap[NameReference, NameReference] = LightTypeTag.mergeIDBs(self.idb, other.idb)
   private lazy val bdb: ImmutableMultiMap[AbstractReference, AbstractReference] = LightTypeTag.mergeIDBs(self.basesdb, other.basesdb)
 
diff --git a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagRef.scala b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagRef.scala
index 57b657c62..0f44ee99d 100644
--- a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagRef.scala
+++ b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/LightTypeTagRef.scala
@@ -45,7 +45,7 @@ sealed trait LightTypeTagRef {
       reference match {
         case reference: AppliedNamedReference => appliedNamedReference(reference)
         case LightTypeTagRef.IntersectionReference(refs) =>
-          LightTypeTagRef.IntersectionReference(refs.map(appliedNamedReference))
+          LightTypeTagRef.maybeIntersection(refs.map(appliedNamedReference))
         case LightTypeTagRef.Refinement(reference, decls) =>
           LightTypeTagRef.Refinement(appliedReference(reference), decls)
       }
@@ -96,7 +96,7 @@ sealed trait LightTypeTagRef {
           val prefixes = refs.map(_.getPrefix).collect {
             case Some(p: AppliedNamedReference) => p
           }
-          if (prefixes.nonEmpty) Some(IntersectionReference(prefixes)) else None
+          if (prefixes.nonEmpty) Some(maybeIntersection(prefixes)) else None
         case Refinement(reference, _) => getPrefix(reference)
       }
     }
@@ -204,10 +204,28 @@ object LightTypeTagRef {
     def asName: NameReference
   }
 
-  final case class IntersectionReference(refs: Set[AppliedNamedReference]) extends AppliedReference {
+  // cannot make constructor private because of boopickle
+  final case class IntersectionReference /*private*/ (refs: Set[AppliedNamedReference]) extends AppliedReference {
     override def toString: String = this.render()
   }
 
+  def maybeIntersection(refs: Set[AppliedNamedReference]): AppliedReference = {
+    val eradicate = Set[AppliedNamedReference](
+      LightTypeTagInheritance.tpeAny,
+      LightTypeTagInheritance.tpeAnyRef,
+      LightTypeTagInheritance.tpeObject
+    )
+    val normalized = refs.diff(eradicate)
+    normalized.toList match {
+      case Nil =>
+        LightTypeTagInheritance.tpeAny
+      case head :: Nil =>
+        head
+      case o =>
+        IntersectionReference(normalized)
+    }
+  }
+
   final case class NameReference(ref: SymName, boundaries: Boundaries = Boundaries.Empty, prefix: Option[AppliedReference] = None) extends AppliedNamedReference {
     override def asName: NameReference = this
 
diff --git a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/RuntimeAPI.scala b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/RuntimeAPI.scala
index c428a1c83..3118d0aa2 100644
--- a/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/RuntimeAPI.scala
+++ b/fundamentals/fundamentals-reflection/src/main/scala/izumi/fundamentals/reflection/macrortti/RuntimeAPI.scala
@@ -95,7 +95,7 @@ private[izumi] object RuntimeAPI {
       reference match {
         case IntersectionReference(refs) =>
           val replaced = refs.map(replaceNamed).map(r => ensureAppliedNamed(reference, r))
-          IntersectionReference(replaced)
+          maybeIntersection(replaced)
         case Refinement(base, decls) =>
 
           val rdecls = decls.map {
diff --git a/project/Deps.sc b/project/Deps.sc
index 89387c12d..cc848339b 100644
--- a/project/Deps.sc
+++ b/project/Deps.sc
@@ -137,7 +137,7 @@ object Izumi {
     // switch order to use 2.13 in IDEA
     val targetScala = Seq(scala212, scala213)
     val targetScalaN = Seq(scala212, scala213, scala211)
-//    val targetScala = Seq(scala213, scala212)
+    //    val targetScala = Seq(scala213, scala212)
     private val jvmPlatform = PlatformEnv(
       platform = Platform.Jvm,
       language = targetScala,
@@ -151,7 +151,15 @@ object Izumi {
       language = targetScala,
       settings = Seq(
         "coverageEnabled" := false,
-        "scalaJSModuleKind" in (SettingScope.Project, Platform.Js) := "ModuleKind.CommonJSModule".raw,
+        "scalaJSModuleKind" in(SettingScope.Project, Platform.Js) := "ModuleKind.CommonJSModule".raw,
+      ),
+    )
+    private val jsPlatformN = PlatformEnv(
+      platform = Platform.Js,
+      language = targetScalaN,
+      settings = Seq(
+        "coverageEnabled" := false,
+        "scalaJSModuleKind" in(SettingScope.Project, Platform.Js) := "ModuleKind.CommonJSModule".raw,
       ),
     )
     private val nativePlatform = PlatformEnv(
@@ -169,7 +177,7 @@ object Izumi {
       ),
     )
     final val cross = Seq(jvmPlatform, jsPlatform)
-    final val crossNative = Seq(jvmPlatformNative, jsPlatform, nativePlatform)
+    final val crossNative = Seq(jvmPlatformNative, jsPlatformN, nativePlatform)
     final val jvm = Seq(jvmPlatform)
     final val js = Seq(jsPlatform)
     final val jvmSbt = Seq(jvmPlatformSbt)
@@ -199,12 +207,12 @@ object Izumi {
       )
 
       final val rootSettings = Defaults.SharedOptions ++ Seq(
-          "crossScalaVersions" := "Nil".raw,
-          "scalaVersion" := Targets.targetScala.head.value,
-          "organization" in SettingScope.Build := "io.7mind.izumi",
-          "sonatypeProfileName" := "io.7mind",
-          "sonatypeSessionName" := """s"[sbt-sonatype] ${name.value} ${version.value} ${java.util.UUID.randomUUID}"""".raw,
-          "publishTo" in SettingScope.Build :=
+        "crossScalaVersions" := "Nil".raw,
+        "scalaVersion" := Targets.targetScala.head.value,
+        "organization" in SettingScope.Build := "io.7mind.izumi",
+        "sonatypeProfileName" := "io.7mind",
+        "sonatypeSessionName" := """s"[sbt-sonatype] ${name.value} ${version.value} ${java.util.UUID.randomUUID}"""".raw,
+        "publishTo" in SettingScope.Build :=
           """
             |(if (!isSnapshot.value) {
             |    sonatypePublishToBundle.value
@@ -212,38 +220,39 @@ object Izumi {
             |    Some(Opts.resolver.sonatypeSnapshots)
             |})
             |""".stripMargin.raw,
-          "credentials" in SettingScope.Build += """Credentials(file(".secrets/credentials.sonatype-nexus.properties"))""".raw,
-          "homepage" in SettingScope.Build := """Some(url("https://izumi.7mind.io"))""".raw,
-          "licenses" in SettingScope.Build := """Seq("BSD-style" -> url("http://www.opensource.org/licenses/bsd-license.php"))""".raw,
-          "developers" in SettingScope.Build :=
+        "credentials" in SettingScope.Build += """Credentials(file(".secrets/credentials.sonatype-nexus.properties"))""".raw,
+        "homepage" in SettingScope.Build := """Some(url("https://izumi.7mind.io"))""".raw,
+        "licenses" in SettingScope.Build := """Seq("BSD-style" -> url("http://www.opensource.org/licenses/bsd-license.php"))""".raw,
+        "developers" in SettingScope.Build :=
           """List(
           Developer(id = "7mind", name = "Septimal Mind", url = url("https://github.com/7mind"), email = "team@7mind.io"),
         )""".raw,
-          "scmInfo" in SettingScope.Build := """Some(ScmInfo(url("https://github.com/7mind/izumi"), "scm:git:https://github.com/7mind/izumi.git"))""".raw,
-          "scalacOptions" in SettingScope.Build += s"""${"\"" * 3}-Xmacro-settings:scalatest-version=${V.scalatest}${"\"" * 3}""".raw,
-        )
+        "scmInfo" in SettingScope.Build := """Some(ScmInfo(url("https://github.com/7mind/izumi"), "scm:git:https://github.com/7mind/izumi.git"))""".raw,
+        "scalacOptions" in SettingScope.Build += s"""${"\"" * 3}-Xmacro-settings:scalatest-version=${V.scalatest}${"\"" * 3}""".raw,
+      )
 
       final val sharedSettings = Defaults.SbtMeta ++ Seq(
-          "test" in Platform.Native := "{}".raw,
-          "testOptions" in SettingScope.Test += """Tests.Argument("-oDF")""".raw,
-          //"testOptions" in (SettingScope.Test, Platform.Jvm) ++= s"""Seq(Tests.Argument("-u"), Tests.Argument(s"$${target.value}/junit-xml-$${scalaVersion.value}"))""".raw,
-          "scalacOptions" ++= Seq(
-            SettingKey(Some(scala212), None) := Defaults.Scala212Options,
-            SettingKey(Some(scala213), None) := Defaults.Scala213Options,
-            SettingKey.Default := Const.EmptySeq,
+        "test" in Platform.Native := "{}".raw,
+        "test" in(SettingScope.Test, Platform.Native) := "{}".raw,
+        "testOptions" in SettingScope.Test += """Tests.Argument("-oDF")""".raw,
+        //"testOptions" in (SettingScope.Test, Platform.Jvm) ++= s"""Seq(Tests.Argument("-u"), Tests.Argument(s"$${target.value}/junit-xml-$${scalaVersion.value}"))""".raw,
+        "scalacOptions" ++= Seq(
+          SettingKey(Some(scala212), None) := Defaults.Scala212Options,
+          SettingKey(Some(scala213), None) := Defaults.Scala213Options,
+          SettingKey.Default := Const.EmptySeq,
+        ),
+        "scalacOptions" ++= Seq(
+          SettingKey(Some(scala212), Some(true)) := Seq(
+            "-opt:l:inline",
+            "-opt-inline-from:izumi.**",
           ),
-          "scalacOptions" ++= Seq(
-            SettingKey(Some(scala212), Some(true)) := Seq(
-              "-opt:l:inline",
-              "-opt-inline-from:izumi.**",
-            ),
-            SettingKey(Some(scala213), Some(true)) := Seq(
-              "-opt:l:inline",
-              "-opt-inline-from:izumi.**",
-            ),
-            SettingKey.Default := Const.EmptySeq
+          SettingKey(Some(scala213), Some(true)) := Seq(
+            "-opt:l:inline",
+            "-opt-inline-from:izumi.**",
           ),
-        )
+          SettingKey.Default := Const.EmptySeq
+        ),
+      )
 
     }
 
@@ -318,24 +327,24 @@ object Izumi {
   }
 
   final val forkTests = Seq(
-    "fork" in (SettingScope.Test, Platform.Jvm) := true,
+    "fork" in(SettingScope.Test, Platform.Jvm) := true,
   )
 
   final val crossScalaSources = Seq(
     "unmanagedSourceDirectories" in SettingScope.Compile :=
-    """(unmanagedSourceDirectories in Compile).value.flatMap {
-      |  dir =>
-      |   Seq(dir, file(dir.getPath + (CrossVersion.partialVersion(scalaVersion.value) match {
-      |     case Some((2, 11)) => "_2.11"
-      |     case Some((2, 12)) => "_2.12"
-      |     case Some((2, 13)) => "_2.13"
-      |     case _             => "_3.0"
-      |   })))
-      |}""".stripMargin.raw,
+      """(unmanagedSourceDirectories in Compile).value.flatMap {
+        |  dir =>
+        |   Seq(dir, file(dir.getPath + (CrossVersion.partialVersion(scalaVersion.value) match {
+        |     case Some((2, 11)) => "_2.11"
+        |     case Some((2, 12)) => "_2.12"
+        |     case Some((2, 13)) => "_2.13"
+        |     case _             => "_3.0"
+        |   })))
+        |}""".stripMargin.raw,
   )
 
-  final lazy val fundamentals0 = Aggregate(
-    name = ArtifactId("fundamentals-cross"),
+  final lazy val fundamentals = Aggregate(
+    name = Projects.fundamentals.id,
     artifacts = Seq(
       Artifact(
         name = Projects.fundamentals.collections,
@@ -351,8 +360,8 @@ object Izumi {
           Projects.fundamentals.collections in Scope.Compile.all
         ),
         settings = Seq(
-            "npmDependencies" in (SettingScope.Test, Platform.Js) ++= Seq("hash.js" -> "1.1.7"),
-          ) ++ crossScalaSources,
+          "npmDependencies" in(SettingScope.Test, Platform.Js) ++= Seq("hash.js" -> "1.1.7"),
+        ) ++ crossScalaSources,
         plugins = Plugins(Seq(Plugin("ScalaJSBundlerPlugin", Platform.Js))),
       ),
       Artifact(
@@ -365,11 +374,11 @@ object Izumi {
         libs = Seq(scala_reflect in Scope.Provided.all),
         depends = Seq.empty,
         settings = crossScalaSources ++ Seq(
-            SettingDef.RawSettingDef(
-              """scalacOptions in Compile --= Seq("-Ywarn-value-discard","-Ywarn-unused:_", "-Wvalue-discard", "-Wunused:_")""",
-              FullSettingScope(SettingScope.Compile, Platform.All),
-            ),
+          SettingDef.RawSettingDef(
+            """scalacOptions in Compile --= Seq("-Ywarn-value-discard","-Ywarn-unused:_", "-Wvalue-discard", "-Wunused:_")""",
+            FullSettingScope(SettingScope.Compile, Platform.All),
           ),
+        ),
       ),
       Artifact(
         name = Projects.fundamentals.reflection,
@@ -380,33 +389,26 @@ object Izumi {
           Projects.fundamentals.thirdpartyBoopickleShaded,
         ),
       ),
-    ),
-    pathPrefix = Projects.fundamentals.basePath,
-    groups = Groups.fundamentals,
-    defaultPlatforms = Targets.crossNative,
-    enableProjectSharedAggSettings = false,
-    settings = Seq(
-      "crossScalaVersions" := "Nil".raw,
-    )
-  )
-
-  final lazy val fundamentals = Aggregate(
-    name = Projects.fundamentals.id,
-    artifacts = Seq(
       Artifact(
         name = Projects.fundamentals.bio,
         libs = (cats_all ++ Seq(zio_core)).map(_ in Scope.Optional.all),
         depends = Seq.empty,
+        platforms = Targets.cross,
       ),
       Artifact(
         name = Projects.fundamentals.fundamentalsJsonCirce,
         libs = circe ++ Seq(jawn in Scope.Compile.js),
         depends = Projects.fundamentals.basics,
+        platforms = Targets.cross,
       ),
     ),
     pathPrefix = Projects.fundamentals.basePath,
     groups = Groups.fundamentals,
-    defaultPlatforms = Targets.cross,
+    defaultPlatforms = Targets.crossNative,
+    enableProjectSharedAggSettings = false,
+    settings = Seq(
+      "crossScalaVersions" := "Nil".raw,
+    )
   )
 
   final val allMonadsOptional = (cats_all ++ Seq(zio_core)).map(_ in Scope.Optional.all)
@@ -478,7 +480,7 @@ object Izumi {
         libs = allMonadsOptional,
         depends =
           Seq(Projects.distage.config, Projects.distage.framework, Projects.distage.logging).map(_ in Scope.Compile.all) ++
-          Seq(Projects.distage.core).map(_ tin Scope.Compile.all),
+            Seq(Projects.distage.core).map(_ tin Scope.Compile.all),
         settings = Seq(
           "classLoaderLayeringStrategy" in SettingScope.Test := "ClassLoaderLayeringStrategy.Flat".raw,
         ),
@@ -489,7 +491,7 @@ object Izumi {
         libs = allMonadsOptional ++ Seq(scalatest.dependency).map(_ in Scope.Compile.all),
         depends =
           Seq(Projects.distage.testkitCore).map(_ in Scope.Compile.all) ++
-          Seq(Projects.distage.core, Projects.distage.plugins).map(_ tin Scope.Compile.all),
+            Seq(Projects.distage.core, Projects.distage.plugins).map(_ tin Scope.Compile.all),
         settings = Seq(
           "classLoaderLayeringStrategy" in SettingScope.Test := "ClassLoaderLayeringStrategy.Flat".raw,
         ),
@@ -500,7 +502,7 @@ object Izumi {
         libs = allMonadsOptional ++ Seq(scalatest.dependency).map(_ in Scope.Compile.all),
         depends =
           Seq(Projects.distage.config, Projects.distage.framework, Projects.distage.logging).map(_ in Scope.Compile.all) ++
-          Seq(Projects.distage.core, Projects.distage.testkitCore).map(_ in Scope.Compile.all),
+            Seq(Projects.distage.core, Projects.distage.testkitCore).map(_ in Scope.Compile.all),
         settings = Seq(
           "classLoaderLayeringStrategy" in SettingScope.Test := "ClassLoaderLayeringStrategy.Flat".raw,
         ),
@@ -564,7 +566,7 @@ object Izumi {
           "coverageEnabled" := false,
           "skip" in SettingScope.Raw("publish") := true,
           "DocKeys.prefix" :=
-          """{if (isSnapshot.value) {
+            """{if (isSnapshot.value) {
             "latest/snapshot"
           } else {
             "latest/release"
@@ -576,7 +578,7 @@ object Izumi {
           "sourceDirectory" in SettingScope.Raw("Paradox") := "mdocOut.value".raw,
           "mdocExtraArguments" ++= Seq(" --no-link-hygiene"),
           "mappings" in SettingScope.Raw("SitePlugin.autoImport.makeSite") :=
-          """{
+            """{
             (mappings in SitePlugin.autoImport.makeSite)
               .dependsOn(mdoc.toTask(" "))
               .value
@@ -587,14 +589,16 @@ object Izumi {
           SettingDef.RawSettingDef(
             "unidocProjectFilter in(ScalaUnidoc, unidoc) := inAggregates(`fundamentals-jvm`, transitive = true) || inAggregates(`distage-jvm`, transitive = true) || inAggregates(`logstage-jvm`, transitive = true)"
           ),
-          SettingDef.RawSettingDef("""paradoxMaterialTheme in Paradox ~= {
+          SettingDef.RawSettingDef(
+            """paradoxMaterialTheme in Paradox ~= {
             _.withCopyright("7mind.io")
               .withRepository(uri("https://github.com/7mind/izumi"))
             //        .withColor("222", "434343")
           }"""),
           "siteSubdirName" in SettingScope.Raw("ScalaUnidoc") := """s"${DocKeys.prefix.value}/api"""".raw,
           "siteSubdirName" in SettingScope.Raw("Paradox") := """s"${DocKeys.prefix.value}/doc"""".raw,
-          SettingDef.RawSettingDef("""paradoxProperties ++= Map(
+          SettingDef.RawSettingDef(
+            """paradoxProperties ++= Map(
             "scaladoc.izumi.base_url" -> s"/${DocKeys.prefix.value}/api/",
             "scaladoc.base_url" -> s"/${DocKeys.prefix.value}/api/",
             "izumi.version" -> version.value,
@@ -642,8 +646,8 @@ object Izumi {
         libs = Seq.empty,
         depends = Seq.empty,
         settings = Projects.sbtplugins.settings ++ Seq(
-            SettingDef.RawSettingDef("""withBuildInfo("izumi.sbt.deps", "Izumi")""")
-          ),
+          SettingDef.RawSettingDef("""withBuildInfo("izumi.sbt.deps", "Izumi")""")
+        ),
         plugins = Plugins(
           enabled = Seq.empty,
           disabled = Seq(Plugin("ScoverageSbtPlugin")),
@@ -660,7 +664,6 @@ object Izumi {
   val izumi: Project = Project(
     name = Projects.root.id,
     aggregates = Seq(
-      fundamentals0,
       fundamentals,
       distage,
       logstage,
@@ -681,14 +684,14 @@ object Izumi {
     globalPlugins = Projects.plugins,
     pluginConflictRules = Map(assemblyPluginJvm.name -> true),
     appendPlugins = Defaults.SbtGenPlugins ++ Seq(
-        SbtPlugin("com.eed3si9n", "sbt-assembly", PV.sbt_assembly),
-        SbtPlugin("com.jsuereth", "sbt-pgp", PV.sbt_pgp),
-        SbtPlugin("org.scoverage", "sbt-scoverage", PV.sbt_scoverage),
-        SbtPlugin("com.eed3si9n", "sbt-unidoc", PV.sbt_unidoc),
-        SbtPlugin("com.typesafe.sbt", "sbt-site", PV.sbt_site),
-        SbtPlugin("com.typesafe.sbt", "sbt-ghpages", PV.sbt_ghpages),
-        SbtPlugin("io.github.jonas", "sbt-paradox-material-theme", PV.sbt_paradox_material_theme),
-        SbtPlugin("org.scalameta", "sbt-mdoc", PV.sbt_mdoc),
-      )
+      SbtPlugin("com.eed3si9n", "sbt-assembly", PV.sbt_assembly),
+      SbtPlugin("com.jsuereth", "sbt-pgp", PV.sbt_pgp),
+      SbtPlugin("org.scoverage", "sbt-scoverage", PV.sbt_scoverage),
+      SbtPlugin("com.eed3si9n", "sbt-unidoc", PV.sbt_unidoc),
+      SbtPlugin("com.typesafe.sbt", "sbt-site", PV.sbt_site),
+      SbtPlugin("com.typesafe.sbt", "sbt-ghpages", PV.sbt_ghpages),
+      SbtPlugin("io.github.jonas", "sbt-paradox-material-theme", PV.sbt_paradox_material_theme),
+      SbtPlugin("org.scalameta", "sbt-mdoc", PV.sbt_mdoc),
+    )
   )
 }
diff --git a/project/Versions.scala b/project/Versions.scala
index 7c72df229..033f6b846 100644
--- a/project/Versions.scala
+++ b/project/Versions.scala
@@ -21,12 +21,12 @@ object V {
   val http4s = "0.21.1"
 
   // java-only dependencies below
-  val classgraph = "4.8.62"
+  val classgraph = "4.8.63"
   val slf4j = "1.7.30"
   val typesafe_config = "1.4.0"
 
   // good to drop - java
   val cglib_nodep = "3.3.0"
   val scala_java_time = "2.0.0-RC3"
-  val docker_java = "3.2.0-rc3"
+  val docker_java = "3.2.0-rc4"
 }


Test patch:
diff --git a/fundamentals/fundamentals-reflection/src/test/scala/izumi.fundamentals.reflection.test/LightTypeTagTest.scala b/fundamentals/fundamentals-reflection/src/test/scala/izumi.fundamentals.reflection.test/LightTypeTagTest.scala
index 42f179c71..eef3f6542 100644
--- a/fundamentals/fundamentals-reflection/src/test/scala/izumi.fundamentals.reflection.test/LightTypeTagTest.scala
+++ b/fundamentals/fundamentals-reflection/src/test/scala/izumi.fundamentals.reflection.test/LightTypeTagTest.scala
@@ -175,7 +175,7 @@ class LightTypeTagTest extends AnyWordSpec {
   "lightweight type tags" should {
     "support human-readable representation" in {
       assertRepr(LTT[Int {def a(k: String): Int; val b: String; type M1 = W1; type M2 <: W2; type M3[A] = Either[Unit, A]}],
-        "({Int} & {def a(String): Int, def b(): String, type M1 = LightTypeTagTest::W1, type M2 = M2|<Nothing..LightTypeTagTest::W2>, type M3 = λ %0 → Either[+Unit,+0]})"
+        "(Int & {def a(String): Int, def b(): String, type M1 = LightTypeTagTest::W1, type M2 = M2|<Nothing..LightTypeTagTest::W2>, type M3 = λ %0 → Either[+Unit,+0]})"
       )
       assertRepr(LTT[I1 with (I1 with (I1 with W1))], "{LightTypeTagTest::I1 & LightTypeTagTest::W1}")
       assertRepr(`LTT[_]`[R1], "λ %0 → LightTypeTagTest::R1[=0]")
@@ -209,6 +209,13 @@ class LightTypeTagTest extends AnyWordSpec {
       assertCombineNonPos(`LTT[_,_]`[Either], Seq(None, Some(LTT[Unit])), `LTT[_]`[Either[?, Unit]])
     }
 
+    "eradicate tautologies" in {
+      assertSame(LTT[Object with Option[String]], LTT[Option[String]])
+      assertSame(LTT[Any with Option[String]], LTT[Option[String]])
+      assertSame(LTT[AnyRef with Option[String]], LTT[Option[String]])
+
+    }
+
     "support subtype checks" in {
       assertChild(LTT[Int], LTT[AnyVal])
       assertChild(LTT[Int], LTT[Int])