Replies: 2 comments 4 replies
-
This is a good idea. Thank you for suggesting it. The backstory here (not that you asked) is that the reflection-based attribute system came first, and the FlatSharp compiler is layered on top of that. I mostly try to nudge people towards using FBS files instead of attributes these days since there is less to mess up and you get better interop. Source generators are relatively new to me. It looks like Unity supports them now, which is neat. I need to understand if legacy MSBuild will work with them as well (probably not), and if I care :) I would be happy to be out out of the business of having a custom targets file. I'm going to add this to the list in #276. I usually do major versions by waiting for a critical mass of breaking changes to accumulate and then do all of those in one shot. |
Beta Was this translation helpful? Give feedback.
-
@jamescourtney I'm excited to see this has been now implemented in v7. Congratulations for major new release! |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to replace runtime compilation with source generators?
Doing pre-compilation when using .fbs files and runtime compilation when using attributes feels a bit inconsistent. Moving to source generators when using attributes would unify the library in sense that all generation happens at compile time.
In addition to making it more consistent it would also be a slight improvement to startup time and smaller binary size.
Beta Was this translation helpful? Give feedback.
All reactions