-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross compilable Scala 2/3 abstractions #286
Conversation
de3f966
to
b8de712
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## scala-3 #286 +/- ##
============================================
- Coverage 85.64% 58.26% -27.39%
============================================
Files 31 57 +26
Lines 1066 1567 +501
Branches 98 129 +31
============================================
Hits 913 913
- Misses 153 654 +501
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
…current code could be migrated, one rule by one
…d *Platform files
2cf3971
to
8bc7356
Compare
.../main/scala/io/scalaland/chimney/internal/compiletime/derivation/DerivationDefinitions.scala
Outdated
Show resolved
Hide resolved
.../src/main/scala/io/scalaland/chimney/internal/compiletime/derivation/DerivationGateway.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/ConfigurationDefinitions.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Definitions.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala-3/io/scalaland/chimney/compiletime/DefinitionsPlatform.scala
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/ResultDefinitions.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/ResultDefinitions.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Definitions.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/ConfigurationsPlatform.scala
Show resolved
Hide resolved
chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/ResultsPlatform.scala
Show resolved
Hide resolved
...y/src/main/scala-2/io/scalaland/chimney/internal/compiletime/derivation/LegacyPlatform.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala-2/io/scalaland/chimney/internal/macros/TransformerMacros.scala
Show resolved
Hide resolved
chimney/src/main/scala-2/io/scalaland/chimney/internal/compiletime/DefinitionsPlatform.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Configurations.scala
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Configurations.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Contexts.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Contexts.scala
Outdated
Show resolved
Hide resolved
chimney/src/main/scala/io/scalaland/chimney/internal/compiletime/Exprs.scala
Outdated
Show resolved
Hide resolved
* Refactor Types abstractions: - split Types (language & stdlib types) and ChimneyTypes (library-specific types) - simplify the API structure * Restructure Scala 2 platform types impl * make Scala 2 code compiling * implement Scala 3 types, make it compile * refactor Exprs interface * implementation of new Expr interface for Scala 2 * implementation of new Expr interface for Scala 3 * remove unused code * resolved TODO comments with implicit exprs resolution * uncomment code
…erContext, fix legacy macro workaround implementation (#294) * Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation * Improve error handling in Results * Move DerivationResult to a separate file outside mix-in * Remove unnecessary src = src * Fix to actually use the implementation in Gateway
…cros, use proper error reporing in flag parsing
* The first draft of an elternative structure for macros towards which current code could be migrated, one rule by one * Small cleanup * fixup! Small cleanup * Split Transformer, PartialTransformer and Patcher into shared code and *Platform files * Initial Scala 3 implementation for some of compiletime abstractions * Remodel new types abstractions a bit * Move logging from Context to DerivationResult * Add missing abstractions from old macros * Refactor Types/Exprs module (#293) * Refactor Types abstractions: - split Types (language & stdlib types) and ChimneyTypes (library-specific types) - simplify the API structure * Restructure Scala 2 platform types impl * make Scala 2 code compiling * implement Scala 3 types, make it compile * refactor Exprs interface * implementation of new Expr interface for Scala 2 * implementation of new Expr interface for Scala 3 * remove unused code * resolved TODO comments with implicit exprs resolution * uncomment code * Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation (#294) * Share TransformerDefinitionErrors, split TransformerContext and PatcherContext, fix legacy macro workaround implementation * Improve error handling in Results * Move DerivationResult to a separate file outside mix-in * Remove unnecessary src = src * Fix to actually use the implementation in Gateway * Remove resolved todo in reportError * Align transformerDefinitionPrefix type with what is used in legacy macros, use proper error reporing in flag parsing * Move derivation related traits to transformer subpackage --------- Co-authored-by: Piotr Krzemiński <2477704+krzemin@users.noreply.github.com>
This PR is a draft proposal for an alternative architecture of macros. (Touching #279 #276).
TODO:
???
as trees to make it compile all cases but fail tests in runtime to make the migration process less PITA