scalameta / scalagen

WIP - Scalameta powered code generation
Apache License 2.0
40 stars 5 forks source link

Owner tree work #58

Closed DavidDudson closed 6 years ago

DavidDudson commented 6 years ago

Pushing before this gets too big...

A few things:

  1. It's impossible to do purely compile time typeclass related stuff. I hacked around this by listing all generators (Which kind of defeats the purpose of a type class... But seems like its necessary, perhaps scalameta 3.0 can remedy this? I'm getting around a large number of issues by just using Monocle traversals and prisms)
  2. I'm well aware that the number of dependencies is increasing... I feel monocle/cats together are just too good to pass up, and give a lot of flexibility.
  3. Runner is almost redundant. The only part missing now is the actual expansion, which will follow the patterns outlined in #45
  4. This patchset introduces prisms to target generators.
  5. I have an outstanding patchset that goes beyond this and adds support for GeneratorContexts. The issue with this is it add more complexity, as we have both Cofree[List, Tree] and Cofree[List, GeneratorContext] in use in the same file.
DavidDudson commented 6 years ago

Closing as I will have a new PR for this soon