Full Code of zio/izumi-reflect for AI

develop 815836839d1d cached
141 files
616.4 KB
174.3k tokens
1 requests
Download .txt
Showing preview only (674K chars total). Download the full file or copy to clipboard to get everything.
Repository: zio/izumi-reflect
Branch: develop
Commit: 815836839d1d
Files: 141
Total size: 616.4 KB

Directory structure:
gitextract_msmhs6p6/

├── .envrc
├── .git-blame-ignore-revs
├── .gitattributes
├── .github/
│   ├── CODEOWNERS
│   ├── FUNDING.yml
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .jvmopts
├── .mdl/
│   ├── defs/
│   │   └── actions.md
│   └── resources/
│       └── zio-docs.sbt
├── .scala-steward.conf
├── .scalafmt.conf
├── CLA.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── build.sbt
├── docs/
│   ├── index.md
│   ├── package.json
│   └── sidebars.js
├── flake.nix
├── fmt-all
├── izumi-reflect/
│   ├── izumi-reflect/
│   │   ├── .js/
│   │   │   └── src/
│   │   │       └── test/
│   │   │           └── scala-2/
│   │   │               └── izumi/
│   │   │                   └── reflect/
│   │   │                       └── test/
│   │   │                           └── PlatformSpecific.scala
│   │   ├── .jvm/
│   │   │   └── src/
│   │   │       └── test/
│   │   │           └── scala-2/
│   │   │               └── izumi/
│   │   │                   └── reflect/
│   │   │                       └── test/
│   │   │                           ├── AllPartsStrongTestScala2Jvm.scala
│   │   │                           └── PlatformSpecific.scala
│   │   ├── .native/
│   │   │   └── src/
│   │   │       └── test/
│   │   │           └── scala-2/
│   │   │               └── izumi/
│   │   │                   └── reflect/
│   │   │                       └── test/
│   │   │                           └── PlatformSpecific.scala
│   │   └── src/
│   │       ├── main/
│   │       │   ├── scala/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           ├── DebugProperties.scala
│   │       │   │           ├── internal/
│   │       │   │           │   └── fundamentals/
│   │       │   │           │       ├── collections/
│   │       │   │           │       │   ├── IzCollections.scala
│   │       │   │           │       │   ├── IzMappings.scala
│   │       │   │           │       │   └── package.scala
│   │       │   │           │       ├── functional/
│   │       │   │           │       │   └── Renderable.scala
│   │       │   │           │       └── platform/
│   │       │   │           │           ├── assertions/
│   │       │   │           │           │   └── IzAssert.scala
│   │       │   │           │           ├── basics/
│   │       │   │           │           │   └── IzBoolean.scala
│   │       │   │           │           ├── console/
│   │       │   │           │           │   └── TrivialLogger.scala
│   │       │   │           │           └── strings/
│   │       │   │           │               └── IzString.scala
│   │       │   │           └── macrortti/
│   │       │   │               ├── LTTOrdering.scala
│   │       │   │               ├── LTTRenderables.scala
│   │       │   │               ├── LTTSyntax.scala
│   │       │   │               ├── LightTypeTag.scala
│   │       │   │               ├── LightTypeTagInheritance.scala
│   │       │   │               ├── LightTypeTagRef.scala
│   │       │   │               └── RuntimeAPI.scala
│   │       │   ├── scala-2/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           ├── AnnotationTools.scala
│   │       │   │           ├── ReflectionUtil.scala
│   │       │   │           ├── ScalacSink.scala
│   │       │   │           ├── TagMacro.scala
│   │       │   │           ├── Tags.scala
│   │       │   │           ├── TrivialMacroLogger.scala
│   │       │   │           ├── macrortti/
│   │       │   │           │   ├── LTag.scala
│   │       │   │           │   ├── LightTypeTagImpl.scala
│   │       │   │           │   ├── LightTypeTagMacro.scala
│   │       │   │           │   └── package.scala
│   │       │   │           └── package.scala
│   │       │   ├── scala-2.11/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               └── NowarnCompat/
│   │       │   │                   └── nowarn.scala
│   │       │   ├── scala-2.12+/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               └── NowarnCompat.scala
│   │       │   ├── scala-2.12-/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               ├── CollectionCompat.scala
│   │       │   │               ├── OrderingCompat.scala
│   │       │   │               └── fundamentals/
│   │       │   │                   └── platform/
│   │       │   │                       └── language/
│   │       │   │                           └── unused.scala
│   │       │   ├── scala-2.13+/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               ├── CollectionCompat.scala
│   │       │   │               ├── OrderingCompat.scala
│   │       │   │               └── fundamentals/
│   │       │   │                   └── platform/
│   │       │   │                       └── language/
│   │       │   │                           └── package.scala
│   │       │   └── scala-3/
│   │       │       └── izumi/
│   │       │           └── reflect/
│   │       │               ├── TagMacro.scala
│   │       │               ├── Tags.scala
│   │       │               ├── dottyreflection/
│   │       │               │   ├── FullDbInspector.scala
│   │       │               │   ├── InheritanceDbInspector.scala
│   │       │               │   ├── Inspect.scala
│   │       │               │   ├── Inspector.scala
│   │       │               │   ├── InspectorBase.scala
│   │       │               │   ├── ReflectionUtil.scala
│   │       │               │   └── TypeInspections.scala
│   │       │               └── macrortti/
│   │       │                   ├── LTag.scala
│   │       │                   └── package.scala
│   │       └── test/
│   │           ├── scala/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           ├── internal/
│   │           │           │   └── fundamentals/
│   │           │           │       ├── collections/
│   │           │           │       │   └── IzCollectionsTest.scala
│   │           │           │       └── platform/
│   │           │           │           └── IzStringTest.scala
│   │           │           └── test/
│   │           │               ├── CurrentDottySupportExtentTest.scala
│   │           │               ├── InheritedModel.scala
│   │           │               ├── LTTRenderablesTest.scala
│   │           │               ├── SharedLightTypeTagProgressionTest.scala
│   │           │               ├── SharedLightTypeTagTest.scala
│   │           │               ├── SharedTagProgressionTest.scala
│   │           │               ├── SharedTagTest.scala
│   │           │               ├── TagAssertions.scala
│   │           │               ├── TagCombineTest.scala
│   │           │               ├── TagLogging.scala
│   │           │               ├── TagProgressions.scala
│   │           │               └── TestModel.scala
│   │           ├── scala-2/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               ├── BasicDottyTestMirror.scala
│   │           │               ├── DiscoveryModel.scala
│   │           │               ├── IsScala3.scala
│   │           │               ├── LightTypeTagProgressionTest.scala
│   │           │               ├── LightTypeTagTest.scala
│   │           │               ├── TagProgressionTest.scala
│   │           │               └── TagTest.scala
│   │           ├── scala-2.11/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala2MinorVersion.scala
│   │           ├── scala-2.12/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala2MinorVersion.scala
│   │           ├── scala-2.13/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala2MinorVersion.scala
│   │           ├── scala-2.13+/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala213Plus_LightTypeTagTest.scala
│   │           └── scala-3/
│   │               └── izumi/
│   │                   └── reflect/
│   │                       └── test/
│   │                           ├── BasicDottyTest.scala
│   │                           ├── DiscoveryModel.scala
│   │                           ├── DottyRegressionTests.scala
│   │                           ├── IsScala3.scala
│   │                           ├── LightTypeTagProgressionTest.scala
│   │                           ├── LightTypeTagTest.scala
│   │                           ├── PlatformSpecific.scala
│   │                           ├── Scala2MinorVersion.scala
│   │                           ├── TagProgressionTest.scala
│   │                           └── TagTest.scala
│   └── izumi-reflect-thirdparty-boopickle-shaded/
│       ├── .js/
│       │   └── src/
│       │       └── main/
│       │           └── scala/
│       │               └── izumi/
│       │                   └── reflect/
│       │                       └── thirdparty/
│       │                           └── internal/
│       │                               └── boopickle/
│       │                                   ├── ReferenceEquality.scala
│       │                                   └── StringCodec.scala
│       ├── .jvm/
│       │   └── src/
│       │       └── main/
│       │           └── scala/
│       │               └── izumi/
│       │                   └── reflect/
│       │                       └── thirdparty/
│       │                           └── internal/
│       │                               └── boopickle/
│       │                                   ├── DefaultByteBufferProvider.scala
│       │                                   ├── ReferenceEquality.scala
│       │                                   └── StringCodec.scala
│       ├── .native/
│       │   └── src/
│       │       └── main/
│       │           └── scala/
│       │               └── izumi/
│       │                   └── reflect/
│       │                       └── thirdparty/
│       │                           └── internal/
│       │                               └── boopickle/
│       │                                   ├── DefaultByteBufferProvider.scala
│       │                                   ├── ReferenceEquality.scala
│       │                                   └── StringCodec.scala
│       └── src/
│           ├── main/
│           │   ├── scala/
│           │   │   └── izumi/
│           │   │       └── reflect/
│           │   │           └── thirdparty/
│           │   │               └── internal/
│           │   │                   └── boopickle/
│           │   │                       ├── BufferPool.scala
│           │   │                       ├── BufferProvider.scala
│           │   │                       ├── CodecSize.scala
│           │   │                       ├── Codecs.scala
│           │   │                       ├── CompositePicklers.scala
│           │   │                       ├── Constants.scala
│           │   │                       ├── Default.scala
│           │   │                       ├── IdentList.scala
│           │   │                       ├── IdentMap.scala
│           │   │                       ├── Pickler.scala
│           │   │                       ├── StringCodecBase.scala
│           │   │                       └── TuplePicklers.scala
│           │   ├── scala-2.12-/
│           │   │   └── izumi/
│           │   │       └── reflect/
│           │   │           └── thirdparty/
│           │   │               └── internal/
│           │   │                   └── boopickle/
│           │   │                       └── XCompat.scala
│           │   └── scala-2.13+/
│           │       └── izumi/
│           │           └── reflect/
│           │               └── thirdparty/
│           │                   └── internal/
│           │                       └── boopickle/
│           │                           └── XCompat.scala
│           └── test/
│               └── scala/
│                   └── izumi/
│                       └── reflect/
│                           └── .keep
├── keys.sh
├── project/
│   ├── Deps.sc
│   ├── Settings.scala
│   ├── Versions.scala
│   ├── build.properties
│   ├── plugins.sbt
│   └── project/
│       └── PluginVersions.scala
├── sbtgen.sc
├── secrets.tar.enc
└── version.sbt

================================================
FILE CONTENTS
================================================

================================================
FILE: .envrc
================================================
use_flake

# Remove git-minimal from PATH to keep system git
PATH_rm '/nix/store/*git-minimal*/bin'


================================================
FILE: .git-blame-ignore-revs
================================================
# Scala Steward: Reformat with scalafmt 3.7.2
edcec351367976c77a5a5ce2842804232e6f7ca5

# Scala Steward: Reformat with scalafmt 3.7.3
d300efb67187b7bfbd1c6f0f04fe181d4373c749

# Scala Steward: Reformat with scalafmt 3.7.4
99666671f20427ffb9b330a3a7ef3d7941d10ad5

# Scala Steward: Reformat with scalafmt 3.8.6
18b438352adfcb8c4aba3cac4c74b783ba28c775

# Scala Steward: Reformat with scalafmt 3.9.1
2150c0a1bfc30f7b4f587a58e74cf92f30d894ac

# Scala Steward: Reformat with scalafmt 3.9.4
fe9b58b7ac2be9ea7dc14c7e1b1b025679b728f4


================================================
FILE: .gitattributes
================================================
*                           text=auto
.git*                       text export-ignore

*.sbt                       text
*.scala                     text
*.java                      text
*.txt                       text

.classpath                 -text whitespace=cr-at-eol merge=union
*.md                        text conflict-marker-size=200
*.xml                      -text whitespace=cr-at-eol

*.sh        text eol=lf


================================================
FILE: .github/CODEOWNERS
================================================
* @pshirshov @neko-kai


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: 7mind # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: 7mind # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://www.buymeacoffee.com/7mind'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/workflows/build.yml
================================================
name: Build

on:
  workflow_dispatch:
    inputs: {}
  push:
    branches: [ "develop" ]
    tags: [ "v**" ]
  pull_request:
    branches: [ "develop" ]

jobs:
  checksecret:
    runs-on: ubuntu-latest
    outputs:
      HAVE_SECRETS: ${{ steps.checksecret_job.outputs.HAVE_SECRETS }}
    steps:
      - id: checksecret_job
        env:
          OPENSSL_IV: ${{ secrets.OPENSSL_IV }}
          OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }}
        run: |
          echo "HAVE_SECRETS=${{ env.OPENSSL_IV != '' && env.OPENSSL_KEY != '' }}" >> $GITHUB_OUTPUT

  build:
    runs-on: ubuntu-latest
    needs: [ 'checksecret' ]
    permissions:
      checks: write
      contents: write
    strategy:
      fail-fast: false
      matrix:
        java: [ '11', '17', '21' ]
        scala: [ '2.11', '2.12', '2.13', '3' ]
    steps:
      - uses: 7mind/github-env@minimal
      - name: Build and Test
        env:
          CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
          CI_BRANCH: ${{ github.ref_name }}
          CI_BRANCH_TAG: ${{ github.ref_name }}
        run: nix develop --command mdl -u java_version:${{ matrix.java }} -u scala_version:${{ matrix.scala }} --github-actions :gen :test
      - uses: dorny/test-reporter@v1
        if: (needs.checksecret.outputs.HAVE_SECRETS == 'true') && (success() || failure())
        with:
          name: Test reports (JDK ${{ matrix.java }}, Scala ${{ matrix.scala }})
          path: '**/target/test-reports/TEST-*.xml'
          reporter: java-junit
      - uses: sbt/setup-sbt@v1 # setup sbt
      - name: Upload dependency graph
        if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
        uses: scalacenter/sbt-dependency-submission@53544c3e7bf54b0cb7f375f016e5b7446b96b706

  publish-artifacts:
    runs-on: ubuntu-latest
    needs: [ 'build', 'checksecret' ]
    if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
    strategy:
      matrix:
        java: [ '17' ]
        scala: [ '2.13' ]
    steps:
      - uses: 7mind/github-env@minimal
      - name: Build and Publish to Sonatype
        env:
          OPENSSL_IV: ${{ secrets.OPENSSL_IV }}
          OPENSSL_KEY: ${{ secrets.OPENSSL_KEY }}
          SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
          SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
          CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
          CI_BRANCH: ${{ github.ref_name }}
          CI_BRANCH_TAG: ${{ github.ref_name }}
        run: |
          openssl aes-256-cbc -K ${OPENSSL_KEY} -iv ${OPENSSL_IV} -in secrets.tar.enc -out secrets.tar -d
          tar xvf secrets.tar
          ln -s .secrets/local.sbt local.sbt
          rm ./.secrets/credentials.sonatype-nexus.properties
          printf "%s\n" "realm=Sonatype Nexus Repository Manager" "host=central.sonatype.com" "user=${SONATYPE_USERNAME}" "password=${SONATYPE_PASSWORD}" > ./.secrets/credentials.sonatype-nexus.properties
          nix develop --command mdl -u java_version:${{ matrix.java }} -u scala_version:${{ matrix.scala }} --github-actions :gen :publish-scala

  release-and-notify-docs:
    name: Release and Notify Docs
    runs-on: ubuntu-latest
    continue-on-error: false
    needs: [ 'build', 'checksecret' ]
    if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
    #if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
    strategy:
      matrix:
        java: [ '17' ]
        scala: [ '2.13' ]
    steps:
      - uses: 7mind/github-env@minimal
      - name: Publish Docs to NPM Registry
        env:
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          CI_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
          CI_BRANCH: ${{ github.ref_name }}
          CI_BRANCH_TAG: ${{ github.ref_name }}
        run: nix develop --command mdl -u java_version:${{ matrix.java }} -u scala_version:${{ matrix.scala }} --github-actions :gen :publish-ziodocs
      - name: Notify the main repo about the new release of docs package
        run: |
          PACKAGE_NAME=$(cat docs/package.json | grep '"name"' | awk -F'"' '{print $4}')
          PACKAGE_VERSION=$(npm view $PACKAGE_NAME version)
          curl -L \
            -X POST \
            -H "Accept: application/vnd.github+json" \
            -H "Authorization: token ${{ secrets.PAT_TOKEN }}"\
              https://api.github.com/repos/zio/zio/dispatches \
              -d '{
                    "event_type":"update-docs",
                    "client_payload":{
                      "package_name":"'"${PACKAGE_NAME}"'",
                      "package_version": "'"${PACKAGE_VERSION}"'"
                    }
                  }'

  all-good:
    if: always()
    runs-on: ubuntu-latest
    needs: [ 'build' ]
    steps:
      - name: Decide whether the needed jobs succeeded or failed
        uses: re-actors/alls-green@release/v1
        with:
          jobs: ${{ toJSON(needs) }}


================================================
FILE: .gitignore
================================================
.mdl/runs/
.env
.direnv
.hydra
.idea
*.jps
/local.sbt
.secrets*
/config
.agg
.bsp
project/project/project
project/project/metals.sbt

# we cannot exclude build.sbt - scala steward wouldn't work without it
#build.sbt
#project/plugins.sbt
#project/build.properties

secrets.tar
build/project
.DS_Store
.metals
project/metals.sbt
.bloop
.java-version

# Created by .ignore support plugin (hsz.mobi)
### Scala template
*.class
*.log
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
.idea/**/mongoSettings.xml

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
out/
*.iml

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### SBT template
# Simple Build Tool
# http://www.scala-sbt.org/release/docs/Getting-Started/Directories.html#configuring-version-control

dist/*
target/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
.history
.cache
.lib/
### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

.vscode


================================================
FILE: .jvmopts
================================================

# toggle debug output
#-Dizumi.reflect.debug.macro.rtti=true
#-Dizumi.reflect.debug.macro.rtti=false

# toggle debug assertions
#-Dizumi.reflect.debug.macro.rtti.assertions=true
#-Dizumi.reflect.debug.macro.rtti.assertions=false

-Xmx8G
-XX:ReservedCodeCacheSize=256m
-XX:MaxMetaspaceSize=3G

-XX:+OmitStackTraceInFastThrow
-XX:SoftRefLRUPolicyMSPerMB=50
-Dsun.io.useCanonCaches=false
-server

#-Xshare:on

#-Xshare:dump
#-Xlog:class+load=info

-XX:+UseG1GC

# Enable ZGC
#-XX:+UnlockExperimentalVMOptions
#-XX:+UseZGC

# Enable Graal JIT
#-XX:+UnlockExperimentalVMOptions
#-XX:+EnableJVMCI
#-XX:+UseJVMCICompiler

# Bumping JIT inline-level increases performance of Scala code
#   https://www.reddit.com/r/scala/comments/cigh0t/these_go_to_eighteen_c_jon_pretty/
#   https://scalacenter.github.io/bloop/docs/performance-guide#tweak-the-java-jit
#   https://twitter.com/leifwickland/status/1179419045055086595
-XX:MaxInlineLevel=18
# These seem to cause sbt import slowdown :\
#-XX:MaxInlineSize=270
#-XX:MaxTrivialSize=12


================================================
FILE: .mdl/defs/actions.md
================================================
# Build Actions

## Environment

- `LANG=C.UTF-8`

## passthrough
- `HOME`
- `USER`
- `OPENSSL_IV`
- `OPENSSL_KEY`
- `SONATYPE_USERNAME`
- `SONATYPE_PASSWORD`
- `NODE_AUTH_TOKEN`
- `CI_BRANCH_TAG`
- `CI_BUILD_UNIQ_SUFFIX`
- `CI_PULL_REQUEST`
- `CI_BRANCH`

# Axis

- `java_version`=`{11|17*|21}`
- `scala_version`=`{2.12|2.13*|3}`

# action: setup-jdk

Setup JDK path based on JAVA_VERSION

```bash
JAVA_VERSION_VAL=${sys.axis.java_version}

# Determine JAVA_HOME based on JDK version from nix flake environment
# These are set by flake.nix shellHook
case "$JAVA_VERSION_VAL" in
  11)
    if [[ -n "${JDK11:-}" ]]; then
      JAVA_HOME="$JDK11"
    else
      echo "Error: JDK11 not set in environment" && exit 1
    fi
    ;;
  17)
    if [[ -n "${JDK17:-}" ]]; then
      JAVA_HOME="$JDK17"
    else
      echo "Error: JDK17 not set in environment" && exit 1
    fi
    ;;
  21)
    if [[ -n "${JDK21:-}" ]]; then
      JAVA_HOME="$JDK21"
    else
      echo "Error: JDK21 not set in environment" && exit 1
    fi
    ;;
  *)
    echo "Unsupported JAVA_VERSION: $JAVA_VERSION_VAL" && exit 1
    ;;
esac

JAVA_BIN="$JAVA_HOME/bin"
PATH="$JAVA_BIN:$PATH"

ret java-home:String="$JAVA_HOME"
ret path:String="$PATH"
```

# action: setup-jvm-options

Setup JVM options and optimizations

```bash
JAVA_OPTIONS="${_JAVA_OPTIONS:-}"

# Add user.home for nix environments
USER_HOME="${env.HOME}"
JAVA_OPTIONS+=" -Duser.home=$USER_HOME"

# Append any custom tail options (optional)
if [[ -n "${JAVA_OPTIONS_TAIL:-}" ]]; then
  JAVA_OPTIONS+=" $JAVA_OPTIONS_TAIL"
fi

# Add optimizations
JAVA_OPTIONS+=" -Xmx4000M"
JAVA_OPTIONS+=" -XX:ReservedCodeCacheSize=384M"
JAVA_OPTIONS+=" -XX:NonProfiledCodeHeapSize=256M"
JAVA_OPTIONS+=" -XX:MaxMetaspaceSize=1024M"

# Normalize whitespace
JAVA_OPTIONS=$(echo "$JAVA_OPTIONS" | tr '\n' ' ' | tr -s ' ')

ret java-options:String="$JAVA_OPTIONS"
```

# action: setup-scala

Setup Scala version variables

```bash
SCALA_VERSION_VAL=${sys.axis.scala_version}

VERSION_COMMAND="++ $SCALA_VERSION_VAL"

ret version-command:String="$VERSION_COMMAND"
```

# action: check-sbtgen-staleness

Decide whether sbt build files need regeneration

```bash
PROJECT_ROOT="${sys.project-root}"

readonly SBTGEN_INPUTS=(
  "$PROJECT_ROOT/sbtgen.sc"
  "$PROJECT_ROOT/project/Deps.sc"
  "$PROJECT_ROOT/project/Settings.scala"
  "$PROJECT_ROOT/project/Versions.scala"
  "$PROJECT_ROOT/project/project/PluginVersions.scala"
)

readonly GENERATED_SBT_FILES=(
  "$PROJECT_ROOT/build.sbt"
  "$PROJECT_ROOT/project/plugins.sbt"
)

readonly EPOCH_START=0

for input_file in "${SBTGEN_INPUTS[@]}"; do
  if [[ ! -f "$input_file" ]]; then
    echo "Missing sbtgen input: $input_file"
    exit 1
  fi
done

for generated_file in "${GENERATED_SBT_FILES[@]}"; do
  if [[ ! -f "$generated_file" ]]; then
    retain
    exit 0
  fi
done

newest_input_mtime="$EPOCH_START"
for input_file in "${SBTGEN_INPUTS[@]}"; do
  modified_at=$(stat -c %Y "$input_file")
  if (( modified_at > newest_input_mtime )); then
    newest_input_mtime="$modified_at"
  fi
done

oldest_generated_mtime=$(stat -c %Y "${GENERATED_SBT_FILES[0]}")
for generated_file in "${GENERATED_SBT_FILES[@]:1}"; do
  modified_at=$(stat -c %Y "$generated_file")
  if (( modified_at < oldest_generated_mtime )); then
    oldest_generated_mtime="$modified_at"
  fi
done

if (( newest_input_mtime > oldest_generated_mtime )); then
  retain
fi
```

# action: gen

Generate build files using sbtgen

```bash
# Depend on all setup actions
JAVA_HOME="${action.setup-jdk.java-home}"
PATH="${action.setup-jdk.path}"
JAVA_OPTIONS="${action.setup-jvm-options.java-options}"
_JAVA_OPTIONS="$JAVA_OPTIONS"

bash sbtgen.sc --js --native
```

# action: test

Run tests and binary compatibility checks

```bash
# Declare dependencies and use their outputs
soft action.gen retain.action.check-sbtgen-staleness

JAVA_HOME="${action.setup-jdk.java-home}"
PATH="${action.setup-jdk.path}"
JAVA_OPTIONS="${action.setup-jvm-options.java-options}"
_JAVA_OPTIONS="$JAVA_OPTIONS"
VERSION_COMMAND="${action.setup-scala.version-command}"

sbt -batch -no-colors -v \
  --java-home "$JAVA_HOME" \
  "$VERSION_COMMAND clean" \
  "$VERSION_COMMAND Test/compile" \
  "$VERSION_COMMAND test" \
  "$VERSION_COMMAND mimaReportBinaryIssues"
```

# action: publish-scala

Publish Scala artifacts to Sonatype (only on release branches/tags)

## vars
- `CI_PULL_REQUEST`
- `CI_BRANCH`

```bash
# Declare dependencies and use their outputs
soft action.gen

JAVA_HOME="${action.setup-jdk.java-home}"
PATH="${action.setup-jdk.path}"
JAVA_OPTIONS="${action.setup-jvm-options.java-options}"
_JAVA_OPTIONS="$JAVA_OPTIONS"

# Get environment variables from mudyla substitution
SONATYPE_USERNAME_VAL="${env.SONATYPE_USERNAME}"
SONATYPE_PASSWORD_VAL="${env.SONATYPE_PASSWORD}"
CI_PULL_REQUEST_VAL="${env.CI_PULL_REQUEST}"
CI_BRANCH_VAL="${env.CI_BRANCH}"
CI_BRANCH_TAG_VAL="${env.CI_BRANCH_TAG}"

# Apply bash defaults
SONATYPE_USERNAME="${SONATYPE_USERNAME_VAL}"
SONATYPE_PASSWORD="${SONATYPE_PASSWORD_VAL}"
CI_PULL_REQUEST="${CI_PULL_REQUEST_VAL:-false}"
CI_BRANCH="${CI_BRANCH_VAL}"
CI_BRANCH_TAG="${CI_BRANCH_TAG_VAL}"

if [[ -z "$SONATYPE_USERNAME" ]]; then
    echo "Missing SONATYPE_USERNAME, skipping publish"
    exit 0
fi

if [[ -z "$SONATYPE_PASSWORD" ]]; then
    echo "Missing SONATYPE_PASSWORD, skipping publish"
    exit 0
fi

if [[ "$CI_PULL_REQUEST" == "true" ]]; then
    echo "Publishing not allowed on P/Rs"
    exit 0
fi

if [[ "$CI_BRANCH" != "develop" && ! "$CI_BRANCH_TAG" =~ ^v ]]; then
    echo "Publishing not allowed (CI_BRANCH=$CI_BRANCH, CI_BRANCH_TAG=$CI_BRANCH_TAG)"
    exit 0
fi

if [[ "$CI_BRANCH_TAG" =~ ^v.*$ ]]; then
    # Full release with sonaRelease
    sbt -batch -no-colors -v \
        --java-home "$JAVA_HOME" \
        "show credentials" \
        "+clean" \
        "+test:compile" \
        "+publishSigned" \
        "sonaRelease"
else
    # Snapshot publish without release
    sbt -batch -no-colors -v \
        --java-home "$JAVA_HOME" \
        "show credentials" \
        "+clean" \
        "+test:compile" \
        "+publishSigned"
fi
```

# action: publish-ziodocs

Publish documentation to NPM

## vars
- `CI_PULL_REQUEST`
- `CI_BRANCH`

```bash
# Declare dependencies and use their outputs
soft action.gen

JAVA_HOME="${action.setup-jdk.java-home}"
PATH="${action.setup-jdk.path}"
JAVA_OPTIONS="${action.setup-jvm-options.java-options}"
_JAVA_OPTIONS="$JAVA_OPTIONS"

# Get environment variables from mudyla substitution
NODE_AUTH_TOKEN_VAL="${env.NODE_AUTH_TOKEN}"
CI_PULL_REQUEST_VAL="${env.CI_PULL_REQUEST}"
CI_BRANCH_VAL="${env.CI_BRANCH}"
CI_BRANCH_TAG_VAL="${env.CI_BRANCH_TAG}"

# Apply bash defaults
NODE_AUTH_TOKEN="${NODE_AUTH_TOKEN_VAL}"
CI_PULL_REQUEST="${CI_PULL_REQUEST_VAL:-false}"
CI_BRANCH="${CI_BRANCH_VAL}"
CI_BRANCH_TAG="${CI_BRANCH_TAG_VAL}"

if [[ -z "$NODE_AUTH_TOKEN" ]]; then
    echo "Missing NODE_AUTH_TOKEN, skipping docs publish"
    exit 0
fi

if [[ "$CI_PULL_REQUEST" == "true" ]]; then
    echo "Publishing not allowed on P/Rs"
    exit 0
fi

if [[ "$CI_BRANCH" != "develop" && ! "$CI_BRANCH_TAG" =~ ^v ]]; then
    echo "Publishing not allowed (CI_BRANCH=$CI_BRANCH, CI_BRANCH_TAG=$CI_BRANCH_TAG)"
    exit 0
fi

# Copy zio-docs.sbt
cp ${sys.project-root}/.mdl/resources/zio-docs.sbt ${sys.project-root}/zio-docs.sbt

# Extract docs section from README and append to docs/index.md
awk '/<!--- docs:start --->/,/<!--- docs:end --->/' ${sys.project-root}/README.md >> ${sys.project-root}/docs/index.md
sed -i '/<!--- docs:start --->/d' ${sys.project-root}/docs/index.md
sed -i '/<!--- docs:end --->/d' ${sys.project-root}/docs/index.md

# Setup npm auth
echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc

# Verify npm authentication
npm whoami

# Publish to npm
sbt -batch -no-colors -v \
    --java-home "$JAVA_HOME" \
    docs/publishToNpm
```

# action: build

Full build pipeline - generate and test

```bash
soft action.gen retain.action.check-sbtgen-staleness
dep action.test
exit 0
```


================================================
FILE: .mdl/resources/zio-docs.sbt
================================================
lazy val docs = project
  .in(file("izumi-reflect-docs"))
  .settings(
    publish / skip := true,
    moduleName := "izumi-reflect-docs",
    scalacOptions -= "-Yno-imports",
    scalacOptions -= "-Xfatal-warnings",
    projectName := "izumi-reflect",
    mainModuleName                             := "izumi-reflect",
    projectStage                               := ProjectStage.ProductionReady,
  )
  .enablePlugins(WebsitePlugin)

================================================
FILE: .scala-steward.conf
================================================
updates.pin  = [
  # do not update Scala 2.13 because of revoked forward compatibility
  { groupId = "org.scala-lang", artifactId="scala-compiler", version = "2.13.14" },
  { groupId = "org.scala-lang", artifactId="scala-library", version = "2.13.14" },
  { groupId = "org.scala-lang", artifactId="scala-reflect", version = "2.13.14" },
  # use only Scala3 3.3 LTS
  { groupId = "org.scala-lang", artifactId="scala3-compiler", version = "3.3." },
  { groupId = "org.scala-lang", artifactId="scala3-library", version = "3.3." },
  { groupId = "org.scala-lang", artifactId="scala3-library_sjs1", version = "3.3." }
]

pullRequests.frequency = "@monthly"

pullRequests.grouping = [
  # group scala updates & scoverage
  { name="scala-versions", "title"="Scala compiler updates", "filter"=[{"group" = "org.scala-lang"}, {"group" = "org.scoverage"}] },
  # group everything else
  { name = "all", "title" = "Dependency updates", "filter" = [{"group" = "*"}] }
]

updatePullRequests = "always"


================================================
FILE: .scalafmt.conf
================================================
version = "3.9.4"
runner.dialect = scala3
project.git = true
project.excludePaths = ["glob:**.sbt", "glob:**sbtgen.sc"]

maxColumn = 170

importSelectors = singleLine
spaces.inImportCurlyBraces = false

literals.hexDigits = "Upper"

align.preset = none
align.stripMargin = true
align.inInterpolation = false

newlines.beforeCurlyLambdaParams = multiline
newlines.afterCurlyLambdaParams = never
newlines.implicitParamListModifierPrefer = after
newlines.avoidAfterYield = true
newlines.alwaysBeforeMultilineDef = false
newlines.inInterpolation = allow

indent.defnSite = 2
indent.callSite = 2
indent.extendSite = 2

assumeStandardLibraryStripMargin = true
docstrings = ScalaDoc
docstrings.wrap = false
docstrings.blankFirstLine = keep
docstrings.forceBlankLineBefore = false
lineEndings = unix

danglingParentheses.callSite = true
danglingParentheses.defnSite = true
danglingParentheses.ctrlSite = false
danglingParentheses.exclude = []
verticalAlignMultilineOperators = true

includeCurlyBraceInSelectChains = true
includeNoParensInSelectChains = true

verticalMultiline.atDefnSite = true
verticalMultiline.arityThreshold = 100
verticalMultiline.newlineAfterOpenParen = false

optIn.configStyleArguments = true
optIn.breaksInsideChains = true
optIn.breakChainOnFirstMethodDot = true
optIn.selfAnnotationNewline = true
optIn.annotationNewlines = true

rewrite.rules = [AsciiSortImports, RedundantBraces, RedundantParens]
rewrite.redundantBraces.methodBodies = false // remove braces only in interpolations
rewrite.redundantBraces.maxLines = -1 // remove braces only in interpolations
rewrite.redundantBraces.generalExpressions = false // remove braces only in interpolations
rewrite.redundantBraces.includeUnitMethods = false
rewrite.redundantBraces.stringInterpolation = true
rewrite.redundantBraces.parensForOneLineApply = true

//rewrite.trailingCommas.trailingCommas = multiple
rewrite.trailingCommas.style = never // Scala 2.11


================================================
FILE: CLA.md
================================================
# ZIO Contributor License Agreement

Thank you for your interest in contributing to the ZIO open source project.

This contributor agreement ("Agreement") describes the terms and conditions under which you may Submit a Contribution to Us. By Submitting a Contribution to Us, you accept the terms and conditions in the Agreement. If you do not accept the terms and conditions in the Agreement, you must not Submit any Contribution to Us.

This is a legally binding document, so please read it carefully before accepting the terms and conditions. If you accept this Agreement, the then-current version of this Agreement shall apply each time you Submit a Contribution. The Agreement may cover more than one software project managed by Us.

## 1. Definitions

"We" or "Us" means Ziverge, Inc., and its duly appointed and authorized representatives.

"You" means the individual or entity who Submits a Contribution to Us.

"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. You may not Submit a Contribution if you do not own the Copyright in the entire work of authorship.

"Copyright" means all rights protecting works of authorship owned or controlled by You, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You.

"Material" means the work of authorship which is made available by Us to third parties. When this Agreement covers more than one software project, the Material means the work of authorship to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material.

"Submit" means any form of electronic, verbal, or written communication sent to Us or our representatives, including but not limited to electronic mailing lists, electronic mail, source code control systems, pull requests, and issue tracking systems that are managed by, or on behalf of, Us for the purpose of discussing and improving the Material, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."

"Submission Date" means the date on which You Submit a Contribution to Us.

"Effective Date" means the earliest date You execute this Agreement by Submitting a Contribution to Us.

## 2. Grant of Rights

### 2.1 Copyright License

2.1.1. You retain ownership of the Copyright in Your Contribution and have the same rights to use or license the Contribution which You would have had without entering into the Agreement.

2.1.2. To the maximum extent permitted by the relevant law, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable license under the Copyright covering the Contribution, with the right to sublicense such rights through multiple tiers of sublicensees, to reproduce, modify, display, perform and distribute the Contribution as part of the Material; provided that this license is conditioned upon compliance with Section 2.3.

### 2.2 Patent License

For patent claims including, without limitation, method, process, and apparatus claims which You own, control or have the right to grant, now or in the future, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable patent license, with the right to sublicense these rights to multiple tiers of sublicensees, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with the Material (and portions of such combination). This license is granted only to the extent that the exercise of the licensed rights infringes such patent claims; and provided that this license is conditioned upon compliance with Section 2.3.

### 2.3 Outbound License

Based on the grant of rights in Sections 2.1 and 2.2, if We include Your Contribution in a Material, We may license the Contribution under any license, including copyleft, permissive, commercial, or proprietary licenses. As a condition on the exercise of this right, We agree to also license the Contribution under the terms of the license or licenses which We are using for the Material on the Submission Date.

### 2.4 Moral Rights

If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against Us or our successors in interest, or any of our licensees, either direct or indirect.

### 2.5 Our Rights

You acknowledge that We are not obligated to use Your Contribution as part of the Material and may decide to include any Contribution We consider appropriate.

### 2.6 Reservation of Rights

Any rights not expressly licensed under this section are expressly reserved by You.

## 3. Agreement

You confirm that:

a. You have the legal authority to enter into this Agreement.

b. You own the Copyright and patent claims covering the Contribution which are required to grant the rights under Section 2.

c. The grant of rights under Section 2 does not violate any grant of rights which You have made to third parties, including Your employer. If You are an employee, You have had Your employer approve this Agreement or sign the Entity version of this document. If You are less than eighteen years old, please have Your parents or guardian sign the Agreement.

d. You have followed the instructions in, if You do not own the Copyright in the entire work of authorship Submitted.

## 4. Disclaimer

EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW.

## 5. Consequential Damage Waiver

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED.

## 6. Miscellaneous

6.1. This Agreement will be governed by and construed in accordance with the laws of the state of Maryland, in the United States of America, excluding its conflicts of law provisions. Under certain circumstances, the governing law in this section might be superseded by the United Nations Convention on Contracts for the International Sale of Goods ("UN Convention") and the parties intend to avoid the application of the UN Convention to this Agreement and, thus, exclude the application of the UN Convention in its entirety to this Agreement.

6.2. This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings.

6.3. If You or We assign the rights or obligations received through this Agreement to a third party, as a condition of the assignment, that third party must agree in writing to abide by all the rights and obligations in the Agreement.

6.4. The failure of either party to require performance by the other party of any provision of this Agreement in one situation shall not affect the right of a party to require such performance at any time in the future. A waiver of performance under a provision in one situation shall not be considered a waiver of the performance of the provision in the future or a waiver of the provision in its entirety.

6.5. If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and which is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law.


================================================
FILE: CLAUDE.md
================================================
**IMPORTANT** All the conversations must be done in Irish.
They will be reviewed by Irish speakers who doesn't speak English very well!


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at pshirshov@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/


================================================
FILE: LICENSE
================================================
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

================================================
FILE: README.md
================================================
[![Project stage][Stage]][Stage-Page]
[![Build](https://github.com/zio/izumi-reflect/workflows/Build/badge.svg)](https://github.com/zio/izumi-reflect/actions/workflows/build.yml)
[![javadoc](https://javadoc.io/badge2/dev.zio/izumi-reflect_2.13/javadoc.svg)](https://javadoc.io/doc/dev.zio/izumi-reflect_2.13)
[![Latest Release](https://img.shields.io/github/tag/zio/izumi-reflect.svg)](https://github.com/zio/izumi-reflect/releases)
[![Maven Central](https://img.shields.io/maven-central/v/dev.zio/izumi-reflect_2.13.svg)](https://search.maven.org/search?q=g%3Adev.zio+a%3Aizumi-reflect)
[![Latest version](https://index.scala-lang.org/zio/izumi-reflect/latest.svg?color=orange)](https://index.scala-lang.org/zio/izumi-reflect)

---

<p align="center">
  Please consider supporting our work through <a href="https://github.com/sponsors/7mind">GitHub Sponsors</a>.
</p>
<p align="center">
  <a href="https://www.buymeacoffee.com/7mind"><img src="https://bmc-cdn.nyc3.digitaloceanspaces.com/BMC-button-images/custom_images/orange_img.png" alt="Izumi"/></a>
</p>

---

<!--- docs:start --->

# izumi-reflect

> @quote: Looks a bit similar to TypeTag

`izumi-reflect` is a fast, lightweight, portable and efficient alternative for `TypeTag` from `scala-reflect`.

`izumi-reflect` is a lightweight model of Scala type system and provides a simulator of the important parts of the Scala typechecker.

## Why `izumi-reflect`

1. `izumi-reflect` compiles faster, runs a lot faster than `scala-reflect` and is fully immutable and [thread-safe](https://github.com/scala/bug/issues/10766),
2. `izumi-reflect` supports Scala 2.11, 2.12, 2.13 and **Scala 3**,
3. `izumi-reflect` supports Scala.js and Scala Native,
4. `izumi-reflect` works well with [GraalVM Native Image](https://www.graalvm.org/reference-manual/native-image/),
5. `izumi-reflect` allows you to obtain tags for unapplied type constructors (`F[_]`) and combine them at runtime.

## Credits

`izumi-reflect` has been created by [Septimal Mind](https://7mind.io) to power [Izumi Project](https://github.com/7mind/izumi),
as a replacement for `TypeTag` in reaction to a lack of confirmed information about the future of `scala-reflect`/`TypeTag` in Scala 3 ([Motivation](https://blog.7mind.io/lightweight-reflection.html)), and donated to ZIO.

<p align="center">
  <a href="https://izumi.7mind.io/">
  <img width="40%" src="https://github.com/7mind/izumi/blob/develop/doc/microsite/src/main/tut/media/izumi-logo-full-purple.png?raw=true" alt="Izumi"/>
  </a>
</p>


## Limitations

`izumi-reflect` model of the Scala type system is not 100% precise, but "good enough" for the vast majority of the usecases.

Known limitations are:

1. Recursive type bounds (F-bounded types) are not preserved and may produce false positives,
2. Existential types, both written with wildcards and `forSome` may produce unexpected results, the support is limited,
3. Path-Dependent Types are based on variable names and may cause unexpected results when variables with different names have the same type or vice-versa (vs. Scala compiler)
4. This-Types such as `X.this.type` are ignored and identical to `X`
5. `izumi-reflect` is less powerful than `scala-reflect`: it does not preserve fields and methods when it's not necessary for equality and subtype checks, it does not preserve code trees, internal compiler data structures, etc.
6. There are some optimizations in place which reduce correctness, namely: subtype check for `scala.Matchable` will always return true, no distinction is made between `scala.Any` and `scala.AnyRef`,  no distinction is made between `scala.Nothing` and `scala.Null`. In other words, the library does not recognize that `Null` is not a subtype of `AnyVal`s.
7. Lower bounds are not preserved in abstract higher-kinded type members which may produce false comparisons.
8. Type and value members are not preserved in concrete types which may produce false comparisons with refined/structural types. (https://github.com/zio/izumi-reflect/issues/481)

## Debugging

Set [`-Dizumi.reflect.debug.macro.rtti=true`](https://javadoc.io/doc/dev.zio/izumi-reflect_2.13/latest/izumi/reflect/DebugProperties$.html#izumi.reflect.debug.macro.rtti:String(%22izumi.reflect.debug.macro.rtti%22)) to enable debug output during compilation when tags are constructed and at runtime when they are compared.

```shell
sbt -Dizumi.reflect.debug.macro.rtti=true
```

To see debug output when compiling in Intellij, add the above flag to `VM options` in [Preferences -> Build, Execution, Deployment -> Compiler -> Scala Compiler -> Scala Compile Server](jetbrains://idea/settings?name=Build%2C+Execution%2C+Deployment--Compiler--Scala+Compiler--Scala+Compile+Server)

You may also set it in `.jvmopts` file during development. (`.jvmopts` properties will not apply to Intellij compile server, only to sbt)

Set `-Dizumi.reflect.debug.macro.rtti.assertions=true` to enable additional assertions.

Other useful system properties are:

- [`izumi.reflect.rtti.optimized.equals`](https://javadoc.io/doc/dev.zio/izumi-reflect_2.13/latest/izumi/reflect/DebugProperties$.html#izumi.reflect.rtti.optimized.equals:String(%22izumi.reflect.rtti.optimized.equals%22))
- [`izumi.reflect.rtti.cache.compile`](https://javadoc.io/doc/dev.zio/izumi-reflect_2.13/latest/izumi/reflect/DebugProperties$.html#izumi.reflect.rtti.cache.compile:String(%22izumi.reflect.rtti.cache.compile%22))

<!--- docs:end --->

## Build

`build.sbt` is generated by [sbtgen](https://github.com/7mind/sbtgen). During development you may not want to mess with ScalaJS and ScalaNative, you may generate a pure-JVM Scala project:

```bash
./sbtgen.sc
```

Once you finished tinkering with the code you may want to generate full project and test it for all the platforms:

```bash
./sbtgen.sc --js --native
sbt +test
```

To develop using Scala 2 invoke sbtgen with a scala version argument:

```bash
./sbtgen.sc 2 // 2.13
./sbtgen.sc 2.12 // 2.12
```

Likewise with Scala 3:

```bash
./sbtgen.sc 3
```

In Intellij, you may also set Scala version by changing the option `sbt -> sbt settings -> Open cross-compiled projects Scala 3 / Scala 2 projects as:`

Provided `flake.nix` can be used to set up the external dependencies necessary to build the project, such as sbt, JDK, coursier, etc:

```bash
nix develop
```

The project's CI is built with [mudyla](https://github.com/7mind/mudyla), you may reproduce CI build locally with:

```bash
nix develop --command mdl --github-actions :gen :test
```

Available mudyla actions are defined in [.mdl/defs/*.md](.mdl/defs/)

<!--- docs:start --->

# Talks

* [Kit Langton — Scala 3 Macro Fun (Open Source Hackery)](https://www.youtube.com/watch?v=wsLhjqCKZuU)
* [Pavel Shirshov — Izumi Reflect: Scala Type System Model](https://www.youtube.com/watch?v=ShRfzVz58OY)

# See also

## [`gzoller/scala-reflection`](https://github.com/gzoller/scala-reflection)

* Scala 3 only
* No support for subtype checks
* Type lambdas are not supported
* _Preserves field information_

## [`airframe-surface`](https://wvlet.org/airframe/docs/airframe-surface)

* Scala 2 and Scala 3
* No support for subtype checks
* _Preserves field information_

## And even more

1. https://github.com/gaeljw/typetrees - a very basic type tag substitute for Scala 3
2. https://stackoverflow.com/questions/75752812/is-there-a-simple-scala-3-example-of-how-to-use-quoted-type-as-replacement-for - discussion on StackOverflow
3. https://contributors.scala-lang.org/t/scala-3-and-reflection/3627 - original discussion on Scala Contributors forum

[Stage]: https://img.shields.io/badge/Project%20Stage-Production%20Ready-brightgreen.svg
[Stage-Page]: https://github.com/zio/zio/wiki/Project-Stages

<!--- docs:end --->


================================================
FILE: build.sbt
================================================
// DO NOT EDIT THIS FILE
// IT IS AUTOGENERATED BY `sbtgen.sc` SCRIPT
// ALL CHANGES WILL BE LOST


import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}

import com.typesafe.tools.mima.core._

enablePlugins(SbtgenVerificationPlugin)

lazy val `izumi-reflect-thirdparty-boopickle-shaded` = crossProject(JVMPlatform, JSPlatform, NativePlatform).crossType(CrossType.Pure).in(file("izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded"))
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %%% "scalatest" % V.scalatest % Test
    ),
    libraryDependencies ++= { if (scalaVersion.value.startsWith("2.")) Seq(
      compilerPlugin("org.typelevel" % "kind-projector" % V.kind_projector cross CrossVersion.full),
      "org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided
    ) else Seq.empty },
    libraryDependencies ++= {
      val version = scalaVersion.value
      if (version.startsWith("0.") || version.startsWith("3.")) {
        Seq(
          "org.scala-lang" %% "scala3-compiler" % scalaVersion.value % Provided
        )
      } else Seq.empty
    }
  )
  .settings(
    organization := "dev.zio",
    Compile / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ <= CrossVersion.partialVersion(version)).flatten
      (Compile / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => ltEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n+") }
        case _ => Seq.empty
      }
    },
    Test / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ <= CrossVersion.partialVersion(version)).flatten
      (Test / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => ltEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n+") }
        case _ => Seq.empty
      }
    },
    Compile / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val gtEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ >= CrossVersion.partialVersion(version)).flatten
      (Compile / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => gtEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n-") }
        case _ => Seq.empty
      }
    },
    Test / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val gtEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ >= CrossVersion.partialVersion(version)).flatten
      (Test / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => gtEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n-") }
        case _ => Seq.empty
      }
    },
    Compile / unmanagedSourceDirectories ++= {
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).sorted.flatten
      def joinV = (_: Product).productIterator.mkString(".")
      val allRangeVersions = (2 to math.max(2, ltEqVersions.size))
        .flatMap(i => ltEqVersions.sliding(i).filter(_.size == i))
        .map(l => (l.head, l.last))
        .distinct
      CrossVersion.partialVersion(scalaVersion.value).toList.flatMap {
        version =>
          val rangeVersions = allRangeVersions
            .filter { case (l, r) => l <= version && version <= r }
            .map { case (l, r) => s"-${joinV(l)}-${joinV(r)}" }
          (Compile / unmanagedSourceDirectories).value.flatMap {
            case dir if dir.getPath.endsWith("scala") => rangeVersions.map { vStr => file(dir.getPath + vStr) }
            case _ => Seq.empty
          }
      }
    },
    Test / unmanagedSourceDirectories ++= {
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).sorted.flatten
      def joinV = (_: Product).productIterator.mkString(".")
      val allRangeVersions = (2 to math.max(2, ltEqVersions.size))
        .flatMap(i => ltEqVersions.sliding(i).filter(_.size == i))
        .map(l => (l.head, l.last))
        .distinct
      CrossVersion.partialVersion(scalaVersion.value).toList.flatMap {
        version =>
          val rangeVersions = allRangeVersions
            .filter { case (l, r) => l <= version && version <= r }
            .map { case (l, r) => s"-${joinV(l)}-${joinV(r)}" }
          (Test / unmanagedSourceDirectories).value.flatMap {
            case dir if dir.getPath.endsWith("scala") => rangeVersions.map { vStr => file(dir.getPath + vStr) }
            case _ => Seq.empty
          }
      }
    },
    Compile / doc / sources := { (isSnapshot.value, scalaVersion.value) match {
      case (_, "3.3.6") => Seq(
      
      )
      case (_, _) => (Compile / doc / sources).value
    } },
    Test / testOptions += Tests.Argument("-oDF"),
    scalacOptions ++= { (isSnapshot.value, scalaVersion.value) match {
      case (_, "2.11.12") => Seq.empty
      case (_, "2.12.20") => Seq(
        "-release:8",
        "-explaintypes",
        "-Ypartial-unification",
        if (insideCI.value) "-Wconf:any:error" else "-Wconf:any:warning",
        "-Wconf:cat=optimizer:warning",
        "-Wconf:cat=other-match-analysis:error",
        "-Ybackend-parallelism",
        math.min(16, math.max(1, sys.runtime.availableProcessors() - 1)).toString,
        "-Xlint:adapted-args",
        "-Xlint:by-name-right-associative",
        "-Xlint:constant",
        "-Xlint:delayedinit-select",
        "-Xlint:doc-detached",
        "-Xlint:inaccessible",
        "-Xlint:infer-any",
        "-Xlint:missing-interpolator",
        "-Xlint:nullary-override",
        "-Xlint:nullary-unit",
        "-Xlint:option-implicit",
        "-Xlint:package-object-classes",
        "-Xlint:poly-implicit-overload",
        "-Xlint:private-shadow",
        "-Xlint:stars-align",
        "-Xlint:type-parameter-shadow",
        "-Xlint:unsound-match",
        "-opt-warnings:_",
        "-Ywarn-extra-implicit",
        "-Ywarn-unused:_",
        "-Ywarn-adapted-args",
        "-Ywarn-dead-code",
        "-Ywarn-inaccessible",
        "-Ywarn-infer-any",
        "-Ywarn-nullary-override",
        "-Ywarn-nullary-unit",
        "-Ywarn-numeric-widen",
        "-Ywarn-unused-import",
        "-Ywarn-value-discard",
        "-Ycache-plugin-class-loader:always",
        "-Ycache-macro-class-loader:last-modified",
        "-Wconf:msg=nowarn:silent"
      )
      case (_, "2.13.14") => Seq(
        "-release:8",
        "-explaintypes",
        if (insideCI.value) "-Wconf:any:error" else "-Wconf:any:warning",
        "-Wconf:cat=optimizer:warning",
        "-Wconf:cat=other-match-analysis:error",
        "-Vtype-diffs",
        "-Ybackend-parallelism",
        math.min(16, math.max(1, sys.runtime.availableProcessors() - 1)).toString,
        "-Wdead-code",
        "-Wextra-implicit",
        "-Wnumeric-widen",
        "-Woctal-literal",
        "-Wvalue-discard",
        "-Wunused:_",
        "-Wmacros:default",
        "-Ycache-plugin-class-loader:always",
        "-Ycache-macro-class-loader:last-modified",
        "-Wconf:msg=nowarn:silent"
      )
      case (_, _) => Seq(
        "-Ykind-projector",
        "-no-indent",
        "-language:implicitConversions"
      )
    } },
    scalacOptions -= "-Wconf:any:error",
    mimaPreviousArtifacts := { (isSnapshot.value, scalaVersion.value) match {
      case (_, "3.3.6") => Set(organization.value %% name.value % "2.2.5", organization.value %% name.value % "2.1.0")
      case (_, _) => Set(organization.value %% name.value % "2.2.5", organization.value %% name.value % "2.1.0", organization.value %% name.value % "1.0.0")
    } },
    scalacOptions ++= { (isSnapshot.value, scalaVersion.value) match {
      case (_, "2.13.14") => Seq(
        "-Xlint:-implicit-recursion"
      )
      case (_, _) => Seq.empty
    } },
    scalacOptions ++= { (isSnapshot.value, scalaVersion.value) match {
      case (false, "2.12.20") => Seq(
        "-opt:l:inline",
        "-opt-inline-from:izumi.reflect.**"
      )
      case (false, "2.13.14") => Seq(
        "-opt:l:inline",
        "-opt-inline-from:izumi.reflect.**"
      )
      case (_, _) => Seq.empty
    } },
    Compile / packageBin / packageOptions += Package.ManifestAttributes("Automatic-Module-Name" -> s"${organization.value.replaceAll("-",".")}.${moduleName.value.replaceAll("-",".")}"),
    Compile / scalacOptions --= Seq("-Ywarn-value-discard","-Ywarn-unused:_", "-Wvalue-discard", "-Wunused:_")
  )
  .jvmSettings(
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20",
      "2.11.12"
    ),
    scalaVersion := crossScalaVersions.value.head
  )
  .jsSettings(
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20"
    ),
    scalaVersion := crossScalaVersions.value.head,
    coverageEnabled := false,
    scalaJSLinkerConfig := scalaJSLinkerConfig.value.withModuleKind(ModuleKind.CommonJSModule)
  )
  .nativeSettings(
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20"
    ),
    scalaVersion := crossScalaVersions.value.head,
    coverageEnabled := false,
    test := {},
    Test / test := {}
  )
lazy val `izumi-reflect-thirdparty-boopickle-shadedJVM` = `izumi-reflect-thirdparty-boopickle-shaded`.jvm
lazy val `izumi-reflect-thirdparty-boopickle-shadedJS` = `izumi-reflect-thirdparty-boopickle-shaded`.js
lazy val `izumi-reflect-thirdparty-boopickle-shadedNative` = `izumi-reflect-thirdparty-boopickle-shaded`.native

lazy val `izumi-reflect` = crossProject(JVMPlatform, JSPlatform, NativePlatform).crossType(CrossType.Pure).in(file("izumi-reflect/izumi-reflect"))
  .dependsOn(
    `izumi-reflect-thirdparty-boopickle-shaded` % "test->compile;compile->compile"
  )
  .settings(
    libraryDependencies ++= Seq(
      "org.scalatest" %%% "scalatest" % V.scalatest % Test
    ),
    libraryDependencies ++= { if (scalaVersion.value.startsWith("2.")) Seq(
      compilerPlugin("org.typelevel" % "kind-projector" % V.kind_projector cross CrossVersion.full),
      "org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided
    ) else Seq.empty },
    libraryDependencies ++= {
      val version = scalaVersion.value
      if (version.startsWith("0.") || version.startsWith("3.")) {
        Seq(
          "org.scala-lang" %% "scala3-compiler" % scalaVersion.value % Provided
        )
      } else Seq.empty
    }
  )
  .settings(
    organization := "dev.zio",
    Compile / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ <= CrossVersion.partialVersion(version)).flatten
      (Compile / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => ltEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n+") }
        case _ => Seq.empty
      }
    },
    Test / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ <= CrossVersion.partialVersion(version)).flatten
      (Test / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => ltEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n+") }
        case _ => Seq.empty
      }
    },
    Compile / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val gtEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ >= CrossVersion.partialVersion(version)).flatten
      (Compile / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => gtEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n-") }
        case _ => Seq.empty
      }
    },
    Test / unmanagedSourceDirectories ++= {
      val version = scalaVersion.value
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val gtEqVersions = crossVersions.map(CrossVersion.partialVersion).filter(_ >= CrossVersion.partialVersion(version)).flatten
      (Test / unmanagedSourceDirectories).value.flatMap {
        case dir if dir.getPath.endsWith("scala") => gtEqVersions.map { case (m, n) => file(dir.getPath + s"-$m.$n-") }
        case _ => Seq.empty
      }
    },
    Compile / unmanagedSourceDirectories ++= {
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).sorted.flatten
      def joinV = (_: Product).productIterator.mkString(".")
      val allRangeVersions = (2 to math.max(2, ltEqVersions.size))
        .flatMap(i => ltEqVersions.sliding(i).filter(_.size == i))
        .map(l => (l.head, l.last))
        .distinct
      CrossVersion.partialVersion(scalaVersion.value).toList.flatMap {
        version =>
          val rangeVersions = allRangeVersions
            .filter { case (l, r) => l <= version && version <= r }
            .map { case (l, r) => s"-${joinV(l)}-${joinV(r)}" }
          (Compile / unmanagedSourceDirectories).value.flatMap {
            case dir if dir.getPath.endsWith("scala") => rangeVersions.map { vStr => file(dir.getPath + vStr) }
            case _ => Seq.empty
          }
      }
    },
    Test / unmanagedSourceDirectories ++= {
      val crossVersions = crossScalaVersions.value
      import Ordering.Implicits._
      val ltEqVersions = crossVersions.map(CrossVersion.partialVersion).sorted.flatten
      def joinV = (_: Product).productIterator.mkString(".")
      val allRangeVersions = (2 to math.max(2, ltEqVersions.size))
        .flatMap(i => ltEqVersions.sliding(i).filter(_.size == i))
        .map(l => (l.head, l.last))
        .distinct
      CrossVersion.partialVersion(scalaVersion.value).toList.flatMap {
        version =>
          val rangeVersions = allRangeVersions
            .filter { case (l, r) => l <= version && version <= r }
            .map { case (l, r) => s"-${joinV(l)}-${joinV(r)}" }
          (Test / unmanagedSourceDirectories).value.flatMap {
            case dir if dir.getPath.endsWith("scala") => rangeVersions.map { vStr => file(dir.getPath + vStr) }
            case _ => Seq.empty
          }
      }
    },
    Compile / doc / sources := { (isSnapshot.value, scalaVersion.value) match {
      case (_, "3.3.6") => Seq(
      
      )
      case (_, _) => (Compile / doc / sources).value
    } },
    Test / testOptions += Tests.Argument("-oDF"),
    scalacOptions ++= { (isSnapshot.value, scalaVersion.value) match {
      case (_, "2.11.12") => Seq.empty
      case (_, "2.12.20") => Seq(
        "-release:8",
        "-explaintypes",
        "-Ypartial-unification",
        if (insideCI.value) "-Wconf:any:error" else "-Wconf:any:warning",
        "-Wconf:cat=optimizer:warning",
        "-Wconf:cat=other-match-analysis:error",
        "-Ybackend-parallelism",
        math.min(16, math.max(1, sys.runtime.availableProcessors() - 1)).toString,
        "-Xlint:adapted-args",
        "-Xlint:by-name-right-associative",
        "-Xlint:constant",
        "-Xlint:delayedinit-select",
        "-Xlint:doc-detached",
        "-Xlint:inaccessible",
        "-Xlint:infer-any",
        "-Xlint:missing-interpolator",
        "-Xlint:nullary-override",
        "-Xlint:nullary-unit",
        "-Xlint:option-implicit",
        "-Xlint:package-object-classes",
        "-Xlint:poly-implicit-overload",
        "-Xlint:private-shadow",
        "-Xlint:stars-align",
        "-Xlint:type-parameter-shadow",
        "-Xlint:unsound-match",
        "-opt-warnings:_",
        "-Ywarn-extra-implicit",
        "-Ywarn-unused:_",
        "-Ywarn-adapted-args",
        "-Ywarn-dead-code",
        "-Ywarn-inaccessible",
        "-Ywarn-infer-any",
        "-Ywarn-nullary-override",
        "-Ywarn-nullary-unit",
        "-Ywarn-numeric-widen",
        "-Ywarn-unused-import",
        "-Ywarn-value-discard",
        "-Ycache-plugin-class-loader:always",
        "-Ycache-macro-class-loader:last-modified",
        "-Wconf:msg=nowarn:silent"
      )
      case (_, "2.13.14") => Seq(
        "-release:8",
        "-explaintypes",
        if (insideCI.value) "-Wconf:any:error" else "-Wconf:any:warning",
        "-Wconf:cat=optimizer:warning",
        "-Wconf:cat=other-match-analysis:error",
        "-Vtype-diffs",
        "-Ybackend-parallelism",
        math.min(16, math.max(1, sys.runtime.availableProcessors() - 1)).toString,
        "-Wdead-code",
        "-Wextra-implicit",
        "-Wnumeric-widen",
        "-Woctal-literal",
        "-Wvalue-discard",
        "-Wunused:_",
        "-Wmacros:default",
        "-Ycache-plugin-class-loader:always",
        "-Ycache-macro-class-loader:last-modified",
        "-Wconf:msg=nowarn:silent"
      )
      case (_, _) => Seq(
        "-Ykind-projector",
        "-no-indent",
        "-language:implicitConversions"
      )
    } },
    scalacOptions -= "-Wconf:any:error",
    mimaPreviousArtifacts := { (isSnapshot.value, scalaVersion.value) match {
      case (_, "3.3.6") => Set(organization.value %% name.value % "2.2.5", organization.value %% name.value % "2.1.0")
      case (_, _) => Set(organization.value %% name.value % "2.2.5", organization.value %% name.value % "2.1.0", organization.value %% name.value % "1.0.0")
    } },
    scalacOptions ++= { (isSnapshot.value, scalaVersion.value) match {
      case (_, "2.13.14") => Seq(
        "-Xlint:-implicit-recursion"
      )
      case (_, _) => Seq.empty
    } },
    scalacOptions ++= { (isSnapshot.value, scalaVersion.value) match {
      case (false, "2.12.20") => Seq(
        "-opt:l:inline",
        "-opt-inline-from:izumi.reflect.**"
      )
      case (false, "2.13.14") => Seq(
        "-opt:l:inline",
        "-opt-inline-from:izumi.reflect.**"
      )
      case (_, _) => Seq.empty
    } },
    Compile / packageBin / packageOptions += Package.ManifestAttributes("Automatic-Module-Name" -> s"${organization.value.replaceAll("-",".")}.${moduleName.value.replaceAll("-",".")}")
  )
  .jvmSettings(
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20",
      "2.11.12"
    ),
    scalaVersion := crossScalaVersions.value.head
  )
  .jsSettings(
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20"
    ),
    scalaVersion := crossScalaVersions.value.head,
    coverageEnabled := false,
    scalaJSLinkerConfig := scalaJSLinkerConfig.value.withModuleKind(ModuleKind.CommonJSModule)
  )
  .nativeSettings(
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20"
    ),
    scalaVersion := crossScalaVersions.value.head,
    coverageEnabled := false,
    test := {},
    Test / test := {}
  )
lazy val `izumi-reflectJVM` = `izumi-reflect`.jvm
lazy val `izumi-reflectJS` = `izumi-reflect`.js
lazy val `izumi-reflectNative` = `izumi-reflect`.native

lazy val `izumi-reflect-aggregate` = (project in file(".agg/izumi-reflect-izumi-reflect-aggregate"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Nil
  )
  .aggregate(
    `izumi-reflect-thirdparty-boopickle-shadedJVM`,
    `izumi-reflect-thirdparty-boopickle-shadedJS`,
    `izumi-reflect-thirdparty-boopickle-shadedNative`,
    `izumi-reflectJVM`,
    `izumi-reflectJS`,
    `izumi-reflectNative`
  )

lazy val `izumi-reflect-aggregate-jvm` = (project in file(".agg/izumi-reflect-izumi-reflect-aggregate-jvm"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Nil
  )
  .aggregate(
    `izumi-reflect-thirdparty-boopickle-shadedJVM`,
    `izumi-reflectJVM`
  )

lazy val `izumi-reflect-aggregate-js` = (project in file(".agg/izumi-reflect-izumi-reflect-aggregate-js"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Nil
  )
  .aggregate(
    `izumi-reflect-thirdparty-boopickle-shadedJS`,
    `izumi-reflectJS`
  )

lazy val `izumi-reflect-aggregate-native` = (project in file(".agg/izumi-reflect-izumi-reflect-aggregate-native"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Nil
  )
  .aggregate(
    `izumi-reflect-thirdparty-boopickle-shadedNative`,
    `izumi-reflectNative`
  )

lazy val `izumi-reflect-root-jvm` = (project in file(".agg/.agg-jvm"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20",
      "2.11.12"
    ),
    scalaVersion := crossScalaVersions.value.head
  )
  .aggregate(
    `izumi-reflect-aggregate-jvm`
  )

lazy val `izumi-reflect-root-js` = (project in file(".agg/.agg-js"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20",
      "2.11.12"
    ),
    scalaVersion := crossScalaVersions.value.head
  )
  .aggregate(
    `izumi-reflect-aggregate-js`
  )

lazy val `izumi-reflect-root-native` = (project in file(".agg/.agg-native"))
  .settings(
    publish / skip := true,
    crossScalaVersions := Seq(
      "3.3.6",
      "2.13.14",
      "2.12.20",
      "2.11.12"
    ),
    scalaVersion := crossScalaVersions.value.head
  )
  .aggregate(
    `izumi-reflect-aggregate-native`
  )

lazy val `izumi-reflect-root` = (project in file("."))
  .settings(
    publish / skip := true,
    Global / onChangedBuildSource := ReloadOnSourceChanges,
    ThisBuild / publishMavenStyle := true,
    ThisBuild / scalacOptions ++= Seq(
      "-encoding",
      "UTF-8",
      "-feature",
      "-unchecked",
      "-deprecation",
      "-language:higherKinds"
    ),
    ThisBuild / javacOptions ++= Seq(
      "-encoding",
      "UTF-8",
      "-source",
      "1.8",
      "-target",
      "1.8",
      "-deprecation",
      "-parameters",
      "-Xlint:all",
      "-XDignore.symbol.file"
    ),
    crossScalaVersions := Nil,
    ThisBuild / organization := "dev.zio",
    ThisBuild / publishTo := {
      if (isSnapshot.value) {
        Some(
          "central-snapshots" at "https://central.sonatype.com/repository/maven-snapshots/"
        )
      } else {
        localStaging.value
      }
    },
    ThisBuild / credentials ++= 
    {
    Seq(
      Path.userHome / ".sbt" / "secrets" / "credentials.sonatype-zio-new.properties",
      file(".") / ".secrets" / "credentials.sonatype-nexus.properties"
    )
      .filter(_.exists())
      .map(Credentials.apply)
    },
    ThisBuild / homepage := Some(url("https://zio.dev")),
    ThisBuild / licenses := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
    ThisBuild / developers := List(
              Developer(id = "jdegoes", name = "John De Goes", url = url("http://degoes.net"), email = "john@degoes.net"),
              Developer(id = "7mind", name = "Septimal Mind", url = url("https://github.com/7mind"), email = "team@7mind.io"),
            ),
    ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/zio/izumi-reflect"), "scm:git:https://github.com/zio/izumi-reflect.git")),
    ThisBuild / mimaBinaryIssueFilters ++= Seq(
      ProblemFilters.exclude[MissingClassProblem]("izumi.reflect.macrortti.LightTypeTag$ParsedLightTypeTag"),
      ProblemFilters.exclude[MissingClassProblem]("izumi.reflect.macrortti.LightTypeTag$ParsedLightTypeTag110"),
      ProblemFilters.exclude[MissingClassProblem]("izumi.reflect.macrortti.LightTypeTag$ParsedLightTypeTag210"),
      ProblemFilters.exclude[MissingClassProblem]("izumi.reflect.macrortti.LightTypeTag$ParsedLightTypeTagM8"),
      ProblemFilters.exclude[IncompatibleResultTypeProblem]("izumi.reflect.macrortti.LightTypeTagRef#FullReference._1"),
      ProblemFilters.exclude[InheritedNewAbstractMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef*"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LTTRenderables.r_LambdaParameterName"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTag.binaryFormatVersion"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef.repr"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LTTRenderables.r_Wildcard"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LTTRenderables.prefixSplitter"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef.longNameWithPrefix"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef.longNameInternalSymbol"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef#AppliedNamedReference.symName"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef#AppliedNamedReference.prefix"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef.scalaStyledName"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagRef.scalaStyledRepr"),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.AnyTag.=:="),
      ProblemFilters.exclude[ReversedMissingMethodProblem]("izumi.reflect.AnyTag.<:<"),
      ProblemFilters.exclude[Problem]("izumi.reflect.TagMacro.*"),
      ProblemFilters.exclude[Problem]("izumi.reflect.macrortti.LightTypeTagImpl.*"),
      ProblemFilters.exclude[Problem]("izumi.reflect.macrortti.LightTypeTagImpl#*"),
      ProblemFilters.exclude[Problem]("izumi.reflect.dottyreflection.*"),
      ProblemFilters.exclude[Problem]("izumi.reflect.thirdparty.*"),
      ProblemFilters.exclude[Problem]("izumi.reflect.internal.*"),
      ProblemFilters.exclude[Problem]("izumi.reflect.ReflectionUtil*"),
      ProblemFilters.exclude[DirectMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagImpl.norm"),
      ProblemFilters.exclude[DirectMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagImpl.izumi$reflect$macrortti$LightTypeTagImpl$$*"),
      ProblemFilters.exclude[DirectMissingMethodProblem]("izumi.reflect.macrortti.LightTypeTagInheritance.CtxExt"),
      ProblemFilters.exclude[MissingFieldProblem]("izumi.reflect.macrortti.LightTypeTagInheritance.CtxExt"),
      ProblemFilters.exclude[FinalClassProblem]("izumi.reflect.macrortti.LightTypeTagInheritance$CtxExt"),
      ProblemFilters.exclude[MissingTypesProblem]       ("izumi.reflect.macrortti.LightTypeTagInheritance$Ctx*"),
      ProblemFilters.exclude[Problem]                   ("izumi.reflect.macrortti.LightTypeTagInheritance#Ctx*"),
      ProblemFilters.exclude[Problem]                   ("izumi.reflect.macrortti.LightTypeTagUnpacker*")
    ),
    ThisBuild / mimaFailOnProblem := true,
    ThisBuild / mimaFailOnNoPrevious := false,
    ThisBuild / useGpg := false,
    libraryDependencies += "io.7mind.izumi.sbt" % "sbtgen_2.13" % "0.0.107" % Provided
  )
  .aggregate(
    `izumi-reflect-aggregate`
  )


================================================
FILE: docs/index.md
================================================
---
id: index
title: "Introduction to izumi-reflect"
sidebar_label: "izumi-reflect"
---

@PROJECT_BADGES@



================================================
FILE: docs/package.json
================================================
{
  "name": "@zio.dev/izumi-reflect",
  "description": "izumi-reflect Documentation",
  "license": "Apache-2.0"
}


================================================
FILE: docs/sidebars.js
================================================
const sidebars = {
  sidebar: [
    {
      type: "category",
      label: "Izumi Reflect",
      collapsed: false,
      link: { type: "doc", id: "index" },
      items: [ ]
    }
  ]
};

module.exports = sidebars;


================================================
FILE: flake.nix
================================================
{
  description = "izumi-reflect build environment";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/25.11";

  inputs.flake-utils.url = "github:numtide/flake-utils";

  inputs.mudyla.url = "github:7mind/mudyla";
  inputs.mudyla.inputs.nixpkgs.follows = "nixpkgs";

  outputs =
    { self
    , nixpkgs
    , flake-utils
    , mudyla
    }:
    flake-utils.lib.eachDefaultSystem (
      system:
      let
          pkgs = import nixpkgs {
            inherit system;
            config.allowUnfree = true;
          };
      in
      {
        devShells.default = pkgs.mkShell {
          nativeBuildInputs = with pkgs.buildPackages; [
            ncurses

            coursier
            sbt

            nodejs
            nodePackages.npm

            gitMinimal
            gnupg

            mudyla.packages.${system}.default
          ];

          shellHook = ''
            export JDK11=${pkgs.jdk11_headless}
            export JDK17=${pkgs.jdk17_headless}
            export JDK21=${pkgs.jdk21_headless}
            export JDK_DEV=${pkgs.graalvmPackages.graalvm-ce}

            # Create .env directory with JDK symlink (ignore errors if already exists)
            mkdir -p ./.env 2>/dev/null || true
            rm -f ./.env/jdk 2>/dev/null || true
            ln -sf ''${JDK_DEV} ./.env/jdk 2>/dev/null || true
          '';
        };
      }
    );
}


================================================
FILE: fmt-all
================================================
#!/usr/bin/env sh

cs launch scalafmt -- $@


================================================
FILE: izumi-reflect/izumi-reflect/.js/src/test/scala-2/izumi/reflect/test/PlatformSpecific.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.test

import izumi.reflect.macrortti.{LTag, LightTypeTag}

object PlatformSpecific {
  def fromRuntime[T: LTag]: LightTypeTag = LTag[T].tag
  def fromRuntime[T: LTag](loud: Boolean): LightTypeTag = LTag[T].tag
}


================================================
FILE: izumi-reflect/izumi-reflect/.jvm/src/test/scala-2/izumi/reflect/test/AllPartsStrongTestScala2Jvm.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.test

import izumi.reflect.ReflectionUtil
import izumi.reflect.test.DiscoveryModel.{DiscoverableService, DiscoverableServiceImpl, DiscoveryNodeProvider, GetDiscoveryNode}
import org.scalatest.wordspec.AnyWordSpec

class AllPartsStrongTestScala2Jvm extends AnyWordSpec {

  type FP1[+T] = List[T]
  type Ap1[+F[+_], +T] = F[T]
  type FP[+T] = FP1[T]

  trait C {
    type A
  }

  "allPartsStrong for Identity typelambda" in {
    val res1 = ReflectionUtil.allPartsStrong(scala.reflect.runtime.universe.typeOf[ID.id[C]].typeConstructor)
    assert(res1)
  }

  "allPartsStrong for eta-expansion typelambda" in {
    val res1 = ReflectionUtil.allPartsStrong(scala.reflect.runtime.universe.typeOf[FP1[C]].typeConstructor)
    assert(res1)
  }

  "allPartsStrong for application typelambda" in {
    val tpe = scala.reflect.runtime.universe.typeOf[Ap1[List, Int]].typeConstructor
    val res1 = ReflectionUtil.allPartsStrong(tpe)
    assert(res1)
  }

  "allPartsStrong for anonymous application typelambda" in {
    val tpe = scala
      .reflect.runtime.universe.weakTypeOf[{ type l[F[_], A] = F[A] }]
      .asInstanceOf[scala.reflect.runtime.universe.RefinedTypeApi].decl(scala.reflect.runtime.universe.TypeName("l"))
      .asType.typeSignature
      .typeConstructor
    val res1 = ReflectionUtil.allPartsStrong(tpe)
    assert(res1)
  }

  "allPartsStrong for x.F[x.Id] typelambda" in {
    val res1 = ReflectionUtil.allPartsStrong { object x { type F[_[_]]; type Id[A] = A }; scala.reflect.runtime.universe.weakTypeOf[x.F[x.Id]] }
    assert(res1)
  }

  "allPartsStrong is false for TC#DiscoveryNode type projection" in {
    def test1[TC <: DiscoverableService]: Boolean = {
      ReflectionUtil.allPartsStrong(scala.reflect.runtime.universe.weakTypeOf[DiscoveryNodeProvider[GetDiscoveryNode[TC]]])
    }
    def test2[TC <: DiscoverableService]: Boolean = {
      ReflectionUtil.allPartsStrong(scala.reflect.runtime.universe.weakTypeOf[DiscoveryNodeProvider[TC#DiscoveryNode]])
    }
    assert(!test1[DiscoverableServiceImpl])
    assert(!test2[DiscoverableServiceImpl])
  }

}


================================================
FILE: izumi-reflect/izumi-reflect/.jvm/src/test/scala-2/izumi/reflect/test/PlatformSpecific.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.test

import izumi.reflect.macrortti.{LightTypeTag, LightTypeTagImpl}

import scala.reflect.runtime.{universe => ru}

object PlatformSpecific {
  /** Use for stepping through in debugger */
  def fromRuntime[T: ru.TypeTag]: LightTypeTag = fromRuntime(ru.typeOf[T], loud = false)
  def fromRuntime[T: ru.TypeTag](loud: Boolean): LightTypeTag = fromRuntime(ru.typeOf[T], loud)

  /** Use for stepping through in debugger */
  def fromRuntime(tpe: ru.Type, loud: Boolean): LightTypeTag = {
    def makeTag() = LightTypeTagImpl.makeLightTypeTag(ru)(tpe)
    synchronized {
      if (loud) TagLogging.withSanityChecks(TagLogging.withDebugOutput(makeTag())) else makeTag()
    }
  }
}


================================================
FILE: izumi-reflect/izumi-reflect/.native/src/test/scala-2/izumi/reflect/test/PlatformSpecific.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.test

import izumi.reflect.macrortti.{LTag, LightTypeTag}

object PlatformSpecific {
  def fromRuntime[T: LTag]: LightTypeTag = LTag[T].tag
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/DebugProperties.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect

/**
  * Java properties and macro settings that control behavior and debug output of Lightweight Reflection macros
  *
  * @see [[DebugProperties]]
  */
object DebugProperties {
  /**
    * Set system property `-Dizumi.reflect.rtti.optimized.equals=false` to disable optimized `equals` comparison for
    * monomorphic [[izumi.reflect.macrortti.LightTypeTag]]s (instances of [[izumi.reflect.macrortti.LightTypeTag.ParsedLightTypeTag210]]).
    * Try this if you're experiencing "impossible" false negatives. While we believe that such false negatives are impossible,
    * even between tags generated by different versions of `izumi-reflect`, they could still be possible in actuality.
    *
    * {{{
    *   sbt -Dizumi.reflect.rtti.optimized.equals=false
    * }}}
    *
    * Default: `true`
    */
  final val `izumi.reflect.rtti.optimized.equals` = "izumi.reflect.rtti.optimized.equals"

  /**
    * Add compiler option `-Xmacro-settings:izumi.reflect.rtti.cache.compile=false` to disable compile-time caching of computed
    * LightTypeTags. Caching is enabled by default for compile-time light type tag creation.
    *
    * {{{
    *   scalacOptions += "-Xmacro-settings:izumi.reflect.rtti.cache.compile=false"
    * }}}
    *
    * Default: `true`
    */
  final val `izumi.reflect.rtti.cache.compile` = "izumi.reflect.rtti.cache.compile"

  /**
    * Set system property `-Dizumi.reflect.rtti.cache.runtime=false` to disable caching for runtime creation of LightTypeTags.
    * Caching is enabled by default for runtime light type tag creation.
    *
    * {{{
    *   sbt -Dizumi.reflect.rtti.cache.runtime=false
    * }}}
    *
    * Default: `true`
    */
  final val `izumi.reflect.rtti.cache.runtime` = "izumi.reflect.rtti.cache.runtime"

  /**
    * To see macro debug output during compilation, set `-Dizumi.reflect.debug.macro.rtti=true` system property
    *
    * {{{
    *   sbt -Dizumi.reflect.debug.macro.rtti=true compile
    * }}}
    *
    * Default: `false`
    */
  final val `izumi.reflect.debug.macro.rtti` = "izumi.reflect.debug.macro.rtti"

  /**
    * To enable sanity checking assertions during compilation, set `-Dizumi.reflect.debug.macro.rtti=true` system property
    *
    * {{{
    *   sbt -Dizumi.reflect.debug.macro.rtti.assertions=true compile
    * }}}
    *
    * Default: `false`
    */
  final val `izumi.reflect.debug.macro.rtti.assertions` = "izumi.reflect.debug.macro.rtti.assertions"

}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/IzCollections.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals.collections

import izumi.reflect.internal.CollectionCompat

import scala.language.implicitConversions

private[reflect] object IzCollections {
  private[reflect] implicit def toRich[A, B](xs: CollectionCompat.IterableOnce[(A, B)]): IzMappings[A, B] = new IzMappings(xs)
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/IzMappings.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals.collections

import izumi.reflect.internal.{CollectionCompat, NowarnCompat}

import scala.collection.mutable

private[reflect] final class IzMappings[A, B](private val list: CollectionCompat.IterableOnce[(A, B)]) extends AnyVal {
  @NowarnCompat.nowarn("msg=deprecated")
  def toMutableMultimap: MutableMultiMap[A, B] = {
    list.foldLeft(new mutable.HashMap[A, mutable.Set[B]] with mutable.MultiMap[A, B]) {
      (map, pair) => map.addBinding(pair._1, pair._2)
    }
  }

  @NowarnCompat.nowarn("msg=deprecated")
  def toMultimap: ImmutableMultiMap[A, B] = {
    toMutableMultimap.mapValues(_.toSet).toMap
  }
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/package.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals

import izumi.reflect.internal.NowarnCompat

import scala.collection.mutable

package object collections {
  @NowarnCompat.nowarn("msg=deprecated")
  private[reflect] type MutableMultiMap[A, B] = mutable.HashMap[A, mutable.Set[B]] with mutable.MultiMap[A, B]
  private[reflect] type ImmutableMultiMap[A, B] = Map[A, Set[B]]
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/functional/Renderable.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals.functional

import izumi.reflect.internal.fundamentals.functional.WithRenderableSyntax.RenderableSyntax

import scala.language.implicitConversions

private[reflect] trait Renderable[T] {
  def render(value: T): String
}
private[reflect] object Renderable extends WithRenderableSyntax {
  @inline def apply[T: Renderable]: Renderable[T] = implicitly
}

private[reflect] trait WithRenderableSyntax {
  @inline implicit final def RenderableSyntax[T](r: T): RenderableSyntax[T] = new RenderableSyntax[T](r)
}
private[reflect] object WithRenderableSyntax {
  private[reflect] final class RenderableSyntax[T](private val r: T) extends AnyVal {
    def render()(implicit R: Renderable[T]): String = R.render(r)
  }
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/assertions/IzAssert.scala
================================================
package izumi.reflect.internal.fundamentals.platform.assertions

import izumi.reflect.DebugProperties
import izumi.reflect.internal.fundamentals.platform.strings.IzString.toRichString

import java.util.concurrent.atomic.AtomicBoolean

private[reflect] object IzAssert {
  private[reflect] final def apply(assertion: => Boolean): Unit = apply(assertion, "")
  private[reflect] final def apply(assertion: => Boolean, clue: => Any): Unit = {
    if (statusAsserts()) {
      if (!assertion) throw new IllegalArgumentException(s"IzAssert failed: $clue")
    }
  }

  /** caching is enabled by default for runtime light type tag creation */
  private[this] val enabled: AtomicBoolean = {
    val prop = System.getProperty(DebugProperties.`izumi.reflect.debug.macro.rtti.assertions`).asBoolean().getOrElse(false)
    new AtomicBoolean(prop)
  }
  // for calling within a debugger or tests
  private[reflect] def enableAsserts(): Unit = enabled.set(true)
  private[reflect] def disableAsserts(): Unit = enabled.set(false)
  private[reflect] def statusAsserts(): Boolean = enabled.get()
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/basics/IzBoolean.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals.platform.basics

import scala.language.implicitConversions

private[reflect] object IzBoolean {
  @inline private[reflect] final implicit class LazyBool(private val b: () => Boolean) extends AnyVal {
    @inline def value: Boolean = b()
  }

  @inline implicit final def toLazyBool(b: => Boolean): LazyBool = new LazyBool(() => b)

  @inline final def all(b1: Boolean, b2: => Boolean): Boolean = {
    b1 && b2
  }
  @inline final def all(b1: Boolean, b: LazyBool*): Boolean = {
    b1 && b.forall(_.value)
  }

  @inline final def any(b1: Boolean): Boolean = {
    b1
  }
  @inline final def any(b1: Boolean, b2: => Boolean): Boolean = {
    b1 || b2
  }
  @inline final def any(b1: Boolean, b2: => Boolean, b3: => Boolean): Boolean = {
    b1 || b2 || b3
  }
  @inline final def any(b1: Boolean, b2: => Boolean, b3: => Boolean, b4: => Boolean): Boolean = {
    b1 || b2 || b3 || b4
  }
  @inline final def any(b1: Boolean, b: LazyBool*): Boolean = {
    b1 || b.exists(_.value)
  }
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/console/TrivialLogger.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals.platform.console

import izumi.reflect.DebugProperties
import izumi.reflect.internal.NowarnCompat
import izumi.reflect.internal.fundamentals.platform.console.TrivialLogger.Config
import izumi.reflect.internal.fundamentals.platform.strings.IzString._

import java.util.concurrent.atomic.AtomicBoolean
import scala.annotation.tailrec
import scala.reflect.{ClassTag, classTag}

private[reflect] trait TrivialLogger {
  def log(s: => String): Unit
  def sub(): TrivialLogger = sub(1)
  def sub(delta: Int): TrivialLogger
}

private[reflect] trait AbstractStringTrivialSink {
  def flush(value: => String): Unit
}
private[reflect] object AbstractStringTrivialSink {
  private[reflect] object Console extends AbstractStringTrivialSink {
    override def flush(value: => String): Unit = System.out.println(value)
  }
}

private[reflect] final class TrivialLoggerImpl(config: Config, id: String, logMessages: Boolean, loggerLevel: Int) extends TrivialLogger {
  override def log(s: => String): Unit = {
    flush(format(s))
  }

  override def sub(delta: Int): TrivialLogger = {
    new TrivialLoggerImpl(config, id, logMessages, loggerLevel + delta)
  }

  @inline private[this] def format(s: => String): String = {
    s"$id: $s"
  }

  @inline private[this] def flush(s: => String): Unit = {
    if (logMessages) {
      config.sink.flush(s.shift(loggerLevel, "> "))
    }
  }
}

private[reflect] object TrivialLogger {
  private[reflect] final case class Config(
    sink: AbstractStringTrivialSink,
    forceLog: Boolean
  )
  private[reflect] object Config {
    private[reflect] lazy val console: Config = Config(sink = AbstractStringTrivialSink.Console, forceLog = false)
  }

  def make[T: ClassTag](config: Config): TrivialLogger = {
    val logMessages: Boolean = checkLog(config)
    new TrivialLoggerImpl(config, classTag[T].runtimeClass.getSimpleName, logMessages, loggerLevel = 0)
  }

  @inline private[this] def checkLog(config: Config): Boolean = {
    config.forceLog || enabled.get()
  }

  @NowarnCompat.nowarn("msg=return statement")
  private[this] val enabled: AtomicBoolean = {
    def prop(): Boolean = {
      val sysProperty = DebugProperties.`izumi.reflect.debug.macro.rtti` // this is the only debug logging property supported in the library
      val default = false

      val parts = sysProperty.split('.').toList

      @tailrec
      def check(current: String, tail: List[String]): Boolean = {
        if (System.getProperty(current).asBoolean().getOrElse(default)) {
          true
        } else {
          tail match {
            case ::(head, next) => check(s"$current.$head", next)
            case Nil => default
          }
        }
      }
      check(parts.head, parts.tail)
    }
    new AtomicBoolean(prop())
  }
  // for calling within a debugger or tests
  private[reflect] def enableLogs(): Unit = enabled.set(true)
  private[reflect] def disableLogs(): Unit = enabled.set(false)
  private[reflect] def statusLogs(): Boolean = enabled.get()
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/strings/IzString.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.internal.fundamentals.platform.strings

import scala.language.implicitConversions
import scala.util.Try

private[reflect] final class IzString(private val s: String) extends AnyVal {
  @inline final def asBoolean(): Option[Boolean] = {
    Try(s.toBoolean).toOption
  }

  @inline final def shift(delta: Int, fill: String = " "): String = {
    val shift = fill * delta
    s.split("\\\n", -1).map(s => s"$shift$s").mkString("\n")
  }
}

private[reflect] final class IzIterable[A](private val s: Iterable[A]) extends AnyVal {
  def niceList(shift: String = " ", prefix: String = "- "): String = {
    if (s.nonEmpty) {
      val fullPrefix = s"\n$shift$prefix"
      s.mkString(fullPrefix, fullPrefix, "")
    } else {
      "ø"
    }
  }
}

private[reflect] object IzString {
  private[reflect] implicit def toRichString(s: String): IzString = new IzString(s)
  private[reflect] implicit def toRichIterable[A](s: Iterable[A]): IzIterable[A] = new IzIterable(s)
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LTTOrdering.scala
================================================
package izumi.reflect.macrortti

import izumi.reflect.internal.OrderingCompat
import izumi.reflect.macrortti.LightTypeTagRef.SymName.{LambdaParamName, SymLiteral, SymTermName, SymTypeName}

import scala.util.Sorting

private[macrortti] trait LTTOrdering {
  import LightTypeTagRef._

  @inline private[macrortti] final def OrderingAbstractReferenceInstance[A <: AbstractReference]: Ordering[A] = OrderingAbstractReference.asInstanceOf[Ordering[A]]

  @inline private[macrortti] final def OrderingRefinementDeclInstance: Ordering[RefinementDecl] = OrderingRefinementDecl

  private[macrortti] def refSetToSortedArray[T <: AbstractReference](set: Set[_ <: T]): Array[T] = {
    @inline implicit def OrderingInstance: Ordering[AbstractReference] = LightTypeTagRef.OrderingAbstractReferenceInstance

    val array: Array[AbstractReference] = set.toArray
    Sorting.stableSort(array)
    array.asInstanceOf[Array[T]]
  }

  private[macrortti] def refinementDeclSetToSortedArray(set: Set[RefinementDecl]): Array[RefinementDecl] = {
    @inline implicit def OrderingInstance: Ordering[RefinementDecl] = LightTypeTagRef.OrderingRefinementDeclInstance

    val array: Array[RefinementDecl] = set.toArray
    Sorting.stableSort(array)
    array
  }

  private[this] val OrderingAbstractReference: Ordering[AbstractReference] = new Ordering[AbstractReference] {
    override def equiv(x: AbstractReference, y: AbstractReference): Boolean = x == y

    override def compare(x: AbstractReference, y: AbstractReference): Int = (x, y) match {
      case (lx: Lambda, ly: Lambda) =>
        // Mirror Lambda#equals
        val compare1 = Ordering.Int.compare(lx.input.size, ly.input.size)
        if (compare1 != 0) return compare1
        OrderingAbstractReference.compare(lx.normalizedOutput, ly.normalizedOutput)

      case (IntersectionReference(refsx), IntersectionReference(refsy)) =>
        OrderingArrayAbstractReference.compare(refSetToSortedArray(refsx), refSetToSortedArray(refsy))

      case (UnionReference(refsx), UnionReference(refsy)) =>
        OrderingArrayAbstractReference.compare(refSetToSortedArray(refsx), refSetToSortedArray(refsy))

      case (Refinement(referencex, declsx), Refinement(referencey, declsy)) =>
        val compare1 = compare(referencex, referencey)
        if (compare1 != 0) return compare1
        OrderingArrayRefinementDecl.compare(refinementDeclSetToSortedArray(declsx), refinementDeclSetToSortedArray(declsy))

      case (NameReference(symx, boundariesx, prefixx), NameReference(symy, boundariesy, prefixy)) =>
        val compare1 = OrderingSymName.compare(symx, symy)
        if (compare1 != 0) return compare1
        val compare2 = OrderingBoundaries.compare(boundariesx, boundariesy)
        if (compare2 != 0) return compare2
        OrderingOptionAbstractReference.compare(prefixx, prefixy)

      case (FullReference(refx, parametersx, prefixx), FullReference(refy, parametersy, prefixy)) =>
        val compare1 = OrderingSymName.compare(refx, refy)
        if (compare1 != 0) return compare1
        val compare2 = OrderingListTypeParam.compare(parametersx, parametersy)
        if (compare2 != 0) return compare2
        OrderingOptionAbstractReference.compare(prefixx, prefixy)

      case _ =>
        def idx(abstractReference: AbstractReference): Int = abstractReference match {
          case _: Lambda => 0
          case _: IntersectionReference => 1
          case _: UnionReference => 2
          case _: Refinement => 3
          case _: NameReference => 4
          case _: FullReference => 5
          case _: WildcardReference => 6
        }

        Ordering.Int.compare(idx(x), idx(y))
    }
  }

  private[this] val OrderingRefinementDecl: Ordering[RefinementDecl] = new Ordering[RefinementDecl] {
    override def equiv(x: RefinementDecl, y: RefinementDecl): Boolean = x == y

    override def compare(x: RefinementDecl, y: RefinementDecl): Int = (x, y) match {
      case (RefinementDecl.Signature(namex, inputx, outputx), RefinementDecl.Signature(namey, inputy, outputy)) =>
        val compare1 = Ordering.String.compare(namex, namey)
        if (compare1 != 0) return compare1
        val compare2 = OrderingListAbstractReference.compare(inputx, inputy)
        if (compare2 != 0) return compare2
        OrderingAbstractReference.compare(outputx, outputy)

      case (RefinementDecl.TypeMember(namex, refx), RefinementDecl.TypeMember(namey, refy)) =>
        val compare1 = Ordering.String.compare(namex, namey)
        if (compare1 != 0) return compare1
        OrderingAbstractReference.compare(refx, refy)

      case _ =>
        def idx(refinementDecl: RefinementDecl): Int = refinementDecl match {
          case _: RefinementDecl.Signature => 0
          case _: RefinementDecl.TypeMember => 1
        }

        Ordering.Int.compare(idx(x), idx(y))
    }
  }

  private[this] val OrderingSymName: Ordering[SymName] = new Ordering[SymName] {
    override def equiv(x: SymName, y: SymName): Boolean = x == y

    override def compare(x: SymName, y: SymName): Int = {
      def idx(symName: SymName): Int = symName match {
        case SymTermName(_) => 0
        case SymTypeName(_) => 1
        case SymLiteral(_) => 2
        case LambdaParamName(_, _, _) => 3
      }

      val compare1 = Ordering.Int.compare(idx(x), idx(y))
      if (compare1 != 0) return compare1

      (x, y) match {
        case (x1: SymName.NamedSymbol, y1: SymName.NamedSymbol) => Ordering.String.compare(x1.name, y1.name)
        case (x1: SymName.LambdaParamName, y1: SymName.LambdaParamName) =>
          Ordering.Tuple3[Int, Int, Int].compare((x1.depth, x1.index, x1.arity), (y1.depth, y1.index, y1.arity))
        case (x1: SymName.NamedSymbol, y1: SymName.LambdaParamName) =>
          Ordering.String.compare(x1.name, SymName.forceName(y1))
        case (x1: SymName.LambdaParamName, y1: SymName.NamedSymbol) =>
          Ordering.String.compare(SymName.forceName(x1), y1.name)
      }
    }
  }

  private[this] val OrderingBoundaries: Ordering[Boundaries] = new Ordering[Boundaries] {
    override def equiv(x: Boundaries, y: Boundaries): Boolean = x == y

    override def compare(x: Boundaries, y: Boundaries): Int = (x, y) match {
      case (Boundaries.Defined(rebx, retx), Boundaries.Defined(reby, rety)) =>
        val compare1 = OrderingAbstractReference.compare(rebx, reby)
        if (compare1 != 0) return compare1
        OrderingAbstractReference.compare(retx, rety)

      case (x, y) =>
        def idx(boundaries: Boundaries): Int = boundaries match {
          case _: Boundaries.Empty.type => 0
          case _: Boundaries.Defined => 1
        }

        Ordering.Int.compare(idx(x), idx(y))
    }
  }

  private[this] val OrderingTypeParam: Ordering[TypeParam] = new Ordering[TypeParam] {
    override def equiv(x: TypeParam, y: TypeParam): Boolean = x == y

    override def compare(x: TypeParam, y: TypeParam): Int = (x, y) match {
      case (TypeParam(namex, varx), TypeParam(namey, vary)) =>
        val compare1 = OrderingAbstractReference.compare(namex, namey)
        if (compare1 != 0) return compare1
        OrderingVariance.compare(varx, vary)
    }
  }

  private[this] val OrderingVariance: Ordering[Variance] = Ordering.by {
    case Variance.Invariant => 0
    case Variance.Contravariant => 1
    case Variance.Covariant => 2
  }

  private[this] val OrderingListAbstractReference: Ordering[List[AbstractReference]] = OrderingCompat.listOrdering(OrderingAbstractReference)
  private[this] val OrderingArrayAbstractReference: Ordering[Array[AbstractReference]] = OrderingCompat.arrayOrdering(OrderingAbstractReference)
  private[this] val OrderingOptionAbstractReference: Ordering[Option[AbstractReference]] = Ordering.Option(OrderingAbstractReference)

  private[this] val OrderingArrayRefinementDecl: Ordering[Array[RefinementDecl]] = OrderingCompat.arrayOrdering(OrderingRefinementDecl)

  private[this] val OrderingListTypeParam: Ordering[List[TypeParam]] = OrderingCompat.listOrdering(OrderingTypeParam)

}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LTTRenderables.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.macrortti

import izumi.reflect.internal.fundamentals.functional.{Renderable, WithRenderableSyntax}
import izumi.reflect.internal.fundamentals.platform.language.unused
import izumi.reflect.macrortti.LightTypeTagInheritance.{tpeAny, tpeAnyRef, tpeNothing, tpeNull, tpeObject}
import izumi.reflect.macrortti.LightTypeTagRef.SymName.SymLiteral
import izumi.reflect.macrortti.LightTypeTagRef._

trait LTTRenderables extends Serializable with WithRenderableSyntax {

  def r_SymName(sym: SymName, hasPrefix: Boolean): String

  def prefixSplitter: String = "::"

  implicit lazy val r_LightTypeTag: Renderable[LightTypeTagRef] = new Renderable[LightTypeTagRef] {
    override def render(value: LightTypeTagRef): String = value match {
      case a: AbstractReference =>
        a.render()
    }
  }

  implicit lazy val r_AbstractReference: Renderable[AbstractReference] = new Renderable[AbstractReference] {
    override def render(value: AbstractReference): String = value match {
      case a: AppliedReference =>
        a.render()
      case l: Lambda =>
        l.render()
    }
  }

  implicit lazy val r_AppliedReference: Renderable[AppliedReference] = new Renderable[AppliedReference] {
    override def render(value: AppliedReference): String = value match {
      case a: AppliedNamedReference =>
        a.render()
      case i: IntersectionReference =>
        i.render()
      case u: UnionReference =>
        u.render()
      case r: Refinement =>
        r.render()
      case r: WildcardReference =>
        r.render()
    }
  }

  implicit lazy val r_Refinement: Renderable[Refinement] = new Renderable[Refinement] {
    override def render(value: Refinement): String = {
      s"(${value.reference.render()} ${value.decls.toSeq.sorted(OrderingRefinementDeclInstance).map(_.render()).mkString("{", ", ", "}")})"
    }
  }

  implicit lazy val r_Wildcard: Renderable[WildcardReference] = new Renderable[WildcardReference] {
    override def render(value: WildcardReference): String = {
      value.boundaries match {
        case _: Boundaries.Defined =>
          s"?: ${value.boundaries.render()}"

        case Boundaries.Empty =>
          "?"
      }
    }
  }

  implicit lazy val r_RefinementDecl: Renderable[RefinementDecl] = new Renderable[RefinementDecl] {
    override def render(value: RefinementDecl): String = value match {
      case RefinementDecl.Signature(name, input, output) =>
        s"def $name${input.map(_.render()).mkString("(", ", ", ")")}: ${output.render()}"
      case RefinementDecl.TypeMember(name, tpe) =>
        s"type $name = $tpe"
    }
  }

  implicit lazy val r_AppliedNamedReference: Renderable[AppliedNamedReference] = new Renderable[AppliedNamedReference] {
    override def render(value: AppliedNamedReference): String = value match {
      case n: NameReference =>
        n.render()
      case f: FullReference =>
        f.render()
    }
  }

  implicit lazy val r_Lambda: Renderable[Lambda] = new Renderable[Lambda] {
    override def render(value: Lambda): String = {
      s"λ ${value.input.map(_.render()).map(p => s"%$p").mkString(",")} → ${value.output.render()}"
    }
  }

  implicit lazy val r_LambdaParameterName: Renderable[SymName.LambdaParamName] = new Renderable[SymName.LambdaParamName] {
    override def render(value: SymName.LambdaParamName): String = {
      value.depth match {
        case t if t <= 0 =>
          s"${value.index}"
        case t if t > 0 =>
          s"${value.depth}:${value.index}"
        // FIXME so-called "debug" view doesn't display all the data here which could lead to confusion when "debugging"
        //          s"[${value.arity}]${value.depth}:${value.index}"
      }
    }
  }

  implicit lazy val r_NameRefRenderer: Renderable[NameReference] = new Renderable[NameReference] {
    override def render(value: NameReference): String = {
      val r = r_SymName(value.ref, value.prefix.isDefined)

      val rr = value.boundaries match {
        case _: Boundaries.Defined =>
          s"$r|${value.boundaries.render()}"
        case Boundaries.Empty =>
          r
      }

      value.prefix match {
        case Some(p) =>
          s"${p.render()}$prefixSplitter$rr"
        case None =>
          rr
      }
    }
  }

  implicit lazy val r_FullReference: Renderable[FullReference] = new Renderable[FullReference] {
    override def render(value: FullReference): String = {
      s"${value.asName.render()}${value.parameters.map(_.render()).mkString("[", ",", "]")}"
    }
  }

  implicit lazy val r_IntersectionReference: Renderable[IntersectionReference] = new Renderable[IntersectionReference] {
    override def render(value: IntersectionReference): String = {
      value.refs.toSeq.sorted(OrderingAbstractReferenceInstance).map(r => (r: AppliedReference).render()).mkString("{", " & ", "}")
    }
  }

  implicit lazy val r_UnionReference: Renderable[UnionReference] = new Renderable[UnionReference] {
    override def render(value: UnionReference): String = {
      value.refs.toSeq.sorted(OrderingAbstractReferenceInstance).map(r => (r: AppliedReference).render()).mkString("{", " | ", "}")
    }
  }

  implicit lazy val r_TypeParam: Renderable[TypeParam] = new Renderable[TypeParam] {
    override def render(value: TypeParam): String = {
      s"${value.variance.render()}${value.ref.render()}"
    }
  }

  implicit lazy val r_Variance: Renderable[Variance] = new Renderable[Variance] {
    override def render(value: Variance): String = value match {
      case Variance.Invariant => "="
      case Variance.Contravariant => "-"
      case Variance.Covariant => "+"
    }
  }

  implicit lazy val r_Boundaries: Renderable[Boundaries] = new Renderable[Boundaries] {
    override def render(value: Boundaries): String = value match {
      case Boundaries.Defined(bottom, top) =>
        s"<${bottom.render()}..${top.render()}>"

      case Boundaries.Empty =>
        ""
    }
  }

  @deprecated("bincompat only", "20.03.2023")
  private[macrortti] implicit lazy val r_LambdaParameter: Renderable[LambdaParameter] = new Renderable[LambdaParameter] {
    override def render(value: LambdaParameter): String = value match {
      case l: SymName.LambdaParamName => r_SymName(l, hasPrefix = false)
    }
  }

}

object LTTRenderables {

  // omit package names
  object Short extends LTTRenderables {
    override def r_SymName(sym: SymName, @unused hasPrefix: Boolean): String = {
      sym match {
        case SymLiteral(c) =>
          c
        case t: SymName.LambdaParamName =>
          t.render()
        case s: SymName.NamedSymbol =>
          s.name.split('.').last
      }
    }
  }

  object Long extends Long

  // print package names
  private[LTTRenderables] trait Long extends LTTRenderables {
    override def r_SymName(sym: SymName, hasPrefix: Boolean): String = {
      if (hasPrefix) {
        Short.r_SymName(sym, hasPrefix)
      } else {
        sym match {
          case t: SymName.LambdaParamName => t.render()
          case o: SymName.NamedSymbol => o.name
        }
      }
    }

    private[macrortti] def renderDb(db: Map[_ <: AbstractReference, Set[_ <: AbstractReference]]): String = {
      import izumi.reflect.internal.fundamentals.platform.strings.IzString._
      db.toList.sortBy(_._1)(OrderingAbstractReferenceInstance).map {
          case (k, v) => s"${k.repr} -> ${v.toList.sorted(OrderingAbstractReferenceInstance).map(_.repr).niceList(prefix = "* ").shift(2)}"
        }.niceList()
    }
  }

  // Same as `Long`, but split prefixes with . instead of ::
  object LongPrefixDot extends LTTRenderables {
    override def r_SymName(sym: SymName, hasPrefix: Boolean): String = {
      Long.r_SymName(sym, hasPrefix)
    }

    override def prefixSplitter: String = "."
  }

  object ScalaStyledLambdas extends ScalaStyledLambdasShared {
    override implicit lazy val r_LambdaParameterName: Renderable[SymName.LambdaParamName] = new Renderable[SymName.LambdaParamName] {
      override def render(value: SymName.LambdaParamName): String = "_"
    }

    override implicit lazy val r_Lambda: Renderable[Lambda] = new Renderable[Lambda] {
      override def render(value: Lambda): String = {
        val isSimpleShape = value match {
          case Lambda(input, FullReference(_, tparams, _)) =>
            val (unusedRemaining, suspicious) = tparams.foldLeft((input, List.empty[AbstractReference])) {
              // params must be applied in definition order
              case ((all @ unusedArg :: tl, suspicious), TypeParam(p: AppliedNamedReference, variance)) =>
                if (p.symName == unusedArg) {
                  p match {
                    case _: NameReference =>
                      (tl, suspicious)
                    case FullReference(symName, parameters, prefix) =>
                      (tl, parameters.map(_.ref) ++ suspicious)
                  }
                } else {
                  (all, p :: suspicious)
                }
              case ((all, suspicious), TypeParam(other, _)) => (all, other :: suspicious)
            }
            val innerUses = suspicious.iterator.flatMap(RuntimeAPI.unpack).map(_.symName).toSet
            unusedRemaining.isEmpty && input.toSet.intersect(innerUses).isEmpty
          case _ =>
            false
        }
        if (isSimpleShape) {
          s"${value.output.render()}"
        } else {
          ScalaStyledLambdasLong.r_Lambda.render(value)
        }
      }
    }
  }

  object ScalaStyledLambdasLong extends ScalaStyledLambdasShared {
    override implicit lazy val r_LambdaParameterName: Renderable[SymName.LambdaParamName] = new Renderable[SymName.LambdaParamName] {
      override def render(value: SymName.LambdaParamName): String = {
        val char = ('A' + (value.index % 25)).toChar.toString
        val numChars = 1 + value.index / 25
        val suffix = if (value.depth > 0) s"${value.depth}" else ""
        s"${char * numChars}$suffix"
      }
    }

    override implicit lazy val r_Lambda: Renderable[Lambda] = new Renderable[Lambda] {
      override def render(value: Lambda): String = {
        s"[${value.input.map(_.render()).mkString(",")}] ➾ ${value.output.render()}"
      }
    }
  }

  private[LTTRenderables] trait ScalaStyledLambdasShared extends Long {
    override def prefixSplitter: String = "."

    override implicit lazy val r_Variance: Renderable[Variance] = new Renderable[Variance] {
      override def render(value: Variance): String = value match {
        case Variance.Invariant => ""
        case Variance.Contravariant => "-"
        case Variance.Covariant => "+"
      }
    }

    override implicit lazy val r_NameRefRenderer: Renderable[NameReference] = new Renderable[NameReference] {
      override def render(value: NameReference): String = {
        val r = r_SymName(value.ref, value.prefix.isDefined)

        val rr = value.boundaries match {
          case _: Boundaries.Defined =>
            s"$r ${value.boundaries.render()}"
          case Boundaries.Empty =>
            r
        }

        value.prefix match {
          case Some(p) =>
            s"${p.render()}$prefixSplitter$rr"
          case None =>
            rr
        }
      }
    }

    override implicit lazy val r_Boundaries: Renderable[Boundaries] = new Renderable[Boundaries] {
      override def render(value: Boundaries): String = value match {
        case Boundaries.Defined(bottom, top) if bottom == tpeNothing || bottom == tpeNull => s"<: ${top.render()}"
        case Boundaries.Defined(bottom, top) if top == tpeAny || top == tpeAnyRef || top == tpeObject => s">: ${bottom.render()}"
        case Boundaries.Defined(bottom, top) => s">: ${bottom.render()} <: ${top.render()}"
        case Boundaries.Empty => ""
      }
    }
  }
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LTTSyntax.scala
================================================
package izumi.reflect.macrortti

import izumi.reflect.macrortti.LightTypeTagRef.SymName.LambdaParamName
import izumi.reflect.macrortti.LightTypeTagRef._

import scala.annotation.tailrec

private[macrortti] trait LTTSyntax {
  this: LightTypeTagRef =>

  protected[this] final def combineImpl(args: Seq[LightTypeTagRef]): AbstractReference = {
    if (args.nonEmpty) {
      applySeq(args.map { case v: AbstractReference => v })
    } else {
      // while user is not expected to combine an arbitrary tag with an empty args list
      // it's a sound operation which should just return the tag itself
      // see also: https://github.com/7mind/izumi/pull/1528
      this match {
        case ref: AbstractReference =>
          ref
      }
    }
  }

  protected[this] final def combineNonPosImpl(args: Seq[Option[LightTypeTagRef]]): AbstractReference = {
    applyParameters {
      l =>
        l.input.zip(args).flatMap {
          case (p, v) =>
            v match {
              case Some(value: AbstractReference) =>
                Seq(p -> value)
              case None =>
                Seq.empty
            }
        }
    }
  }

  protected[this] final def withoutArgsImpl: AbstractReference = {
    def appliedNamedReference(reference: AppliedNamedReference) = {
      reference match {
        case LightTypeTagRef.NameReference(_, _, _) => reference
        case r @ LightTypeTagRef.FullReference(_, parameters @ _, prefix) => NameReference(r.symName, Boundaries.Empty, prefix)
      }
    }

    def appliedReference(reference: AppliedReference): AppliedReference = {
      reference match {
        case reference: AppliedNamedReference =>
          appliedNamedReference(reference)
        case LightTypeTagRef.IntersectionReference(refs) =>
          LightTypeTagRef.maybeIntersection(refs.map(appliedReference))
        case LightTypeTagRef.UnionReference(refs) =>
          LightTypeTagRef.maybeUnion(refs.map(appliedReference))
        case LightTypeTagRef.Refinement(reference, decls) =>
          LightTypeTagRef.Refinement(appliedReference(reference), decls)
        case r: LightTypeTagRef.WildcardReference =>
          r
      }
    }

    @tailrec
    def go(self: LightTypeTagRef): AbstractReference = {
      self match {
        case Lambda(_, output) =>
          go(output)
        case reference: AppliedReference =>
          appliedReference(reference)
      }
    }

    go(this)
  }

  /** Render to string, omitting package names */
  protected[this] final def toStringImpl: String = {
    import izumi.reflect.macrortti.LTTRenderables.Short._
    (this: LightTypeTagRef).render()
  }

  /** Fully-qualified rendering of a type, including packages and prefix types.
    * Use [[toString]] for a rendering that omits package names
    */
  protected[this] final def reprImpl: String = {
    import izumi.reflect.macrortti.LTTRenderables.Long._
    (this: LightTypeTagRef).render()
  }

  protected[this] final def scalaStyledReprImpl: String = {
    import izumi.reflect.macrortti.LTTRenderables.ScalaStyledLambdas._
    (this: LightTypeTagRef).render()
  }

  protected[this] final def shortNameImpl: String = {
    getName(r => LTTRenderables.Short.r_SymName(r.symName, hasPrefix = false))
  }

  protected[this] final def longNameWithPrefixImpl: String = {
    getName(r => LTTRenderables.LongPrefixDot.r_NameRefRenderer.render(r.asName.copy(boundaries = Boundaries.Empty)))
  }

  protected[this] final def longNameInternalSymbolImpl: String = {
    getName(r => LTTRenderables.Long.r_SymName(r.symName, hasPrefix = false))
  }

  @deprecated(
    "Produces Scala version dependent output, with incorrect prefixes for types with value prefixes. Use `longNameWithPrefix` instead, or `longNameInternalSymbol` for old behavior",
    "2.2.2"
  )
  protected[this] final def longNameImpl: String = {
    longNameInternalSymbol
  }

  protected[this] final def getPrefixImpl: Option[AppliedReference] = {
    @tailrec
    @inline
    def getPrefix(self: LightTypeTagRef): Option[AppliedReference] = {
      self match {
        case Lambda(_, output) => getPrefix(output)
        case NameReference(_, _, prefix) => prefix
        case FullReference(_, _, prefix) => prefix
        case IntersectionReference(refs) =>
          val prefixes = refs.flatMap(_.getPrefix)
          if (prefixes.nonEmpty) Some(maybeIntersection(prefixes)) else None
        case UnionReference(refs) =>
          val prefixes = refs.flatMap(_.getPrefix)
          if (prefixes.nonEmpty) Some(maybeUnion(prefixes)) else None
        case Refinement(reference, _) => getPrefix(reference)
        case _: WildcardReference => None
      }
    }

    getPrefix(this)
  }

  protected[this] final def typeArgsImpl: List[AbstractReference] = {
    this match {
      case Lambda(input, output) =>
        val params = input.iterator.toSet[SymName]
        output.typeArgs.filter {
          case n: AppliedNamedReference =>
            !params.contains(n.asName.ref)
          case _ =>
            true
        }
      case NameReference(_, _, _) =>
        Nil
      case FullReference(_, parameters, _) =>
        parameters.map(_.ref)
      case IntersectionReference(_) =>
        Nil
      case UnionReference(_) =>
        Nil
      case WildcardReference(_) =>
        Nil
      case Refinement(reference, _) =>
        reference.typeArgs
    }
  }

  /** decompose intersection type */
  protected[this] final def decomposeImpl: Set[AppliedReferenceExceptIntersection] = {
    this match {
      case IntersectionReference(refs) =>
        refs.flatMap(_.decompose)
      case appliedReference: AppliedReferenceExceptIntersection =>
        Set(appliedReference)
      // lambdas cannot appear _inside_ intersections in LightTypeTagRef model
      case Lambda(_, _) =>
        Set.empty
    }
  }

  protected[this] final def decomposeUnionImpl: Set[AppliedReferenceExceptUnion] = {
    this match {
      case UnionReference(refs) =>
        refs.flatMap(_.decomposeUnion)
      case appliedReference: AppliedReferenceExceptUnion =>
        Set(appliedReference)
      // lambdas cannot appear _inside_ unions in LightTypeTagRef model
      case Lambda(_, _) =>
        Set.empty
    }
  }

  private[macrortti] final def applySeq(refs: Seq[AbstractReference]): AbstractReference = {
    applyParameters {
      l =>
        l.input.zip(refs).map {
          case (p, v) =>
            p -> v
        }
    }
  }

  private[macrortti] final def applyParameters(p: Lambda => Seq[(LambdaParamName, AbstractReference)]): AbstractReference = {
    this match {
      case l: Lambda =>
        val parameters = p(l)
        if (l.input.size < parameters.size) {
          throw new IllegalArgumentException(s"$this expects no more than ${l.input.size} parameters: ${l.input} but got $parameters")
        }
        val expected = l.input.iterator.toSet
        val unknownKeys = parameters.iterator.map(_._1).toSet.diff(expected)
        if (unknownKeys.nonEmpty) {
          throw new IllegalArgumentException(s"$this takes parameters: $expected but got unexpected ones: $unknownKeys")
        }

        RuntimeAPI.applyLambda(l, parameters)
      case _ =>
        throw new IllegalArgumentException(s"$this is not a type lambda, it cannot be parameterized")
    }
  }

  @inline
  private[this] final def getName(render: AppliedNamedReference => String): String = {
    @tailrec
    @inline
    def go(r: LightTypeTagRef): String = r match {
      case Lambda(_, output) => go(output)
      case ref: NameReference => render(ref)
      case ref: FullReference => render(ref)
      case IntersectionReference(refs) => refs.map(goDeep).mkString(" & ")
      case UnionReference(refs) => refs.map(goDeep).mkString(" | ")
      case Refinement(reference, _) => go(reference)
      case WildcardReference(_) => "?"
    }

    def goDeep(r: LightTypeTagRef): String = go(r)

    go(this)
  }
}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LightTypeTag.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.macrortti

import izumi.reflect.DebugProperties
import izumi.reflect.internal.NowarnCompat
import izumi.reflect.internal.OrderingCompat.ArraySeqLike
import izumi.reflect.internal.fundamentals.platform.strings.IzString.toRichString
import izumi.reflect.macrortti.LightTypeTag.ParsedLightTypeTag.SubtypeDBs
import izumi.reflect.macrortti.LightTypeTagRef.SymName.{LambdaParamName, SymLiteral, SymTermName, SymTypeName}
import izumi.reflect.macrortti.LightTypeTagRef._
import izumi.reflect.thirdparty.internal.boopickle.NoMacro.Pickler
import izumi.reflect.thirdparty.internal.boopickle.{PickleImpl, UnpickleState}

import java.nio.ByteBuffer
import java.nio.charset.StandardCharsets
import scala.collection.immutable.HashSet

/**
  * Extracts internal databases from [[LightTypeTag]].
  * Should not be used under normal circumstances.
  *
  * Internal API: binary compatibility not guaranteed.
  */
final case class LightTypeTagUnpacker(tag: LightTypeTag) {
  def bases: Map[AbstractReference, Set[AbstractReference]] = tag.basesdb
  def inheritance: Map[NameReference, Set[NameReference]] = tag.idb
}

abstract class LightTypeTag private[reflect] (
  bases: () => Map[AbstractReference, Set[AbstractReference]],
  inheritanceDb: () => Map[NameReference, Set[NameReference]]
) extends Serializable {

  def ref: LightTypeTagRef

  // full subtyping db with lambdas, parameters and variance, e.g. List[+A] <: SeqOps[A, List, List[A]], λ %0 → List[+%0] <: λ %0,%1,%2 → SeqOps[+%0, +%1, +%2]
  private[reflect] lazy val basesdb: Map[AbstractReference, Set[AbstractReference]] = bases()
  // class inheritance db without lambdas and without parameters, e.g. List <: SeqOps, Iterable
  private[reflect] lazy val idb: Map[NameReference, Set[NameReference]] = inheritanceDb()

  def binaryFormatVersion: Int

  def serialize(): LightTypeTag.Serialized = {
    val hashCodeRef = this.hashCode()
    val strRef = PickleImpl.serializeIntoString(this.ref, LightTypeTag.lttRefSerializer)
    val strDBs = PickleImpl.serializeIntoString(SubtypeDBs.make(this.basesdb, this.idb), LightTypeTag.subtypeDBsSerializer)
    LightTypeTag.Serialized(hashCodeRef, strRef, strDBs, LightTypeTag.currentBinaryFormatVersion)
  }

  @inline final def <:<(maybeParent: LightTypeTag): Boolean = {
    new LightTypeTagInheritance(this, maybeParent).isChild()
  }

  @inline final def =:=(other: LightTypeTag): Boolean = {
    this == other
  }

  final def decompose: Set[LightTypeTag] = {
    ref match {
      case intersection: LightTypeTagRef.IntersectionReference =>
        val refs = intersection.decompose // make sure to unwrap nested intersections
        refs.map(LightTypeTag(_, basesdb, idb))
      case _ =>
        Set(this)
    }
  }

  final def decomposeUnion: Set[LightTypeTag] = {
    ref match {
      case union: LightTypeTagRef.UnionReference =>
        val refs = union.decomposeUnion // make sure to unwrap nested unions
        refs.map(LightTypeTag(_, basesdb, idb))
      case _ =>
        Set(this)
    }
  }

  /**
    * Parameterize this type tag with `args` if it describes an unapplied type lambda
    *
    * If there are less `args` given than this type takes parameters, it will remain a type
    * lambda taking remaining arguments:
    *
    * {{{
    *   F[_, _, _].combine(A, B) = F[A, B, _]
    * }}}
    */
  def combine(args: LightTypeTag*): LightTypeTag = {
    val argRefs = args.map(_.ref)
    val appliedBases = basesdb ++ basesdb.iterator.collect { // do not remove the unapplied base lambdas after combination (required for inferredLambdaParents in isChild)
      case (self: LightTypeTagRef.Lambda, parents) =>
        self.combine(argRefs) -> parents.map {
          case l: LightTypeTagRef.Lambda =>
            l.combine(argRefs)
          case nonLambdaParent =>
            val context = self.input.zip(argRefs.collect { case a: AbstractReference => a }).toMap
            new RuntimeAPI.Rewriter(context).replaceRefs(nonLambdaParent)
        }
    }

    def mergedBasesDB = LightTypeTag.mergeIDBs(appliedBases, args.iterator.map(_.basesdb))

    def mergedInheritanceDb = LightTypeTag.mergeIDBs(idb, args.iterator.map(_.idb))

    LightTypeTag(ref.combine(argRefs), mergedBasesDB, mergedInheritanceDb)
  }

  /**
    * Parameterize this type tag with `args` if it describes an unapplied type lambda
    *
    * The resulting type lambda will take parameters in places where `args` was None:
    *
    * {{{
    *   F[_, _, _].combine(Some(A), None, Some(C)) = F[A, _, C]
    * }}}
    */
  def combineNonPos(args: Option[LightTypeTag]*): LightTypeTag = {
    val argRefs = args.map(_.map(_.ref))
    val appliedBases = basesdb ++ basesdb.iterator.collect { // do not remove the unapplied base lambdas after combination (required for inferredLambdaParents in isChild)
      case (self: LightTypeTagRef.Lambda, parents) =>
        self.combineNonPos(argRefs) -> parents.map {
          case l: LightTypeTagRef.Lambda =>
            l.combineNonPos(argRefs)
          case nonLambdaParent =>
            val context = self.input.zip(argRefs.flatten.collect { case a: AbstractReference => a }).toMap
            new RuntimeAPI.Rewriter(context).replaceRefs(nonLambdaParent)
        }
    }

    def mergedBasesDB = LightTypeTag.mergeIDBs(appliedBases, args.iterator.map(_.map(_.basesdb).getOrElse(Map.empty)))

    def mergedInheritanceDb = LightTypeTag.mergeIDBs(idb, args.iterator.map(_.map(_.idb).getOrElse(Map.empty)))

    LightTypeTag(ref.combineNonPos(argRefs), mergedBasesDB, mergedInheritanceDb)
  }

  /**
    * Strip all args from type tag of parameterized type and its supertypes
    * Useful for very rough type-constructor / class-only comparisons.
    *
    * NOTE: This DOES NOT RESTORE TYPE CONSTRUCTOR/LAMBDA and is
    * NOT equivalent to .typeConstructor call in scala-reflect
    *       - You won't be able to call [[combine]] on result type
    * and partially applied types will not work correctly
    */
  @NowarnCompat.nowarn("msg=deprecated")
  def withoutArgs: LightTypeTag = {
    LightTypeTag(ref.withoutArgs, basesdb.mapValues(_.map(_.withoutArgs)).iterator.toMap, idb)
  }

  /**
    * Extract arguments applied to this type constructor
    */
  def typeArgs: List[LightTypeTag] = {
    ref.typeArgs.map(LightTypeTag(_, basesdb, idb))
  }

  /**
    * Remove types that are supertypes of other types in the intersection from it
    *
    * e.g. transform `Tag[TraitSuper & TraitChild & AnyRef]` to `Tag[TraitChild]`
    */
  def removeIntersectionTautologies: LightTypeTag = {
    ref match {
      case IntersectionReference(refs) =>
        if (refs.size <= 1) {
          this
        } else {
          refs.tail.foldLeft(LightTypeTag(refs.head, basesdb, idb)) {
            case (acc, tref) =>
              val t = LightTypeTag(tref, basesdb, idb)
              if (t <:< acc) {
                t
              } else if (acc <:< t) {
                acc
              } else {
                LightTypeTag(LightTypeTagRef.IntersectionReference(acc.ref.decompose + tref), basesdb, idb)
              }
          }
        }
      case _ =>
        this
    }
  }

  /**
    * Remove types that are subtypes of other types in the union from it
    *
    * e.g. transform `Tag[TraitSuper | TraitChild | Nothing]` to `Tag[TraitSuper]`
    */
  def removeUnionTautologies: LightTypeTag = {
    ref match {
      case UnionReference(refs) =>
        if (refs.size <= 1) {
          this
        } else {
          refs.tail.foldLeft(LightTypeTag(refs.head, basesdb, idb)) {
            case (acc, tref) =>
              val t = LightTypeTag(tref, basesdb, idb)
              if (t <:< acc) {
                acc
              } else if (acc <:< t) {
                t
              } else {
                LightTypeTag(LightTypeTagRef.UnionReference(acc.ref.decomposeUnion + tref), basesdb, idb)
              }
          }
        }
      case _ =>
        this
    }
  }

  /** Render to string, omitting package names */
  override def toString: String = {
    ref.toString
  }

  /**
    * Fully-qualified rendering of a type, including packages and prefix types.
    * Use [[toString]] for a rendering that omits package names
    */
  def repr: String = {
    ref.repr
  }

  /**
    * Fully-qualified rendering of a type, including packages and prefix types.
    * Traditional Scala notation for lambdas, e.g. scala.util.Either[+scala.Int,+_]
    */
  def scalaStyledRepr: String = {
    ref.scalaStyledRepr
  }

  /** Short class or type-constructor name of this type, without package or prefix names
    *
    * @note This will produce only a type constructor name, for full rendering of the type use [[toString]], [[repr]] or [[scalaStyledRepr]]
    */
  def shortName: String = {
    ref.shortName
  }

  /** Class or type-constructor name of this type, with package and prefix names
    *
    * @note This will produce only a type constructor name, for full rendering of the type use [[toString]], [[repr]] or [[scalaStyledRepr]]
    */
  def longNameWithPrefix: String = {
    ref.longNameWithPrefix
  }

  /** Internal symbol name of type-constructor of this type, with package and containing definition names
    *
    * @note This will produce only a type constructor name, for full rendering of the type use [[toString]], [[repr]] or [[scalaStyledRepr]]
    */
  def longNameInternalSymbol: String = {
    ref.longNameInternalSymbol
  }

  @deprecated("Renamed to scalaStyledRepr", "3.0.8")
  def scalaStyledName: String = {
    ref.scalaStyledName
  }

  @deprecated(
    "Produces Scala version dependent output, with incorrect prefixes for types with value prefixes. Use `longNameWithPrefix` instead, or `longNameInternalSymbol` for old behavior",
    "2.2.2"
  )
  /** @deprecated Produces Scala version dependent output, with incorrect prefixes for types with value prefixes. Use `longNameWithPrefix` instead, or `longNameInternalSymbol` for old behavior */
  def longName: String = {
    ref.longName
  }

  /** Print internal structures state */
  def debug(name: String = ""): String = {
    s"""⚙️ begin $name: ${this.repr}
       |⚡️bases:${LTTRenderables.Long.renderDb(basesdb)}
       |⚡️inheritance:${LTTRenderables.Long.renderDb(idb)}
       |⚙️ end $name""".stripMargin
  }

  override def equals(other: Any): Boolean = {
    other match {
      case that: LightTypeTag =>
        ref == that.ref
      case _ => false
    }
  }

  override def hashCode(): Int = {
    hashcode
  }

  private[this] lazy val hashcode: Int = {
    ref.hashCode() * 31
  }
}

object LightTypeTag {
  final val currentBinaryFormatVersion = 30

  case class Serialized(hash: Int, ref: String, databases: String, version: Int)

  @inline def apply(ref0: LightTypeTagRef, bases: => Map[AbstractReference, Set[AbstractReference]], db: => Map[NameReference, Set[NameReference]]): LightTypeTag = {
    new UnparsedLightTypeTag(ref0, () => bases, () => db)
  }

  /** Create a [[LightTypeTag]] formed of `intersection` with the structural refinement taken from `structure`
    *
    * @param structure the non-structural part of structure is ignored, except SubtypeDBs
    * @param additionalTypeMembers additional type members
    */
  def refinedType(intersection: List[LightTypeTag], structure: LightTypeTag, additionalTypeMembers: Map[String, LightTypeTag]): LightTypeTag = {
    val intersectionRef = LightTypeTagRef.maybeIntersection(intersection.iterator.map(_.ref))
    val ref = {
      val decls = structure.ref match {
        case LightTypeTagRef.Refinement(_, decls) if decls.nonEmpty =>
          decls
        case _ =>
          Set.empty[RefinementDecl]
      }
      if (decls.nonEmpty || additionalTypeMembers.nonEmpty) {
        val newDecls = decls.filterNot(additionalTypeMembers contains _.name) ++ additionalTypeMembers.iterator.map {
          case (k, v) =>
            RefinementDecl.TypeMember(k, v.ref match { case r: AbstractReference => r })
        }
        LightTypeTagRef.Refinement(intersectionRef, newDecls)
      } else {
        intersectionRef
      }
    }

    def mergedBasesDB: Map[AbstractReference, Set[AbstractReference]] =
      LightTypeTag.mergeIDBs(structure.basesdb, intersection.iterator.map(_.basesdb) ++ additionalTypeMembers.iterator.map(_._2.basesdb))

    def mergedInheritanceDb: Map[NameReference, Set[NameReference]] =
      LightTypeTag.mergeIDBs(structure.idb, intersection.iterator.map(_.idb) ++ additionalTypeMembers.iterator.map(_._2.idb))

    LightTypeTag(ref, mergedBasesDB, mergedInheritanceDb)
  }

  def unionType(union: List[LightTypeTag]): LightTypeTag = {
    val ref = LightTypeTagRef.maybeUnion(union.iterator.map(_.ref))

    def mergedBasesDB: Map[AbstractReference, Set[AbstractReference]] =
      LightTypeTag.mergeIDBs(union.iterator.flatMap(_.basesdb))

    def mergedInheritanceDb: Map[NameReference, Set[NameReference]] =
      LightTypeTag.mergeIDBs(union.iterator.flatMap(_.idb))

    LightTypeTag(ref, mergedBasesDB, mergedInheritanceDb)
  }

  def wildcardType(lowTag: LightTypeTag, highTag: LightTypeTag): LightTypeTag = {
    val ref = LightTypeTagRef.WildcardReference(
      Boundaries.Defined(
        lowTag.ref match { case r: AbstractReference => r },
        highTag.ref match { case r: AbstractReference => r }
      )
    )

    def mergedBasesDB: Map[AbstractReference, Set[AbstractReference]] =
      LightTypeTag.mergeIDBs(highTag.basesdb, lowTag.basesdb)

    def mergedInheritanceDb: Map[NameReference, Set[NameReference]] =
      LightTypeTag.mergeIDBs(highTag.idb, lowTag.idb)

    LightTypeTag(ref, mergedBasesDB, mergedInheritanceDb)
  }

  def parse(serialized: Serialized): LightTypeTag = {
    parse[LightTypeTag](serialized.hash, serialized.ref, serialized.databases, serialized.version)
  }

  def parse[T](hashCode: Int, refString: String, basesString: String, version: Int): LightTypeTag = {
    lazy val shared = {
      subtypeDBsSerializer.unpickle(UnpickleState(ByteBuffer.wrap(basesString.getBytes(StandardCharsets.ISO_8859_1))))
    }

    if (version >= 0 && version < currentBinaryFormatVersion) {
      // because lambda parameter names in binary format are not normalized, the hashCode of the
      // binary string can/will violate equals/hashCode contract when comparing binary strings
      // between different binary version format or when using any hashCode from older binary
      // string. So we ignore all hashCodes and fast paths from old binary strings
      new ParsedLightTypeTagOldOrPre230(binaryFormatVersion = version, refString, () => shared.bases, () => shared.idb)
    } else if (version == currentBinaryFormatVersion) {
      new ParsedLightTypeTag230Plus(version, hashCode, refString, () => shared.bases, () => shared.idb)
    } else {
      throw new LinkageError(s"""Couldn't parse a `LightTypeTag` version=$version generated by a newer version of `izumi-reflect`,
                                |please include a newer version of the library jar `dev.zio:izumi-reflect`!
                                |
                                |Supported `version` range in this version: 0..$currentBinaryFormatVersion""".stripMargin)
    }
  }

  @deprecated("Binary compatibility for 1.0.0-M6+", "1.0.0-M6")
  private[reflect] def refinedType(intersection: List[LightTypeTag], structure: LightTypeTag): LightTypeTag = {
    refinedType(intersection, structure, Map.empty)
  }

  private[reflect] final class UnparsedLightTypeTag private[reflect] (
    override val ref: LightTypeTagRef,
    bases: () => Map[AbstractReference, Set[AbstractReference]],
    inheritanceDb: () => Map[NameReference, Set[NameReference]]
  ) extends LightTypeTag(bases, inheritanceDb) {
    @noinline override def binaryFormatVersion: Int = -1
  }

  private[reflect] object ParsedLightTypeTag {
    private[reflect] final case class SubtypeDBs private (
      bases: Map[AbstractReference, Set[AbstractReference]],
      idb: Map[NameReference, Set[NameReference]]
    )

    private[reflect] object SubtypeDBs {
      @NowarnCompat.nowarn("msg=deprecated")
      private[reflect] def make(bases: Map[AbstractReference, Set[AbstractReference]], idb: Map[NameReference, Set[NameReference]]): SubtypeDBs = {
        new SubtypeDBs(
          bases.mapValues(_.filterNot(v => LightTypeTagRef.isIgnored(v))).filterNot(_._2.isEmpty).iterator.toMap,
          idb.mapValues(_.filterNot(v => LightTypeTagRef.isIgnored(v))).filterNot(_._2.isEmpty).iterator.toMap
        )
      }
    }
  }

  /** `ParsedLightTypeTag` before 2.3.0 or before current version. It is forcefully deoptimized */
  private[reflect] final class ParsedLightTypeTagOldOrPre230 private[reflect] (
    // disable precomputed hashCode on older binary versions
    // (old serialized lambdas break equals-hashCode contract
    // when compared with new serialized lambdas)
//    override val hashCode: Int,
    override val binaryFormatVersion: Int,
    private[reflect] val refString: String,
    bases: () => Map[AbstractReference, Set[AbstractReference]],
    db: () => Map[NameReference, Set[NameReference]]
  ) extends LightTypeTag(bases, db) {
    override lazy val ref: LightTypeTagRef = {
      deserializeRefString(refString)
    }

    // disable optimizations for older binary versions
//    override def equals(other: Any): Boolean = {
//      other match {
//        case that: ParsedLightTypeTagPre230 if this.binaryFormatVersion == that.binaryFormatVersion =>
//          if (this.refString == that.refString) true
//          else if (optimisticEqualsEnabled) false
//          else super.equals(other)
//        case _ =>
//          super.equals(other)
//      }
//    }
  }

  /** `ParsedLightTypeTag` since 2.3.0 or current binary format version */
  private[reflect] final class ParsedLightTypeTag230Plus private[reflect] (
    override val binaryFormatVersion: Int,
    override val hashCode: Int,
    private[reflect] val refString: String,
    bases: () => Map[AbstractReference, Set[AbstractReference]],
    db: () => Map[NameReference, Set[NameReference]]
  ) extends LightTypeTag(bases, db) {
    override lazy val ref: LightTypeTagRef = {
      deserializeRefString(refString)
    }

    override def equals(other: Any): Boolean = {
      other match {
        case that: ParsedLightTypeTag230Plus if this.binaryFormatVersion == that.binaryFormatVersion =>
          if (this.refString == that.refString) true
          else if (optimisticEqualsEnabled) false
          else super.equals(other)
        case _ =>
          super.equals(other)
      }
    }
  }

  @noinline private[reflect] def deserializeRefString(refString: String): LightTypeTagRef = {
    lttRefSerializer.unpickle(UnpickleState(ByteBuffer.wrap(refString.getBytes(StandardCharsets.ISO_8859_1))))
  }

  private[this] final val optimisticEqualsEnabled = {
    System
      .getProperty(DebugProperties.`izumi.reflect.rtti.optimized.equals`)
      .asBoolean()
      .getOrElse(true)
  }

  private[reflect] val (lttRefSerializer: Pickler[LightTypeTagRef], subtypeDBsSerializer: Pickler[SubtypeDBs]) = {
    import izumi.reflect.thirdparty.internal.boopickle
    import izumi.reflect.thirdparty.internal.boopickle.BasicPicklers.IntPickler
    import izumi.reflect.thirdparty.internal.boopickle.NoMacro.{Pickler => _, _}

    implicit lazy val variance: Pickler[Variance] = IntPickler.xmap {
      case 0 => Variance.Invariant: Variance
      case 1 => Variance.Contravariant: Variance
      case 2 => Variance.Covariant: Variance
    } {
      case Variance.Invariant => 0
      case Variance.Contravariant => 1
      case Variance.Covariant => 2
    }
    implicit lazy val symName: Pickler[SymName] = new Pickler[SymName] {
      override def pickle(obj: SymName)(implicit state: PickleState): Unit = {
        obj match {
          case SymTermName(name) =>
            state.enc.writeInt(0)
            state.pickle[String](name)
            ()

          case SymTypeName(name) =>
            state.enc.writeInt(1)
            state.pickle[String](name)
            ()

          case SymLiteral(name) =>
            state.enc.writeInt(2)
            state.pickle[String](name)
            ()

          case LambdaParamName(index, depth, arity) =>
            state.enc.writeInt(3)
            state.enc.writeInt(index)
            state.enc.writeInt(depth)
            state.enc.writeInt(arity)
            ()
        }
      }

      override def unpickle(implicit state: UnpickleState): SymName = state.dec.readInt match {
        case 0 =>
          SymTermName(state.unpickle[String])
        case 1 =>
          SymTypeName(state.unpickle[String])
        case 2 =>
          SymLiteral(state.unpickle[String])
        case 3 =>
          LambdaParamName(state.dec.readInt, state.dec.readInt, state.dec.readInt)
        case o =>
          throw new IllegalArgumentException(s"Unexpected data: $o")
      }
    }

    implicit lazy val boundariesDefined: Pickler[Boundaries.Defined] = new Pickler[Boundaries.Defined] {
      override def pickle(obj: Boundaries.Defined)(implicit state: PickleState): Unit = {
        Tuple2Pickler[AbstractReference, AbstractReference].pickle((obj.bottom, obj.top))
      }

      override def unpickle(implicit state: UnpickleState): Boundaries.Defined = {
        val u = Tuple2Pickler[AbstractReference, AbstractReference].unpickle
        Boundaries.Defined(u._1, u._2)
      }
    }
    implicit lazy val boundaries: Pickler[Boundaries] = new Pickler[Boundaries] {
      override def pickle(obj: Boundaries)(implicit state: PickleState): Unit = obj match {
        case d: Boundaries.Defined =>
          optionPickler[Boundaries.Defined].pickle(Some(d))
        case Boundaries.Empty =>
          optionPickler[Boundaries.Defined].pickle(None)
      }

      override def unpickle(implicit state: UnpickleState): Boundaries = {
        optionPickler[Boundaries.Defined].unpickle match {
          case Some(value) =>
            value
          case None =>
            Boundaries.Empty
        }
      }
    }

    implicit def nameRefSerializer: Pickler[NameReference] = new boopickle.Pickler[LightTypeTagRef.NameReference] {
      override def pickle(value: LightTypeTagRef.NameReference)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[LightTypeTagRef.SymName](value.ref)
            state.pickle[LightTypeTagRef.Boundaries](value.boundaries)
            state.pickle[Option[LightTypeTagRef.AppliedReference]](value.prefix)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.NameReference = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = new LightTypeTagRef.NameReference(
            state.unpickle[LightTypeTagRef.SymName],
            state.unpickle[LightTypeTagRef.Boundaries],
            state.unpickle[Option[LightTypeTagRef.AppliedReference]]
          )
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.NameReference](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val appliedref: Pickler[AppliedReference] = new boopickle.CompositePickler[LightTypeTagRef.AppliedReference] {
      addConcreteType[FullReference]
      addConcreteType[IntersectionReference]
      addConcreteType[NameReference]
      addConcreteType[Refinement]
      addConcreteType[UnionReference]
      addConcreteType[WildcardReference]
    }
    implicit lazy val aref: Pickler[AbstractReference] = new boopickle.CompositePickler[LightTypeTagRef.AbstractReference] {
      addConcreteType[FullReference]
      addConcreteType[IntersectionReference]
      addConcreteType[LightTypeTagRef.Lambda]
      addConcreteType[NameReference]
      addConcreteType[Refinement]
      addConcreteType[UnionReference]
      addConcreteType[WildcardReference]
    }
    implicit lazy val tagref: Pickler[LightTypeTagRef] = new boopickle.CompositePickler[LightTypeTagRef] {
      addConcreteType[FullReference]
      addConcreteType[IntersectionReference]
      addConcreteType[LightTypeTagRef.Lambda]
      addConcreteType[NameReference]
      addConcreteType[Refinement]
      addConcreteType[UnionReference]
      addConcreteType[WildcardReference]
    }

    implicit lazy val wildcardRefSerializer: Pickler[WildcardReference] = new boopickle.Pickler[LightTypeTagRef.WildcardReference] {
      override def pickle(value: LightTypeTagRef.WildcardReference)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[LightTypeTagRef.Boundaries](value.boundaries)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.WildcardReference = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = new WildcardReference(
            state.unpickle[Boundaries]
          )
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.WildcardReference](-ic)
        else
          state.codingError(ic)
      }
    }

    // Deserializer for FullReference before version 2.3.0 (with String first parameter instead of SymName)
    implicit lazy val fullRef: Pickler[FullReference] = new boopickle.Pickler[LightTypeTagRef.FullReference] {
      override def pickle(value: LightTypeTagRef.FullReference)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            // After version 2.3.0 the FullReference format changed - we now use SymName not String for FullReference name
            // Thankfully, boopickle's identity serialization only uses number range Int.MinValue..0,
            // leaving us with all numbers above 0 to encode format variants.
            state.enc.writeInt(1) // We use 1 instead of normal value 0
            //
            state.pickle[SymName](value.symName)
            state.pickle[List[LightTypeTagRef.TypeParam]](value.parameters)
            state.pickle[Option[LightTypeTagRef.AppliedReference]](value.prefix)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.FullReference = {
        val ic = state.dec.readInt
        if (ic == 0) { // Pre 2.3.0 format
          val value = LightTypeTagRef.FullReference(
            SymName.SymTypeName(state.unpickle[String]),
            state.unpickle[List[LightTypeTagRef.TypeParam]],
            state.unpickle[Option[LightTypeTagRef.AppliedReference]]
          )
          state.addIdentityRef(value)
          value
        } else if (ic == 1) { // Post 2.3.0
          val value = LightTypeTagRef.FullReference(
            state.unpickle[SymName],
            state.unpickle[List[LightTypeTagRef.TypeParam]],
            state.unpickle[Option[LightTypeTagRef.AppliedReference]]
          )
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.FullReference](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val typeParam: Pickler[LightTypeTagRef.TypeParam] = new boopickle.Pickler[LightTypeTagRef.TypeParam] {
      override def pickle(value: LightTypeTagRef.TypeParam)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[LightTypeTagRef.AbstractReference](value.ref)
            state.pickle[LightTypeTagRef.Variance](value.variance)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.TypeParam = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = LightTypeTagRef.TypeParam(state.unpickle[LightTypeTagRef.AbstractReference], state.unpickle[LightTypeTagRef.Variance])
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.TypeParam](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val union: Pickler[UnionReference] = new boopickle.Pickler[LightTypeTagRef.UnionReference] {
      override def pickle(value: LightTypeTagRef.UnionReference)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[ArraySeqLike[LightTypeTagRef.AppliedReference]](LightTypeTagRef.refSetToSortedArray[AppliedReference](value.refs))
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.UnionReference = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val refs0 = state.unpickle[HashSet[AppliedReference]]
          val refs = refs0.flatMap {
            case u: UnionReference => u.decomposeUnion
            case other: AppliedReferenceExceptUnion => Set(other)
          }
          val value = LightTypeTagRef.UnionReference(refs)
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.UnionReference](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val intersection: Pickler[IntersectionReference] = new boopickle.Pickler[LightTypeTagRef.IntersectionReference] {
      override def pickle(value: LightTypeTagRef.IntersectionReference)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[ArraySeqLike[LightTypeTagRef.AppliedReference]](LightTypeTagRef.refSetToSortedArray[AppliedReference](value.refs))
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.IntersectionReference = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val refs0 = state.unpickle[HashSet[AppliedReference]]
          val refs = refs0.flatMap {
            case u: IntersectionReference => u.decompose
            case other: AppliedReferenceExceptIntersection => Set(other)
          }
          val value = LightTypeTagRef.IntersectionReference(refs)
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.IntersectionReference](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val lambda: Pickler[LightTypeTagRef.Lambda] = new boopickle.Pickler[LightTypeTagRef.Lambda] {
      override def pickle(value: LightTypeTagRef.Lambda)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            // After version 2.3.0 the Lambda format changed - we now use LambdaParamName not LambdaParameter for Lambda inputs
            // Thankfully, boopickle's identity serialization only uses number range Int.MinValue..0,
            // leaving us with all numbers above 0 to encode format variants.
            state.enc.writeInt(1) // We use 1 instead of normal value 0
            state.pickle[List[SymName.LambdaParamName]](value.input)
            state.pickle[LightTypeTagRef.AbstractReference](value.output)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.Lambda = {
        val ic = state.dec.readInt
        if (ic == 0) { // Pre 2.3.0 format
          object OldLambdaParameter {
            type OldLambdaParameter <: String

            implicit val oldLambdaParameterPickler: boopickle.Pickler[OldLambdaParameter] = new boopickle.Pickler[OldLambdaParameter] {
              override def pickle(obj: OldLambdaParameter.OldLambdaParameter)(implicit state: PickleState): Unit = {
                throw new RuntimeException("Impossible - old lambda parameter compat pickler should never be called to serialize - only to deserialize")
              }
              override def unpickle(implicit state: UnpickleState): OldLambdaParameter.OldLambdaParameter = {
                val ic = state.dec.readInt
                if (ic == 0) {
                  val value = state.unpickle[String]
                  state.addIdentityRef(value)
                  value.asInstanceOf[OldLambdaParameter]
                } else if (ic < 0)
                  state.identityFor[String](-ic).asInstanceOf[OldLambdaParameter]
                else
                  state.codingError(ic)
              }
            }
          }

          def convertPre230LambdaToNew(lambda: LightTypeTagRef.Lambda, paramMap: Map[String, SymName.LambdaParamName]): LightTypeTagRef.Lambda = {

            def goReplaceBoundaries(boundaries: Boundaries): Boundaries = boundaries match {
              case Boundaries.Defined(bottom, top) =>
                Boundaries.Defined(goReplace(bottom), goReplace(top))
              case Boundaries.Empty =>
                Boundaries.Empty
            }

            def goReplaceSymName(symName: SymName): SymName = symName match {
              case oldSymName @ SymTypeName(maybeLambdaParam) =>
                paramMap.getOrElse(maybeLambdaParam, oldSymName)
              case _ => symName
            }

            def goReplace[T <: AbstractReference](abstractReference: T): T = {
              (abstractReference match {
                case Lambda(input, output) =>
                  // a lambda read by another codec must have already
                  // been processed by conversion procedure, so it should
                  // have no clashes in SymTypeName with old parameters
                  // anymore and be safe to process
                  Lambda(input, goReplace(output))

                case IntersectionReference(refs) =>
                  IntersectionReference(refs.map(goReplace))

                case UnionReference(refs) =>
                  UnionReference(refs.map(goReplace))

                case WildcardReference(boundaries) =>
                  WildcardReference(goReplaceBoundaries(boundaries))

                case Refinement(reference, decls) =>
                  Refinement(
                    goReplace(reference),
                    decls.map {
                      case RefinementDecl.Signature(name, input, output) =>
                        RefinementDecl.Signature(name, input.map(goReplace), goReplace(output))
                      case RefinementDecl.TypeMember(name, ref) =>
                        RefinementDecl.TypeMember(name, goReplace(ref))
                    }
                  )

                case NameReference(ref, boundaries, prefix) =>
                  NameReference(goReplaceSymName(ref), goReplaceBoundaries(boundaries), prefix.map(goReplace))

                case FullReference(symName, parameters, prefix) =>
                  FullReference(
                    goReplaceSymName(symName),
                    parameters.map {
                      case TypeParam(ref, variance) => TypeParam(goReplace(ref), variance)
                    },
                    prefix.map(goReplace)
                  )
              }).asInstanceOf[T]
            }

            val LightTypeTagRef.Lambda(convertedParams, oldResult) = lambda
            LightTypeTagRef.Lambda(convertedParams, goReplace(oldResult))
          }

          import OldLambdaParameter.{OldLambdaParameter, oldLambdaParameterPickler}

          val oldParams = state.unpickle[List[OldLambdaParameter]]
          val lambdaResult = state.unpickle[LightTypeTagRef.AbstractReference]

          val convertedParams = oldParams.map(SymName.bincompatForceCreateLambdaParamNameFromString(_))
          val paramMap = oldParams.iterator.zip(convertedParams.iterator).toMap[String, SymName.LambdaParamName]

          val oldLambda = LightTypeTagRef.Lambda(convertedParams, lambdaResult)
          val value = convertPre230LambdaToNew(oldLambda, paramMap)
          state.addIdentityRef(value)
          value
        } else if (ic == 1) { // Post 2.3.0
          val value = LightTypeTagRef.Lambda(
            state.unpickle[List[SymName.LambdaParamName]],
            state.unpickle[LightTypeTagRef.AbstractReference]
          )
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.Lambda](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val lambdaParameter: Pickler[SymName.LambdaParamName] = new boopickle.Pickler[SymName.LambdaParamName] {
      override def pickle(value: SymName.LambdaParamName)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[Int](value.index)
            state.pickle[Int](value.depth)
            state.pickle[Int](value.arity)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): SymName.LambdaParamName = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = SymName.LambdaParamName(state.unpickle[Int], state.unpickle[Int], state.unpickle[Int])
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[SymName.LambdaParamName](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val refinement: Pickler[Refinement] = new boopickle.Pickler[LightTypeTagRef.Refinement] {
      override def pickle(value: LightTypeTagRef.Refinement)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[LightTypeTagRef.AppliedReference](value.reference)
            state.pickle[ArraySeqLike[LightTypeTagRef.RefinementDecl]](LightTypeTagRef.refinementDeclSetToSortedArray(value.decls))
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.Refinement = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = LightTypeTagRef.Refinement(state.unpickle[LightTypeTagRef.AppliedReference], state.unpickle[HashSet[LightTypeTagRef.RefinementDecl]])
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.Refinement](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val refinementDecl: boopickle.CompositePickler[LightTypeTagRef.RefinementDecl] = new boopickle.CompositePickler[LightTypeTagRef.RefinementDecl] {
      addConcreteType[LightTypeTagRef.RefinementDecl.Signature]
      addConcreteType[LightTypeTagRef.RefinementDecl.TypeMember]
    }

    implicit lazy val typeMember: Pickler[RefinementDecl.TypeMember] = new boopickle.Pickler[LightTypeTagRef.RefinementDecl.TypeMember] {
      override def pickle(value: LightTypeTagRef.RefinementDecl.TypeMember)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[String](value.name)
            state.pickle[LightTypeTagRef.AbstractReference](value.ref)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.RefinementDecl.TypeMember = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = LightTypeTagRef.RefinementDecl.TypeMember(state.unpickle[String], state.unpickle[LightTypeTagRef.AbstractReference])
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.RefinementDecl.TypeMember](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val signature: Pickler[RefinementDecl.Signature] = new boopickle.Pickler[LightTypeTagRef.RefinementDecl.Signature] {
      override def pickle(value: LightTypeTagRef.RefinementDecl.Signature)(implicit state: boopickle.PickleState): Unit = {
        {
          val ref = state.identityRefFor(value)
          if (ref.isDefined) state.enc.writeInt(-ref.get)
          else {
            state.enc.writeInt(0)
            state.pickle[String](value.name)
            state.pickle[List[LightTypeTagRef.AppliedReference]](value.input)
            state.pickle[LightTypeTagRef.AppliedReference](value.output)
            state.addIdentityRef(value)
          }
        }
        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTagRef.RefinementDecl.Signature = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = LightTypeTagRef
            .RefinementDecl.Signature(
              state.unpickle[String],
              state.unpickle[List[LightTypeTagRef.AppliedReference]],
              state.unpickle[LightTypeTagRef.AppliedReference]
            )
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTagRef.RefinementDecl.Signature](-ic)
        else
          state.codingError(ic)
      }
    }

    implicit lazy val dbsSerializer: Pickler[SubtypeDBs] = new boopickle.Pickler[LightTypeTag.ParsedLightTypeTag.SubtypeDBs] {
      override def pickle(value: LightTypeTag.ParsedLightTypeTag.SubtypeDBs)(implicit state: boopickle.PickleState): Unit = {

        val ref = state.identityRefFor(value)
        if (ref.isDefined) state.enc.writeInt(-ref.get)
        else {
          state.enc.writeInt(0)
          state.pickle[Map[LightTypeTagRef.AbstractReference, Set[LightTypeTagRef.AbstractReference]]](value.bases)
          state.pickle[Map[LightTypeTagRef.NameReference, Set[LightTypeTagRef.NameReference]]](value.idb)
          state.addIdentityRef(value)
        }

        ()
      }

      override def unpickle(implicit state: boopickle.UnpickleState): LightTypeTag.ParsedLightTypeTag.SubtypeDBs = {
        val ic = state.dec.readInt
        if (ic == 0) {
          val value = LightTypeTag
            .ParsedLightTypeTag.SubtypeDBs.make(
              state.unpickle[Map[LightTypeTagRef.AbstractReference, Set[LightTypeTagRef.AbstractReference]]],
              state.unpickle[Map[LightTypeTagRef.NameReference, Set[LightTypeTagRef.NameReference]]]
            )
          state.addIdentityRef(value)
          value
        } else if (ic < 0)
          state.identityFor[LightTypeTag.ParsedLightTypeTag.SubtypeDBs](-ic)
        else
          state.codingError(ic)
      }
    }

    // false positive unused warnings
    // lazy val _ = (symTypeName, symTermName, symName, appliedRefSerializer, nameRefSerializer, abstractRefSerializer)

    (tagref, dbsSerializer)
  }

  private[macrortti] def mergeIDBs[T](self: Map[T, Set[T]], other: Map[T, Set[T]]): Map[T, Set[T]] = {
    mergeIDBs(self.iterator ++ other.iterator)
  }

  private[macrortti] def mergeIDBs[T](self: Map[T, Set[T]], others: Iterator[Map[T, Set[T]]]): Map[T, Set[T]] = {
    mergeIDBs(self.iterator ++ others.flatMap(_.iterator))
  }

  private[macrortti] def mergeIDBs[T](bases: Iterator[(T, Set[T])]): Map[T, Set[T]] = {
    import izumi.reflect.internal.fundamentals.collections.IzCollections._
    bases.toMultimap.map {
      case (k, v) =>
        (k, v.flatten.filterNot(_ == k))
    }
  }

}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LightTypeTagInheritance.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.macrortti

import izumi.reflect.internal.fundamentals.collections.ImmutableMultiMap
import izumi.reflect.internal.fundamentals.platform.basics.IzBoolean._
import izumi.reflect.internal.fundamentals.platform.console.TrivialLogger
import izumi.reflect.internal.fundamentals.platform.console.TrivialLogger.Config
import izumi.reflect.macrortti.LightTypeTagInheritance._
import izumi.reflect.macrortti.LightTypeTagRef.SymName.SymTypeName
import izumi.reflect.macrortti.LightTypeTagRef._

import scala.collection.mutable

object LightTypeTagInheritance {
  private[reflect] final val tpeNothing = NameReference(SymTypeName("scala.Nothing"))
  private[reflect] final val tpeNull = NameReference(SymTypeName("scala.Null"))

  private[reflect] final val tpeAny = NameReference(SymTypeName("scala.Any"))
  private[reflect] final val tpeAnyRef = NameReference(SymTypeName("scala.AnyRef"))

  private[reflect] final val tpeMatchable = NameReference(SymTypeName("scala.Matchable"))
  private[reflect] final val tpeObject = NameReference(SymTypeName(classOf[Object].getName))

  private final case class Ctx(
    logger: TrivialLogger,
    self: LightTypeTagInheritance
  ) {
    def next(): Ctx = Ctx(logger.sub(), self)
  }
  private implicit final class CtxExt(private val ctx: Ctx) extends AnyVal {
    def isChild(selfT0: LightTypeTagRef, thatT0: LightTypeTagRef): Boolean = ctx.self.isChild(ctx.next())(selfT0, thatT0)
  }
}

final class LightTypeTagInheritance(self: LightTypeTag, other: LightTypeTag) {
  private[this] lazy val basesdb: ImmutableMultiMap[AbstractReference, AbstractReference] = LightTypeTag.mergeIDBs(self.basesdb, other.basesdb)
  private[this] lazy val idb: ImmutableMultiMap[NameReference, NameReference] = LightTypeTag.mergeIDBs(self.idb, other.idb)

  def isChild(): Boolean = {
    val st = self.ref
    val ot = other.ref
    val logger = TrivialLogger.make[this.type](config = Config.console)

    logger.log(s"""⚙️ Inheritance check: ${self.repr} <?< ${other.repr}
                  |⚡️bases: ${LTTRenderables.Long.renderDb(basesdb)}
                  |⚡️inheritance: ${LTTRenderables.Long.renderDb(idb)}""".stripMargin)

    isChild(Ctx(logger, this))(st, ot)
  }

  private def isChild(ctx: Ctx)(selfT: LightTypeTagRef, thatT: LightTypeTagRef): Boolean = {
    import ctx._
    logger.log(s"✴️ isChild: `${selfT.repr}` <:< `${thatT.repr}`, context = $ctx")

    val result = (selfT, thatT) match {
      case (s, t) if s == t =>
        true
      case (s, _) if s == tpeNothing =>
        true
      case (s, _) if s == tpeNull =>
        // TODO: we may want to check that in case of anyref target type is not a primitve (though why?)
        true
      case (_, t) if t == tpeAny || t == tpeAnyRef || t == tpeObject || t == tpeMatchable =>
        // TODO: we may want to check that in case of anyref target type is not a primitve (though why?)
        true

      case (s: WildcardReference, t: WildcardReference) =>
        s.boundaries match {
          case Boundaries.Defined(_, top) =>
            compareBounds(ctx)(top, t.boundaries)
          case Boundaries.Empty =>
            t.boundaries match {
              case Boundaries.Defined(_, _) =>
                false
              case Boundaries.Empty =>
                true
            }
        }
      case (s: AppliedNamedReference, t: WildcardReference) =>
        compareBounds(ctx)(s, t.boundaries)
      case (s: Lambda, t: WildcardReference) =>
        isChild(ctx.next())(s.output, t)
      case (s: WildcardReference, t) =>
        s.boundaries match {
          case Boundaries.Defined(_, top) =>
            ctx.next().isChild(top, t)
          case Boundaries.Empty =>
            s == t
        }
      // parameterized type
      case (s: FullReference, t: FullReference) =>
        compareParameterizedRefs(ctx)(s, t)

      case (s: FullReference, t: NameReference) =>
        any(
          oneOfParameterizedParentsIsInheritedFrom(ctx)(s, t),
          all(
            compareBounds(ctx)(s, t.boundaries),
            any(
              oneOfUnparameterizedParentsIsInheritedFrom(ctx)(s.asName, t), // constructor inherits from rhs, where rhs is an unparameterized type
//              outerLambdaParams.map(_.name).contains(t.ref.name), // lambda parameter may accept anything within bounds      // UNSOUND-LAMBDA-COMPARISON
//              t.ref.maybeName.exists(outerDecls.map(_.name).contains), // refinement type decl may accept anything within bounds,
              isInBoundsOfAnEqualBoundedAbstractType(s, t) // equal-bounded abstract type
            )
          )
        )

      case (s: NameReference, t: FullReference) =>
        oneOfParameterizedParentsIsInheritedFrom(ctx)(s, t)

      // unparameterized type
      case (s: NameReference, t: NameReference) =>
        val boundIsOk = compareBounds(ctx)(s, t.boundaries)
        any(
          boundIsOk && any(
            oneOfParameterizedParentsIsInheritedFrom(ctx)(s, t),
            oneOfUnparameterizedParentsIsInheritedFrom(ctx)(s, t),
            // outerLambdaParams.map(_.name).contains(t.ref.name), // lambda parameter may accept anything within bounds       // UNSOUND-LAMBDA-COMPARISON
//            t.ref.maybeName.exists(outerDecls.map(_.name).contains), // refinement decl may accept anything within bounds
            isInBoundsOfAnEqualBoundedAbstractType(s, t) // equal-bounded abstract type
          ),
          s.boundaries match {
            case Boundaries.Defined(_, sUp) =>
              ctx.isChild(sUp, t)
            case Boundaries.Empty =>
              false
          }
        )

      // lambdas
      case (s: AppliedNamedReference, t: Lambda) =>
        isChild(ctx.next())(s, t.output)
      case (s: Lambda, t: AppliedNamedReference) =>
        isChild(ctx.next())(s.output, t)
      case (s: Lambda, o: Lambda) =>
        (s.input.size == o.input.size
          && isChild(ctx.next())(s.normalizedOutput, o.normalizedOutput))

      // intersections
      case (s: IntersectionReference, t: IntersectionReference) =>
        // yeah, this shit is quadratic
        t.refs.forall {
          p =>
            s.refs.exists {
              c =>
                ctx.isChild(c, p)
            }
        }
      case (s: IntersectionReference, t: LightTypeTagRef) =>
        s.refs.exists(c => ctx.isChild(c, t))
      case (s: LightTypeTagRef, o: IntersectionReference) =>
        o.refs.forall(t => ctx.isChild(s, t))

      // unions
      case (s: UnionReference, t: UnionReference) =>
        // yeah, this shit is quadratic
        s.refs.forall {
          c =>
            t.refs.exists {
              p =>
                ctx.isChild(c, p)
            }
        }
      case (s: UnionReference, t: LightTypeTagRef) =>
        s.refs.forall(c => ctx.isChild(c, t))
      case (s: LightTypeTagRef, o: UnionReference) =>
        o.refs.exists(t => ctx.isChild(s, t))

      // refinements
      case (s: Refinement, t: Refinement) =>
        ctx.isChild(s.reference, t.reference) && compareDecls(ctx.next())(s.decls, t.decls)
      case (s: Refinement, t: LightTypeTagRef) =>
        ctx.isChild(s.reference, t)
      case (s: AbstractReference, t: Refinement) =>
        oneOfParameterizedParentsIsInheritedFrom(ctx)(s, t)
    }
    logger.log(s"${if (result) "✅" else "⛔️"} isChild: `${selfT.repr}` <:< `${thatT.repr}` == $result")
    result
  }

  private def compareBounds(ctx: Ctx)(s: AbstractReference, t: Boundaries): Boolean = {
    t match {
      case Boundaries.Defined(tLow, tUp) =>
        ctx.isChild(s, tUp) && ctx.isChild(tLow, s)
      case Boundaries.Empty =>
        true
    }
  }

  private def compareDecls(ctx: Ctx)(sDecls: Set[RefinementDecl], tDecls: Set[RefinementDecl]): Boolean = {
    val s = sDecls.groupBy(_.name)
    // for every decl on the right there's a <: decl on the left
    tDecls.forall {
      r =>
        val lOverrides = s.get(r.name).toSet.flatten
        lOverrides.exists(compareDecl(ctx)(_, r))
    }
  }

  private def compareDecl(ctx: Ctx)(s: RefinementDecl, t: RefinementDecl): Boolean = (s, t) match {
    case (
          RefinementDecl.TypeMember(ln, lref),
          RefinementDecl.TypeMember(rn, NameReference(SymName.SymTypeName(rn1), rBounds, None))
        ) if rn == rn1 =>
      // we're comparing two abstract types type X = X|>:A<:B|
      // We know that the type is abstract if its name matches the type member's name
      ln == rn && compareBounds(ctx)(lref, rBounds)
    case (RefinementDecl.TypeMember(ln, lref), RefinementDecl.TypeMember(rn, rref)) =>
      // if the rhs type is not abstract (has form `type X = Int`), then lhs must be exactly equal to it, not <:
      ln == rn && lref == rref
    case (RefinementDecl.Signature(ln, lins, lout), RefinementDecl.Signature(rn, rins, rout)) =>
      (ln == rn
        && lins.iterator.zipAll(rins.iterator, null, null).forall {
          case (null, _) => false
          case (_, null) => false
          case (l, r) => ctx.isChild(r, l) // contravariant
        }
        && ctx.isChild(lout, rout)) // covariant
    case _ =>
      false
  }

  private def compareParameterizedRefs(ctx: Ctx)(self: FullReference, that: FullReference): Boolean = {

    def parametersConform: Boolean = {
      self.parameters.zipAll(that.parameters, null, null).forall {
        case (ps, pt) =>
          (ps ne null) && (pt ne null) && (pt.variance match {
            case Variance.Invariant =>
              pt.ref match {
                case wc: LightTypeTagRef.WildcardReference =>
                  compareBounds(ctx)(ps.ref, wc.boundaries)
                case _ =>
                  ps.ref == pt.ref
              }

            case Variance.Contravariant =>
              pt.ref match {
                case wc: LightTypeTagRef.WildcardReference =>
                  wc.boundaries match {
                    case Boundaries.Defined(bottom, _) =>
                      ctx.isChild(bottom, ps.ref)

                    case Boundaries.Empty =>
                      true
                  }
                case _ =>
                  ctx.isChild(pt.ref, ps.ref)
              }

            case Variance.Covariant =>
              pt.ref match {
                case wc: LightTypeTagRef.WildcardReference =>
                  wc.boundaries match {
                    case Boundaries.Defined(_, top) =>
                      ctx.isChild(ps.ref, top)

                    case Boundaries.Empty =>
                      true
                  }
                case _ =>
                  ctx.isChild(ps.ref, pt.ref)
              }
          })
      }
    }

    val selfNameRef = self.asName
    val thatNameRef = that.asName

    ctx
      .logger.log(
        s"⚠️ comparing parameterized references: `${self.repr}` <:< `${that.repr}`, paramsOk = $parametersConform, ctorsOk = ${selfNameRef == thatNameRef}, sameArity = ${self.parameters.size == that.parameters.size}, context = $ctx"
      )

    if (selfNameRef == thatNameRef) {
      parametersConform
    } else if (oneOfParameterizedParentsIsInheritedFrom(ctx)(self, that)) {
      true
    } else {
      val selfNormalizedLambdaParamsSize = {
        // 0 unless we're in a lambda vs. lambda comparison (s.normalizedOutput <:< t.normalizedOutput)
        self.parameters.count(p => isFakeParam(p.ref))
      }
      val appliedLambdaParents = basesdb
        .iterator.collect {
          case (l: Lambda, lparents) if isSameNamedRef(l.output, selfNameRef) =>
            lparents.flatMap {
              case lp: Lambda =>
                val scala2FullDbFormLambda = {
                  if (lp.input.size == self.parameters.size) {
                    List(lp.combine(self.parameters.map(_.ref)))
                  } else {
                    Nil
                  }
                }
                val scala3FullDbFormLambda = if (lp.input.size == selfNormalizedLambdaParamsSize) {
                  val ps = self.parameters.collect { case FakeParam(pRef) => pRef }
                  val selfPs = ps.sortBy(_.ref.asInstanceOf[SymName.LambdaParamName].index)
                  val res = lp.combine(selfPs)
                  List(res)
                } else Nil
                scala2FullDbFormLambda ++ scala3FullDbFormLambda
              case _ =>
                Nil
            }
        }.flatten.toList
      ctx.logger.log {
        s"ℹ️ checking applied lambda parents of self=`${self.repr}`: parents=${appliedLambdaParents.map(_.repr)} <:< that=`${that.repr}`"
      }
      appliedLambdaParents.exists(ctx.isChild(_, that))
    }
  }

  private def isSameNamedRef(a: AbstractReference, b: AbstractReference): Boolean = {
    (a, b) match {
      case (an: AppliedNamedReference, ab: AppliedNamedReference) =>
        an.asName == ab.asName
      case _ =>
        false
    }
  }

  def isFakeParam(reference: LightTypeTagRef.AbstractReference): Boolean = reference match {
    case reference: NameReference =>
      reference.symName match {
        case l: SymName.LambdaParamName if l.depth == LightTypeTagRef.LambdaConstants.lambdaFakeParamDepth => true
        case _ => false
      }
    case _ => false
  }

  object FakeParam {
    def unapply(tparam: TypeParam): Option[LightTypeTagRef.NameReference] = {
      if (isFakeParam(tparam.ref)) Some(tparam.ref.asInstanceOf[NameReference]) else None
    }
  }

  private def parameterizedParentsOf(t: AbstractReference): Set[AbstractReference] = {
    val basesDbParents = basesdb.getOrElse(t, Set.empty)
    val withBoundaryParents = t match {
      case NameReference(_, b: Boundaries.Defined, _) =>
        basesDbParents + b.top
      case WildcardReference(b: Boundaries.Defined) =>
        basesDbParents + b.top
      case _ =>
        basesDbParents
    }
    withBoundaryParents
  }

  private def oneOfParameterizedParentsIsInheritedFrom(ctx: Ctx)(child: AbstractReference, parent: AbstractReference): Boolean = {
//    ctx.logger.log(s"Checking if ${parameterizedParentsOf(child)} has a parent of $parent")
    val parents = parameterizedParentsOf(child)
    ctx.logger.log(s"Looking up parameterized parents of $child => $parents")
    parents.exists(ctx.isChild(_, parent))
  }

  private def oneOfUnparameterizedParentsIsInheritedFrom(ctx: Ctx)(child: NameReference, parent: NameReference): Boolean = {
    val parents = unparameterizedParentsOf(child)
    ctx.logger.log(s"Looking up unparameterized parents of $child => $parents")
    parents.exists(ctx.isChild(_, parent))
  }

  private def isInBoundsOfAnEqualBoundedAbstractType(child: AbstractReference, parent: NameReference): Boolean = {
    parent.boundaries match {
      case Boundaries.Defined(bottom, top) if top == bottom && top == child => true
      case _ => false
    }
  }

  private def unparameterizedParentsOf(t: NameReference): mutable.HashSet[NameReference] = {
    def parentsOf(t: NameReference, out: mutable.HashSet[NameReference], tested: mutable.HashSet[NameReference]): Unit = {
      val direct = idb.get(t).toSet.flatten
      tested += t
      out ++= direct

      val nextNames = direct.map(_.asName)
      nextNames
        .diff(tested)
        .foreach {
          b =>
            parentsOf(b.asName, out, tested)
        }
    }

    val out = mutable.HashSet[NameReference]()
    val tested = mutable.HashSet[NameReference]()
    parentsOf(t, out, tested)
    out
  }

}


================================================
FILE: izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LightTypeTagRef.scala
================================================
/*
 * Copyright 2019-2020 Septimal Mind Ltd
 * Copyright 2020 John A. De Goes and the ZIO Contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * You may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */

package izumi.reflect.macrortti

import izumi.reflect.macrortti.LightTypeTagRef.{AbstractReference, AppliedReference}
import izumi.reflect.macrortti.LightTypeTagRef.SymName.{LambdaParamName, SymTypeName}

import scala.runtime.AbstractFunction3
import scala.util.hashing.MurmurHash3
import scala.util.{Failure, Success, Try}

sealed trait LightTypeTagRef extends LTTSyntax with Serializable {

  // bincompat with versions before 2.3.0
  final def combine(args: Seq[LightTypeTagRef]): AbstractReference = this.combineImpl(args)
  final def combineNonPos(args: Seq[Option[LightTypeTagRef]]): AbstractReference = this.combineNonPosImpl(args)
  final def withoutArgs: AbstractReference = this.withoutArgsImpl
  /** Render to string, omitting package names */
  override final def toString: String = this.toStringImpl
  /** Fully-qualified rendering of a type, including packages and prefix types.
    * Use [[toString]] for a rendering that omits package names
    */
  final def repr: String = this.reprImpl
  final def scalaStyledRepr: String = this.scalaStyledReprImpl
  @deprecated("Renamed to scalaStyledRepr", "3.0.8")
  final def scalaStyledName: String = this.scalaStyledReprImpl
  final def shortName: String = this.shortNameImpl
  final def longNameWithPrefix: String = this.longNameWithPrefixImpl
  final def longNameInternalSymbol: String = this.longNameInternalSymbolImpl
  @deprecated(
    "Produces Scala version dependent output, with incorrect prefixes for types with value prefixes. Use `longNameWithPrefix` instead, or `longNameInternalSymbol` for old behavior",
    "2.2.2"
  )
  final def longName: String = this.longNameInternalSymbolImpl
  final def getPrefix: Option[AppliedReference] = this.getPrefixImpl
  final def typeArgs: List[AbstractReference] = this.typeArgsImpl
  /** decompose intersection type */
  final def decompose: Set[LightTypeTagRef.AppliedReferenceExceptIntersection] = this.decomposeImpl
  final def decomposeUnion: Set[LightTypeTagRef.AppliedReferenceExceptUnion] = this.decomposeUnionImpl

}

object LightTypeTagRef extends LTTOrdering {
  import LTTRenderables.Short._
//  import LTTRenderables.Long._

  sealed trait AbstractReference extends LightTypeTagRef

  // bincompat only
  private[macrortti] sealed abstract class LambdaParameter {
    @deprecated("bincompat only", "20.02.2023")
    private[macrortti] def name: String
  }
  @deprecated("bincompat only", "20.02.2023")
  private[macrortti] object LambdaParameter extends (String => LambdaParameter) {
    @deprecated("bincompat only", "20.02.2023")
    def apply(name: String): LambdaParameter = {
      SymName.bincompatForceCreateLambdaParamNameFromString(name)
    }
  }

  final case class Lambda(input: List[SymName.LambdaParamName], output: AbstractReference) extends AbstractReference {
    override def hashCode(): Int = {
      normalizedOutput.hashCode()
    }

    lazy val inputSize: Int = input.size
    lazy val paramRefs: Set[NameReference] = input
      .iterator.map {
        n =>
          // No boundary on paramRefs
          // FIXME LambdaParameter should contain bounds and NameReference shouldn't
          //       (Except possibly lower bound of an abstract/opaque type member)
          NameReference(n)
      }.toSet
    lazy val referenced: Set[NameReference] = RuntimeAPI.unpack(this)
    def allArgumentsReferenced: Boolean = paramRefs.diff(referenced).isEmpty
    lazy val someArgumentsReferenced: Boolean = {
      val unusedParamsSize = paramRefs.diff(referenced).size
      unusedParamsSize < paramRefs.size
    }

    lazy val normalizedParams: List[NameReference] = makeFakeParams.map(_._2)
    lazy val normalizedOutput: AbstractReference = RuntimeAPI.applyLambda(this, makeFakeParams)

    override def equals(obj: Any): Boolean = {
      obj match {
        case l: Lambda =>
          inputSize == l.inputSize &&
          (normalizedOutput == l.normalizedOutput)

        case _ =>
          false
      }
    }

    private[this] def makeFakeParams: List[(LambdaParamName, NameReference)] = {
      input.zipWithIndex.map {
        case (p, idx) =>
          p -> NameReference(SymName.LambdaParamName(idx, LightTypeTagRef.LambdaConstants.lambdaFakeParamDepth, inputSize)) // s"!FAKE_$idx"
      }
    }
  }

  object LambdaConstants {
    final val defaultContextId = -1
    final val lambdaFakeParamDepth: Int = -2 // depth is always positive, unless fake
    final val tagMacro = -3
  }

  sealed trait AppliedReference extends AbstractReference

  sealed trait AppliedReferenceExceptIntersection extends AppliedReference
  sealed trait AppliedReferenceExceptUnion extends AppliedReference

  final case class IntersectionReference(refs: Set[AppliedReferenceExceptIntersection]) extends AppliedReferenceExceptUnion {
    override lazy val hashCode: Int = scala.runtime.ScalaRunTime._hashCode(this)
  }

  final case class WildcardReference(boundaries: Boundaries) extends AppliedReferenceExceptIntersection with AppliedReferenceExceptUnion

  final case class UnionReference(refs: Set[AppliedReferenceExceptUnion]) extends AppliedReferenceExceptIntersection {
    override lazy val hashCode: Int = scala.runtime.ScalaRunTime._hashCode(this)
  }

  final case class Refinement(reference: AppliedReference, decls: Set[RefinementDecl]) extends AppliedReferenceExceptIntersection with AppliedReferenceExceptUnion {
    override lazy val hashCode: Int = scala.runtime.ScalaRunTime._hashCode(this)
  }

  def isIgnored[T <: AbstractReference](t: T): Boolean = {
    t match {
      case a: AppliedReference =>
        ignored.contains(a)
      case _: Lambda =>
        false
    }
  }

  private[reflect] def ignored[T >: NameReference]: Set[T] = ignored0.asInstanceOf[Set[T]]
  private[this] val ignored0: Set[NameReference] = Set[NameReference](
    LightTypeTagInheritance.tpeAny,
    LightTypeTagInheritance.tpeMatchable,
    LightTypeTagInheritance.tpeAnyRef,
    LightTypeTagInheritance.tpeObject
  )

  def maybeIntersection(refs0: Iterator[_ <: LightTypeTagRef]): AppliedReference = {
    val refs = refs0.flatMap(_.decompose).toSet // flatten nested intersections
    if (refs.size == 1) {
      refs.head
    } else {
      val normalized = refs.diff(ignored)
      if (normalized.isEmpty) {
        LightTypeTagInheritance.tpeAny
      } else if (normalized.size == 1) {
        normalized.head
      } else {
        IntersectionReference(normalized)
      }
    }
  }

  def maybeUnion(refs0: Iterator[_ <: LightTypeTagRef]): AppliedReference = {
    val refs = refs0.flatMap(_.decomposeUnion).toSet // flatten nested unions
    val normalized = refs -- Set(LightTypeTagInheritance.tpeNothing, LightTypeTagInheritance.tpeNull)
    val superTypes = normalized.intersect(ignored)
    if (superTypes.nonEmpty) {
      if (normalized.contains(LightTypeTagInheritance.tpeAny)) LightTypeTagInheritance.tpeAny
      else if (normalized.contains(LightTypeTagInheritance.tpeMatchable)) LightTypeTagInheritance.tpeMatchable
      else if (normalized.contains(LightTypeTagInheritance.tpeAnyRef)) LightTypeTagInheritance.tpeAnyRef
      else if (normalized.contains(LightTypeTagInheritance.tpeObject)) LightTypeTagInheritance.tpeObject
      else superTypes.head
    } else {
      if (normalized.isEmpty) {
        LightTypeTagInheritance.tpeNothing
      } else if (normalized.size == 1) {
        normalized.head
      } else {
        UnionReference(normalized)
      }
    }
  }

  def maybeIntersection(r: Set[_ <: LightTypeTagRef]): AppliedReference = maybeIntersection(r.iterator)
  def maybeUnion(r: Set[_ <: LightTypeTagRef]): AppliedReference = maybeUnion(r.iterator)

  sealed trait AppliedNamedReference extends AppliedReferenceExceptIntersection with AppliedReferenceExceptUnion {
    def asName: NameReference
    def symName: SymName
    def prefix: Option[AppliedReference]
  }

  final case class NameReference(
    ref: SymName,
    boundaries: Boundaries = Boundaries.Empty, // Quirk, we only need it to use NameReferences as Lambda parameters
    prefix: Option[AppliedReference] = None
  ) extends AppliedNamedReference {
    override lazy val hashCode: Int = scala.runtime.ScalaRunTime._hashCode(this)

    override def asName: NameReference = this
    override def symName: SymName = ref
  }
  object NameReference {
    @deprecated("Use SymName explicitly", "20.02.2023")
    private[NameReference] def apply(tpeName: String): NameReference = NameReference(SymTypeName(tpeName))
  }

  final case class FullReference(
    symName: SymName,
    parameters: List[TypeParam],
    prefix: Option[AppliedReference] = None
  ) extends AppliedNamedReference {
    override lazy val hashCode: Int = scala.runtime.ScalaRunTime._hashCode(this)

    override def asName: NameReference = NameReference(symName, boundaries = Boundaries.Empty, prefix = prefix)

    @deprecated("bincompat only", "20.02.2023")
    private[LightTypeTagRef] def ref: String = SymName.forceName(symName)

    @deprecated("bincompat only", "20.02.2023")
    private[LightTypeTagRef] def this(ref: String, parameters: List[TypeParam], prefix: Option[AppliedReference]) = {
      this(SymName.SymTypeName(ref), parameters, prefix)
    }

    @deprecated("bincompat only", "20.02.2023")
    private[LightTypeTagRef] def copy(ref: String, parameters: List[TypeParam], prefix: Option[AppliedReference]): FullReference = {
      this.copy(SymName.SymTypeName(ref), parameters, prefix)
    }
    @deprecated("bincompat only", "20.02.2023")
    private[LightTypeTagRef] def copy$default$1: String = ref

    def copy(symName: SymName = symName, parameters: List[TypeParam] = parameters, prefix: Option[AppliedReference] = prefix): FullReference = {
      new FullReference(symName, parameters, prefix)
    }

  }
  object FullReference extends /*bincompat*/ AbstractFunction3[String, List[TypeParam], Option[AppliedReference], FullReference] {
    @deprecated("bincompat only", "20.02.2023")
    override def apply(ref: String, parameters: List[TypeParam], prefix: Option[AppliedReference]): FullReference = {
      new FullReference(SymName.SymTypeName(ref), parameters, prefix)
    }
  }

  final case class TypeParam(
    ref: AbstractReference,
    variance: Variance // Quirk, we only need it to simplify/speedup inheritance checks
  ) {
    override def toString: String = this.render()
  }

  sealed trait RefinementDecl {
    def name: String
  }
  object RefinementDecl {
    final case class Signature(name: String, input: List[AppliedReference], output: AppliedRe
Download .txt
gitextract_msmhs6p6/

├── .envrc
├── .git-blame-ignore-revs
├── .gitattributes
├── .github/
│   ├── CODEOWNERS
│   ├── FUNDING.yml
│   └── workflows/
│       └── build.yml
├── .gitignore
├── .jvmopts
├── .mdl/
│   ├── defs/
│   │   └── actions.md
│   └── resources/
│       └── zio-docs.sbt
├── .scala-steward.conf
├── .scalafmt.conf
├── CLA.md
├── CLAUDE.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── build.sbt
├── docs/
│   ├── index.md
│   ├── package.json
│   └── sidebars.js
├── flake.nix
├── fmt-all
├── izumi-reflect/
│   ├── izumi-reflect/
│   │   ├── .js/
│   │   │   └── src/
│   │   │       └── test/
│   │   │           └── scala-2/
│   │   │               └── izumi/
│   │   │                   └── reflect/
│   │   │                       └── test/
│   │   │                           └── PlatformSpecific.scala
│   │   ├── .jvm/
│   │   │   └── src/
│   │   │       └── test/
│   │   │           └── scala-2/
│   │   │               └── izumi/
│   │   │                   └── reflect/
│   │   │                       └── test/
│   │   │                           ├── AllPartsStrongTestScala2Jvm.scala
│   │   │                           └── PlatformSpecific.scala
│   │   ├── .native/
│   │   │   └── src/
│   │   │       └── test/
│   │   │           └── scala-2/
│   │   │               └── izumi/
│   │   │                   └── reflect/
│   │   │                       └── test/
│   │   │                           └── PlatformSpecific.scala
│   │   └── src/
│   │       ├── main/
│   │       │   ├── scala/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           ├── DebugProperties.scala
│   │       │   │           ├── internal/
│   │       │   │           │   └── fundamentals/
│   │       │   │           │       ├── collections/
│   │       │   │           │       │   ├── IzCollections.scala
│   │       │   │           │       │   ├── IzMappings.scala
│   │       │   │           │       │   └── package.scala
│   │       │   │           │       ├── functional/
│   │       │   │           │       │   └── Renderable.scala
│   │       │   │           │       └── platform/
│   │       │   │           │           ├── assertions/
│   │       │   │           │           │   └── IzAssert.scala
│   │       │   │           │           ├── basics/
│   │       │   │           │           │   └── IzBoolean.scala
│   │       │   │           │           ├── console/
│   │       │   │           │           │   └── TrivialLogger.scala
│   │       │   │           │           └── strings/
│   │       │   │           │               └── IzString.scala
│   │       │   │           └── macrortti/
│   │       │   │               ├── LTTOrdering.scala
│   │       │   │               ├── LTTRenderables.scala
│   │       │   │               ├── LTTSyntax.scala
│   │       │   │               ├── LightTypeTag.scala
│   │       │   │               ├── LightTypeTagInheritance.scala
│   │       │   │               ├── LightTypeTagRef.scala
│   │       │   │               └── RuntimeAPI.scala
│   │       │   ├── scala-2/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           ├── AnnotationTools.scala
│   │       │   │           ├── ReflectionUtil.scala
│   │       │   │           ├── ScalacSink.scala
│   │       │   │           ├── TagMacro.scala
│   │       │   │           ├── Tags.scala
│   │       │   │           ├── TrivialMacroLogger.scala
│   │       │   │           ├── macrortti/
│   │       │   │           │   ├── LTag.scala
│   │       │   │           │   ├── LightTypeTagImpl.scala
│   │       │   │           │   ├── LightTypeTagMacro.scala
│   │       │   │           │   └── package.scala
│   │       │   │           └── package.scala
│   │       │   ├── scala-2.11/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               └── NowarnCompat/
│   │       │   │                   └── nowarn.scala
│   │       │   ├── scala-2.12+/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               └── NowarnCompat.scala
│   │       │   ├── scala-2.12-/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               ├── CollectionCompat.scala
│   │       │   │               ├── OrderingCompat.scala
│   │       │   │               └── fundamentals/
│   │       │   │                   └── platform/
│   │       │   │                       └── language/
│   │       │   │                           └── unused.scala
│   │       │   ├── scala-2.13+/
│   │       │   │   └── izumi/
│   │       │   │       └── reflect/
│   │       │   │           └── internal/
│   │       │   │               ├── CollectionCompat.scala
│   │       │   │               ├── OrderingCompat.scala
│   │       │   │               └── fundamentals/
│   │       │   │                   └── platform/
│   │       │   │                       └── language/
│   │       │   │                           └── package.scala
│   │       │   └── scala-3/
│   │       │       └── izumi/
│   │       │           └── reflect/
│   │       │               ├── TagMacro.scala
│   │       │               ├── Tags.scala
│   │       │               ├── dottyreflection/
│   │       │               │   ├── FullDbInspector.scala
│   │       │               │   ├── InheritanceDbInspector.scala
│   │       │               │   ├── Inspect.scala
│   │       │               │   ├── Inspector.scala
│   │       │               │   ├── InspectorBase.scala
│   │       │               │   ├── ReflectionUtil.scala
│   │       │               │   └── TypeInspections.scala
│   │       │               └── macrortti/
│   │       │                   ├── LTag.scala
│   │       │                   └── package.scala
│   │       └── test/
│   │           ├── scala/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           ├── internal/
│   │           │           │   └── fundamentals/
│   │           │           │       ├── collections/
│   │           │           │       │   └── IzCollectionsTest.scala
│   │           │           │       └── platform/
│   │           │           │           └── IzStringTest.scala
│   │           │           └── test/
│   │           │               ├── CurrentDottySupportExtentTest.scala
│   │           │               ├── InheritedModel.scala
│   │           │               ├── LTTRenderablesTest.scala
│   │           │               ├── SharedLightTypeTagProgressionTest.scala
│   │           │               ├── SharedLightTypeTagTest.scala
│   │           │               ├── SharedTagProgressionTest.scala
│   │           │               ├── SharedTagTest.scala
│   │           │               ├── TagAssertions.scala
│   │           │               ├── TagCombineTest.scala
│   │           │               ├── TagLogging.scala
│   │           │               ├── TagProgressions.scala
│   │           │               └── TestModel.scala
│   │           ├── scala-2/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               ├── BasicDottyTestMirror.scala
│   │           │               ├── DiscoveryModel.scala
│   │           │               ├── IsScala3.scala
│   │           │               ├── LightTypeTagProgressionTest.scala
│   │           │               ├── LightTypeTagTest.scala
│   │           │               ├── TagProgressionTest.scala
│   │           │               └── TagTest.scala
│   │           ├── scala-2.11/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala2MinorVersion.scala
│   │           ├── scala-2.12/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala2MinorVersion.scala
│   │           ├── scala-2.13/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala2MinorVersion.scala
│   │           ├── scala-2.13+/
│   │           │   └── izumi/
│   │           │       └── reflect/
│   │           │           └── test/
│   │           │               └── Scala213Plus_LightTypeTagTest.scala
│   │           └── scala-3/
│   │               └── izumi/
│   │                   └── reflect/
│   │                       └── test/
│   │                           ├── BasicDottyTest.scala
│   │                           ├── DiscoveryModel.scala
│   │                           ├── DottyRegressionTests.scala
│   │                           ├── IsScala3.scala
│   │                           ├── LightTypeTagProgressionTest.scala
│   │                           ├── LightTypeTagTest.scala
│   │                           ├── PlatformSpecific.scala
│   │                           ├── Scala2MinorVersion.scala
│   │                           ├── TagProgressionTest.scala
│   │                           └── TagTest.scala
│   └── izumi-reflect-thirdparty-boopickle-shaded/
│       ├── .js/
│       │   └── src/
│       │       └── main/
│       │           └── scala/
│       │               └── izumi/
│       │                   └── reflect/
│       │                       └── thirdparty/
│       │                           └── internal/
│       │                               └── boopickle/
│       │                                   ├── ReferenceEquality.scala
│       │                                   └── StringCodec.scala
│       ├── .jvm/
│       │   └── src/
│       │       └── main/
│       │           └── scala/
│       │               └── izumi/
│       │                   └── reflect/
│       │                       └── thirdparty/
│       │                           └── internal/
│       │                               └── boopickle/
│       │                                   ├── DefaultByteBufferProvider.scala
│       │                                   ├── ReferenceEquality.scala
│       │                                   └── StringCodec.scala
│       ├── .native/
│       │   └── src/
│       │       └── main/
│       │           └── scala/
│       │               └── izumi/
│       │                   └── reflect/
│       │                       └── thirdparty/
│       │                           └── internal/
│       │                               └── boopickle/
│       │                                   ├── DefaultByteBufferProvider.scala
│       │                                   ├── ReferenceEquality.scala
│       │                                   └── StringCodec.scala
│       └── src/
│           ├── main/
│           │   ├── scala/
│           │   │   └── izumi/
│           │   │       └── reflect/
│           │   │           └── thirdparty/
│           │   │               └── internal/
│           │   │                   └── boopickle/
│           │   │                       ├── BufferPool.scala
│           │   │                       ├── BufferProvider.scala
│           │   │                       ├── CodecSize.scala
│           │   │                       ├── Codecs.scala
│           │   │                       ├── CompositePicklers.scala
│           │   │                       ├── Constants.scala
│           │   │                       ├── Default.scala
│           │   │                       ├── IdentList.scala
│           │   │                       ├── IdentMap.scala
│           │   │                       ├── Pickler.scala
│           │   │                       ├── StringCodecBase.scala
│           │   │                       └── TuplePicklers.scala
│           │   ├── scala-2.12-/
│           │   │   └── izumi/
│           │   │       └── reflect/
│           │   │           └── thirdparty/
│           │   │               └── internal/
│           │   │                   └── boopickle/
│           │   │                       └── XCompat.scala
│           │   └── scala-2.13+/
│           │       └── izumi/
│           │           └── reflect/
│           │               └── thirdparty/
│           │                   └── internal/
│           │                       └── boopickle/
│           │                           └── XCompat.scala
│           └── test/
│               └── scala/
│                   └── izumi/
│                       └── reflect/
│                           └── .keep
├── keys.sh
├── project/
│   ├── Deps.sc
│   ├── Settings.scala
│   ├── Versions.scala
│   ├── build.properties
│   ├── plugins.sbt
│   └── project/
│       └── PluginVersions.scala
├── sbtgen.sc
├── secrets.tar.enc
└── version.sbt
Condensed preview — 141 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (668K chars).
[
  {
    "path": ".envrc",
    "chars": 100,
    "preview": "use_flake\n\n# Remove git-minimal from PATH to keep system git\nPATH_rm '/nix/store/*git-minimal*/bin'\n"
  },
  {
    "path": ".git-blame-ignore-revs",
    "chars": 527,
    "preview": "# Scala Steward: Reformat with scalafmt 3.7.2\nedcec351367976c77a5a5ce2842804232e6f7ca5\n\n# Scala Steward: Reformat with s"
  },
  {
    "path": ".gitattributes",
    "chars": 422,
    "preview": "*                           text=auto\n.git*                       text export-ignore\n\n*.sbt                       text\n*"
  },
  {
    "path": ".github/CODEOWNERS",
    "chars": 23,
    "preview": "* @pshirshov @neko-kai\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 762,
    "preview": "# These are supported funding model platforms\n\ngithub: 7mind # Replace with up to 4 GitHub Sponsors-enabled usernames e."
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 4951,
    "preview": "name: Build\n\non:\n  workflow_dispatch:\n    inputs: {}\n  push:\n    branches: [ \"develop\" ]\n    tags: [ \"v**\" ]\n  pull_requ"
  },
  {
    "path": ".gitignore",
    "chars": 1984,
    "preview": ".mdl/runs/\n.env\n.direnv\n.hydra\n.idea\n*.jps\n/local.sbt\n.secrets*\n/config\n.agg\n.bsp\nproject/project/project\nproject/projec"
  },
  {
    "path": ".jvmopts",
    "chars": 1024,
    "preview": "\n# toggle debug output\n#-Dizumi.reflect.debug.macro.rtti=true\n#-Dizumi.reflect.debug.macro.rtti=false\n\n# toggle debug as"
  },
  {
    "path": ".mdl/defs/actions.md",
    "chars": 8010,
    "preview": "# Build Actions\n\n## Environment\n\n- `LANG=C.UTF-8`\n\n## passthrough\n- `HOME`\n- `USER`\n- `OPENSSL_IV`\n- `OPENSSL_KEY`\n- `SO"
  },
  {
    "path": ".mdl/resources/zio-docs.sbt",
    "chars": 435,
    "preview": "lazy val docs = project\n  .in(file(\"izumi-reflect-docs\"))\n  .settings(\n    publish / skip := true,\n    moduleName := \"iz"
  },
  {
    "path": ".scala-steward.conf",
    "chars": 988,
    "preview": "updates.pin  = [\n  # do not update Scala 2.13 because of revoked forward compatibility\n  { groupId = \"org.scala-lang\", a"
  },
  {
    "path": ".scalafmt.conf",
    "chars": 1931,
    "preview": "version = \"3.9.4\"\nrunner.dialect = scala3\nproject.git = true\nproject.excludePaths = [\"glob:**.sbt\", \"glob:**sbtgen.sc\"]\n"
  },
  {
    "path": "CLA.md",
    "chars": 8116,
    "preview": "# ZIO Contributor License Agreement\n\nThank you for your interest in contributing to the ZIO open source project.\n\nThis c"
  },
  {
    "path": "CLAUDE.md",
    "chars": 136,
    "preview": "**IMPORTANT** All the conversations must be done in Irish.\nThey will be reviewed by Irish speakers who doesn't speak Eng"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3216,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "LICENSE",
    "chars": 523,
    "preview": "Licensed under the Apache License, Version 2.0 (the \"License\");\nYou may not use this file except in compliance with the "
  },
  {
    "path": "README.md",
    "chars": 7726,
    "preview": "[![Project stage][Stage]][Stage-Page]\n[![Build](https://github.com/zio/izumi-reflect/workflows/Build/badge.svg)](https:/"
  },
  {
    "path": "build.sbt",
    "chars": 27677,
    "preview": "// DO NOT EDIT THIS FILE\n// IT IS AUTOGENERATED BY `sbtgen.sc` SCRIPT\n// ALL CHANGES WILL BE LOST\n\n\nimport sbtcrossproje"
  },
  {
    "path": "docs/index.md",
    "chars": 107,
    "preview": "---\nid: index\ntitle: \"Introduction to izumi-reflect\"\nsidebar_label: \"izumi-reflect\"\n---\n\n@PROJECT_BADGES@\n\n"
  },
  {
    "path": "docs/package.json",
    "chars": 114,
    "preview": "{\n  \"name\": \"@zio.dev/izumi-reflect\",\n  \"description\": \"izumi-reflect Documentation\",\n  \"license\": \"Apache-2.0\"\n}\n"
  },
  {
    "path": "docs/sidebars.js",
    "chars": 216,
    "preview": "const sidebars = {\n  sidebar: [\n    {\n      type: \"category\",\n      label: \"Izumi Reflect\",\n      collapsed: false,\n    "
  },
  {
    "path": "flake.nix",
    "chars": 1365,
    "preview": "{\n  description = \"izumi-reflect build environment\";\n\n  inputs.nixpkgs.url = \"github:NixOS/nixpkgs/25.11\";\n\n  inputs.fla"
  },
  {
    "path": "fmt-all",
    "chars": 44,
    "preview": "#!/usr/bin/env sh\n\ncs launch scalafmt -- $@\n"
  },
  {
    "path": "izumi-reflect/izumi-reflect/.js/src/test/scala-2/izumi/reflect/test/PlatformSpecific.scala",
    "chars": 910,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/.jvm/src/test/scala-2/izumi/reflect/test/AllPartsStrongTestScala2Jvm.scala",
    "chars": 2784,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/.jvm/src/test/scala-2/izumi/reflect/test/PlatformSpecific.scala",
    "chars": 1377,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/.native/src/test/scala-2/izumi/reflect/test/PlatformSpecific.scala",
    "chars": 840,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/DebugProperties.scala",
    "chars": 3138,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/IzCollections.scala",
    "chars": 993,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/IzMappings.scala",
    "chars": 1335,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/collections/package.scala",
    "chars": 1046,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/functional/Renderable.scala",
    "chars": 1430,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/assertions/IzAssert.scala",
    "chars": 1081,
    "preview": "package izumi.reflect.internal.fundamentals.platform.assertions\n\nimport izumi.reflect.DebugProperties\nimport izumi.refle"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/basics/IzBoolean.scala",
    "chars": 1706,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/console/TrivialLogger.scala",
    "chars": 3707,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/internal/fundamentals/platform/strings/IzString.scala",
    "chars": 1662,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LTTOrdering.scala",
    "chars": 8013,
    "preview": "package izumi.reflect.macrortti\n\nimport izumi.reflect.internal.OrderingCompat\nimport izumi.reflect.macrortti.LightTypeTa"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LTTRenderables.scala",
    "chars": 12431,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LTTSyntax.scala",
    "chars": 7913,
    "preview": "package izumi.reflect.macrortti\n\nimport izumi.reflect.macrortti.LightTypeTagRef.SymName.LambdaParamName\nimport izumi.ref"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LightTypeTag.scala",
    "chars": 45342,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LightTypeTagInheritance.scala",
    "chars": 16047,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/LightTypeTagRef.scala",
    "chars": 13979,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala/izumi/reflect/macrortti/RuntimeAPI.scala",
    "chars": 7583,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/AnnotationTools.scala",
    "chars": 932,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/ReflectionUtil.scala",
    "chars": 6534,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/ScalacSink.scala",
    "chars": 1029,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/TagMacro.scala",
    "chars": 28466,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/Tags.scala",
    "chars": 9462,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/TrivialMacroLogger.scala",
    "chars": 1355,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/macrortti/LTag.scala",
    "chars": 1587,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/macrortti/LightTypeTagImpl.scala",
    "chars": 36367,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/macrortti/LightTypeTagMacro.scala",
    "chars": 4123,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/macrortti/package.scala",
    "chars": 3951,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2/izumi/reflect/package.scala",
    "chars": 6273,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.11/izumi/reflect/internal/NowarnCompat/nowarn.scala",
    "chars": 140,
    "preview": "package izumi.reflect.internal.NowarnCompat\n\nprivate[reflect] class nowarn(value: String = \"\") extends scala.annotation."
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.12+/izumi/reflect/internal/NowarnCompat.scala",
    "chars": 136,
    "preview": "package izumi.reflect.internal\n\nprivate[reflect] object NowarnCompat {\n  private[reflect] final type nowarn = scala.anno"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.12-/izumi/reflect/internal/CollectionCompat.scala",
    "chars": 162,
    "preview": "package izumi.reflect.internal\n\nprivate[reflect] object CollectionCompat {\n  private[reflect] final type IterableOnce[+A"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.12-/izumi/reflect/internal/OrderingCompat.scala",
    "chars": 516,
    "preview": "package izumi.reflect.internal\n\nimport scala.collection.mutable\n\nprivate[reflect] object OrderingCompat {\n  @inline priv"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.12-/izumi/reflect/internal/fundamentals/platform/language/unused.scala",
    "chars": 814,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.13+/izumi/reflect/internal/CollectionCompat.scala",
    "chars": 159,
    "preview": "package izumi.reflect.internal\n\nprivate[reflect] object CollectionCompat {\n  private[reflect] final type IterableOnce[+A"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.13+/izumi/reflect/internal/OrderingCompat.scala",
    "chars": 498,
    "preview": "package izumi.reflect.internal\n\nimport scala.collection.mutable\n\nprivate[reflect] object OrderingCompat {\n  @inline priv"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-2.13+/izumi/reflect/internal/fundamentals/platform/language/package.scala",
    "chars": 139,
    "preview": "package izumi.reflect.internal.fundamentals.platform\n\npackage object language {\n  private[reflect] type unused = scala.a"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/TagMacro.scala",
    "chars": 13706,
    "preview": "package izumi.reflect\n\nimport scala.quoted.{Expr, Quotes, Type, Varargs}\nimport izumi.reflect.macrortti.{LightTypeTag, L"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/Tags.scala",
    "chars": 10242,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/FullDbInspector.scala",
    "chars": 9664,
    "preview": "package izumi.reflect.dottyreflection\n\nimport izumi.reflect.internal.fundamentals.collections.IzCollections.toRich\nimpor"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/InheritanceDbInspector.scala",
    "chars": 5166,
    "preview": "package izumi.reflect.dottyreflection\n\nimport izumi.reflect.internal.fundamentals.collections.IzCollections.toRich\nimpor"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/Inspect.scala",
    "chars": 2061,
    "preview": "package izumi.reflect.dottyreflection\n\nimport izumi.reflect.macrortti.LightTypeTag\nimport izumi.reflect.macrortti.LightT"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/Inspector.scala",
    "chars": 17505,
    "preview": "package izumi.reflect.dottyreflection\n\nimport izumi.reflect.macrortti.{LightTypeTagInheritance, LightTypeTagRef}\nimport "
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/InspectorBase.scala",
    "chars": 1706,
    "preview": "package izumi.reflect.dottyreflection\n\nimport scala.quoted.Quotes\n\ntrait InspectorBase extends ReflectionUtil {\n\n  val q"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/ReflectionUtil.scala",
    "chars": 15281,
    "preview": "package izumi.reflect.dottyreflection\n\nimport scala.annotation.{nowarn, tailrec, unused}\nimport scala.collection.immutab"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/dottyreflection/TypeInspections.scala",
    "chars": 737,
    "preview": "package izumi.reflect.dottyreflection\n\nimport izumi.reflect.macrortti.LightTypeTagRef.{AbstractReference, NameReference}"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/macrortti/LTag.scala",
    "chars": 1417,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/main/scala-3/izumi/reflect/macrortti/package.scala",
    "chars": 3448,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/internal/fundamentals/collections/IzCollectionsTest.scala",
    "chars": 1191,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/internal/fundamentals/platform/IzStringTest.scala",
    "chars": 1122,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/CurrentDottySupportExtentTest.scala",
    "chars": 1775,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti._\n\ntrait CurrentDottySupportExtentTest extends TagAssertions "
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/InheritedModel.scala",
    "chars": 1064,
    "preview": "package izumi.reflect.test\n\ntrait InheritedModel {\n\n  class Dep\n\n  trait BIOService[F[_, _]]\n  type BIOServiceL[F[+_, +_"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/LTTRenderablesTest.scala",
    "chars": 2420,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti._\n\nclass LTTRenderablesTest extends TagAssertions {\n\n  object"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/SharedLightTypeTagProgressionTest.scala",
    "chars": 6892,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti._\n\n/**\n  * The tests here are *progression* tests, that means"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/SharedLightTypeTagTest.scala",
    "chars": 52183,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti.LightTypeTagRef.{AbstractReference, AppliedNamedReference, Bo"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/SharedTagProgressionTest.scala",
    "chars": 10290,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti._\nimport izumi.reflect.test.TestModel._\nimport izumi.reflect."
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/SharedTagTest.scala",
    "chars": 42555,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti.LightTypeTag.ParsedLightTypeTag230Plus\nimport izumi.reflect.m"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/TagAssertions.scala",
    "chars": 4454,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/TagCombineTest.scala",
    "chars": 782,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti.LightTypeTag\nimport izumi.reflect.{Tag, TagK, TagK3}\n\nobject "
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/TagLogging.scala",
    "chars": 1265,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.internal.fundamentals.platform.assertions.IzAssert\nimport izumi.reflect"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/TagProgressions.scala",
    "chars": 568,
    "preview": "package izumi.reflect.test\n\nimport org.scalatest.exceptions.TestFailedException\n\ntrait TagProgressions { this: TagAssert"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala/izumi/reflect/test/TestModel.scala",
    "chars": 4405,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/BasicDottyTestMirror.scala",
    "chars": 769,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/DiscoveryModel.scala",
    "chars": 396,
    "preview": "package izumi.reflect.test\n\nobject DiscoveryModel {\n\n  trait NodeId\n  trait DiscoverableService {\n    type DiscoveryNode"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/IsScala3.scala",
    "chars": 223,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.internal.fundamentals.platform.language.unused\n\nimport scala.language.i"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/LightTypeTagProgressionTest.scala",
    "chars": 856,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/LightTypeTagTest.scala",
    "chars": 1996,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/TagProgressionTest.scala",
    "chars": 171,
    "preview": "package izumi.reflect.test\n\nclass TagProgressionTest extends SharedTagProgressionTest {\n  // All Scala 2 specific progre"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2/izumi/reflect/test/TagTest.scala",
    "chars": 5059,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2.11/izumi/reflect/test/Scala2MinorVersion.scala",
    "chars": 93,
    "preview": "package izumi.reflect.test\n\nobject Scala2MinorVersion {\n  def scala2MinorVersion: Int = 11\n}\n"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2.12/izumi/reflect/test/Scala2MinorVersion.scala",
    "chars": 93,
    "preview": "package izumi.reflect.test\n\nobject Scala2MinorVersion {\n  def scala2MinorVersion: Int = 12\n}\n"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2.13/izumi/reflect/test/Scala2MinorVersion.scala",
    "chars": 93,
    "preview": "package izumi.reflect.test\n\nobject Scala2MinorVersion {\n  def scala2MinorVersion: Int = 13\n}\n"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-2.13+/izumi/reflect/test/Scala213Plus_LightTypeTagTest.scala",
    "chars": 1322,
    "preview": "package izumi.reflect.test\n\nimport org.scalatest.wordspec.AnyWordSpec\nimport izumi.reflect.macrortti.LTT\n\nclass Scala213"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/BasicDottyTest.scala",
    "chars": 763,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/DiscoveryModel.scala",
    "chars": 540,
    "preview": "package izumi.reflect.test\n\nobject DiscoveryModel {\n\n  trait NodeId\n  trait DiscoverableService {\n    type DiscoveryNode"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/DottyRegressionTests.scala",
    "chars": 1064,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.Tag\n\nobject DottyRegressionTests {\n  // should compile\n  // https://git"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/IsScala3.scala",
    "chars": 55,
    "preview": "package izumi.reflect.test\n\ninline val IsScala3 = true\n"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/LightTypeTagProgressionTest.scala",
    "chars": 423,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti._\n\nclass LightTypeTagProgressionTest extends SharedLightTypeT"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/LightTypeTagTest.scala",
    "chars": 4797,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/PlatformSpecific.scala",
    "chars": 963,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/Scala2MinorVersion.scala",
    "chars": 93,
    "preview": "package izumi.reflect.test\n\nobject Scala2MinorVersion {\n  def scala2MinorVersion: Int = -1\n}\n"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/TagProgressionTest.scala",
    "chars": 1468,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.Tag\nimport izumi.reflect.test.TestModel.*\n\nclass TagProgressionTest ext"
  },
  {
    "path": "izumi-reflect/izumi-reflect/src/test/scala-3/izumi/reflect/test/TagTest.scala",
    "chars": 3275,
    "preview": "package izumi.reflect.test\n\nimport izumi.reflect.macrortti.{LTT, LTag}\nimport izumi.reflect.{HKTag, Tag, TagK, TagTK}\nim"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.js/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/ReferenceEquality.scala",
    "chars": 971,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.js/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/StringCodec.scala",
    "chars": 8865,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.jvm/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/DefaultByteBufferProvider.scala",
    "chars": 875,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.jvm/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/ReferenceEquality.scala",
    "chars": 971,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.jvm/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/StringCodec.scala",
    "chars": 1425,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.native/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/DefaultByteBufferProvider.scala",
    "chars": 858,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.native/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/ReferenceEquality.scala",
    "chars": 938,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/.native/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/StringCodec.scala",
    "chars": 1408,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/BufferPool.scala",
    "chars": 4618,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/BufferProvider.scala",
    "chars": 3646,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/CodecSize.scala",
    "chars": 5182,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/Codecs.scala",
    "chars": 1523,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/CompositePicklers.scala",
    "chars": 2578,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/Constants.scala",
    "chars": 1107,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/Default.scala",
    "chars": 2081,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/IdentList.scala",
    "chars": 2844,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/IdentMap.scala",
    "chars": 3669,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/Pickler.scala",
    "chars": 7508,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/StringCodecBase.scala",
    "chars": 4955,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala/izumi/reflect/thirdparty/internal/boopickle/TuplePicklers.scala",
    "chars": 1075,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala-2.12-/izumi/reflect/thirdparty/internal/boopickle/XCompat.scala",
    "chars": 4129,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/main/scala-2.13+/izumi/reflect/thirdparty/internal/boopickle/XCompat.scala",
    "chars": 3363,
    "preview": "package izumi.reflect.thirdparty.internal.boopickle\n\nimport Constants.NullRef\nimport scala.collection.Factory\n\nprivate[r"
  },
  {
    "path": "izumi-reflect/izumi-reflect-thirdparty-boopickle-shaded/src/test/scala/izumi/reflect/.keep",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "keys.sh",
    "chars": 2105,
    "preview": "#!/bin/bash -e\n\nEMAIL=${EMAIL:-pshirshov@gmail.com}\nSSHKEYNAME=travis-deploy-key\n\nPASSPHRASE=$(uuidgen)\nOPENSSL_KEY=`ope"
  },
  {
    "path": "project/Deps.sc",
    "chars": 16710,
    "preview": "import $ivy.`io.7mind.izumi.sbt:sbtgen_2.13:0.0.107`\nimport izumi.sbtgen._\nimport izumi.sbtgen.model._\n\nobject Izumi {\n\n"
  },
  {
    "path": "project/Settings.scala",
    "chars": 761,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "project/Versions.scala",
    "chars": 748,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "project/build.properties",
    "chars": 676,
    "preview": "#\n# Copyright 2019-2020 Septimal Mind Ltd\n# Copyright 2020 John A. De Goes and the ZIO Contributors\n#\n# Licensed under t"
  },
  {
    "path": "project/plugins.sbt",
    "chars": 1468,
    "preview": "// DO NOT EDIT THIS FILE\n// IT IS AUTOGENERATED BY `sbtgen.sc` SCRIPT\n// ALL CHANGES WILL BE LOST\n// https://www.scala-j"
  },
  {
    "path": "project/project/PluginVersions.scala",
    "chars": 1143,
    "preview": "/*\n * Copyright 2019-2020 Septimal Mind Ltd\n * Copyright 2020 John A. De Goes and the ZIO Contributors\n *\n * Licensed un"
  },
  {
    "path": "sbtgen.sc",
    "chars": 202,
    "preview": "#!/bin/sh\ncs launch com.lihaoyi:ammonite_2.13.13:3.0.0-M1 --fork -M ammonite.Main -- sbtgen.sc $*\nexit\n!#\nimport $file.p"
  },
  {
    "path": "version.sbt",
    "chars": 41,
    "preview": "ThisBuild / version := \"3.0.10-SNAPSHOT\"\n"
  }
]

// ... and 1 more files (download for full content)

About this extraction

This page contains the full source code of the zio/izumi-reflect GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 141 files (616.4 KB), approximately 174.3k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!