-
Improvement
-
Resolution: Done
-
Medium
-
None
-
None
Binding runtime and codegen are sharing BindingGeneratorImpl, but their expectations around it are a bit different:
- codegen needs the entire, thick, type definition to correctly generate classes along with their enforcement strategies.
- runtime needs just skinny type definitions to understand the structure, without comments, descriptions, regexes, etc.
We already have the beginnings of this split in the skinnyTypes flag passed to the constructor, but this needs to be extended so that we have three classes:
- AbstractBindingGenerator with callouts
- FullBindingGenerator which fills in things like comments, etc.
- SkinnyBindingGenerator co-located with BindingRuntimeContext, which does not fill in unnecessary things
This also needs to be extended to TypeProviderImpl, so that we get rid of method comments from the runtime environment.
The upshot from this is a leader BindingRuntimeContext and a faster SkinnyBindingGenerator, because the FullBindingGenerator will never be loaded at runtime.