Skip to content

Scalafix rules allowing to migrate Scala 2 macro-annotations based utilities of ZIO ecosystem to Scala 3

License

Notifications You must be signed in to change notification settings

VirtuslabRnD/scalafix-migrate-zio-macros

Repository files navigation

scalafix-migrate-zio-macros Scala version support

Scalafix rules for ZIO macro annotations migration

This project contains set of rules allowing to migrate Scala 2 macro-annotations based utilities of ZIO ecosystem.

Available code generation rules:

ZIOAccessibleCodeGen

Rule detects usages of zio.macros.accessible annotations and generates accessors for annotated traits based on original macro-annonations algorithm. Support:

  • - zio.ZIO (and it's main aliases)
  • - zio.ZManaged (and it's main aliases)
  • - zio.ZStream, zio.ZSink (and it's main aliases)
  • - accessors for normal methods
  • - @accessible - supported
  • - @accessibleM[_] - not supported yet
  • - @accessibleMM[_, _] - not supported yet
  • - @throwing - not supported yet

ZIOMockableCodeGen

Rule detects usages of zio.macros.mockable annotations and generates mocks for annotated traits based on original macro-annonations algorithm. Support:

  • - zio.ZIO (and it's main aliases)
  • - zio.ZManaged (and it's main aliases)
  • - zio.ZStream, zio.ZSink (and it's main aliases)
  • - overloaded methods
  • - generic, type parametrized methods

Usage

All rules require compilation with SemanticDB enabled and are targeting Scalafix 0.12.x For information on how to use this projects refer to Scalafix user guide

About

Scalafix rules allowing to migrate Scala 2 macro-annotations based utilities of ZIO ecosystem to Scala 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages