Skip to content

ZioMagicComments is a Scalafix rule that adds explanatory graphs as comments to zio-magic methods

License

Notifications You must be signed in to change notification settings

rtimush/zio-magic-comments

Repository files navigation

zio-magic-comments

ZioMagicComments is a Scalafix rule that adds explanatory graphs as comments to zio-magic methods:

class Demo {
  val program: URIO[Cake, Unit] = ...

  //         Cake.live         ⎫
  //      ┌──────┴─────┐       ⎬ added by ZioMagicComments
  // Clock.live  Blocking.live ⎭
  val magically =
    program.provideMagicLayer(
      Cake.live,
      Clock.live,
      Blocking.live
    )
}

Getting started

Follow the Scalafix documentation to make it possible to run Scalafix rules in your build. Then either run

sbt> scalafix dependency:ZioMagicComments@com.timushev:zio-magic-comments:0.1.0

or include the rule in your build.sbt:

ThisBuild / scalafixDependencies += "com.timushev" %% "zio-magic-comments" % "0.1.0"

Demo

About

ZioMagicComments is a Scalafix rule that adds explanatory graphs as comments to zio-magic methods

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  

Languages