Add Quine trait to AST, make `pretty` public.
Product change and motivation
- feat:Make
prettypublic. - fix: Pretty now prints annotations.
- fix: suppress some build warnings.
- feat: add
derive(Quine)to AST members.
Implementation
Adds an optional quine derive feature to the package that will implement Quine for the AST to make it possible for the ASTs to reproduce them selves.
ha. the annotation fix is already in. didn't realize that.
Sorry i've just had a lot come up! I need to chat with the team what we should do with these specialized implementations that are gated behind feature flags!
Hey @flyingsilverfin no worries. I got a bit stuck with this entire ordeal too due to macro site hygiene issues and haven't been able to figure out how to mix schemas and queries.
I was thinking about two approaches, both with their own downsides.
- Only use define and have users define their queries up front, this works really well in terms of type inference but you lose dynamic typing of queries which isn't ideal.
- Use both where we define a schema upfront and dynamic queries but we loose some type safety from dynamically shaped queries.
Ideally I would love to have a solution that combines both but I'm not there yet. I'll keep you updated with more information as I keep working on this.
Already responding to this has helped me figure some things out 😄
Hope you have a wonderful week