Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/virtuslabrnd/scalafix-migrate-zio-macros
Scalafix rules allowing to migrate Scala 2 macro-annotations based utilities of ZIO ecosystem to Scala 3
https://github.com/virtuslabrnd/scalafix-migrate-zio-macros
Last synced: 7 days ago
JSON representation
Scalafix rules allowing to migrate Scala 2 macro-annotations based utilities of ZIO ecosystem to Scala 3
- Host: GitHub
- URL: https://github.com/virtuslabrnd/scalafix-migrate-zio-macros
- Owner: VirtuslabRnD
- License: apache-2.0
- Created: 2024-04-26T15:06:20.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-26T16:54:33.000Z (9 months ago)
- Last Synced: 2024-04-27T16:34:06.433Z (9 months ago)
- Language: Scala
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
[![scalafix-migrate-zio-macros Scala version support](https://index.scala-lang.org/virtuslabrnd/scalafix-migrate-zio-macros/scalafix-migrate-zio-macros/latest-by-scala-version.svg?platform=jvm)](https://index.scala-lang.org/virtuslabrnd/scalafix-migrate-zio-macros/scalafix-migrate-zio-macros)
# 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:
- [x] - `zio.ZIO` (and it's main aliases)
- [x] - `zio.ZManaged` (and it's main aliases)
- [x] - `zio.ZStream`, `zio.ZSink` (and it's main aliases)
- [x] - accessors for normal methods
- [x] - `@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:
- [x] - `zio.ZIO` (and it's main aliases)
- [x] - `zio.ZManaged` (and it's main aliases)
- [x] - `zio.ZStream`, `zio.ZSink` (and it's main aliases)
- [x] - overloaded methods
- [x] - 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](https://scalacenter.github.io/scalafix/docs/users/installation.html)