{"push_id":2050844038,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"df6a2bffcd86e83b19ab32fb1d65c718a4584d16","before":"61f039a438c55adbc5b88e177516b5c41ab549b4","commits":[{"sha":"df6a2bffcd86e83b19ab32fb1d65c718a4584d16","author":{"name":"Reuben Bond","email":"13d8f0b78e7204307c052b8081172b80db5f922e@gmail.com"},"message":"Generate type metadata during codegen (#3518)\n\nThis commit implements a feature similar to ASP.NET's ApplicationParts.\r\n\r\n* Users are required to provide a set of assemblies (application parts) when configuring the silo or the client.\r\n* Extension methods are provided for adding all assemblies in the current directory or adding all assemblies in the current `AppDomain`.\r\n* The process of calling `AssemblyLoader` process has been removed from the startup path.\r\n* Instead of scanning every assembly and every type which is loaded for grain interfaces/classes, and serialization information, that occurs at code generation time and the results are loaded on startup.\r\n* Runtime Code Generation is removed. It's *possible* that we could enable runtime code generation which runs before the client/silo is created, but that's out of scope.\r\n* `CachedTypeResolver` performs a more thorough search when resolving types.\r\n* `ITypeResolver` was introduced to allow users to decide how types are resolved and potentially blacklist/whitelist allowed types. `CachedTypeResolver` is the default implementation.\r\n\r\nThe application parts is like so:\r\n* An `ApplicationPartManager` holds a collection of *Parts* and *FeatureProviders*.\r\n* `ApplicationPartManager` has a method, `void Populate<TFeature>(TFeature feature)`, which can be passed a POCO \"feature\" class. It gives each FeatureProvider a chance to mutate the feature, given the list of Parts.\r\n* The feature is typically an object containing collections of simple metadata about the application (list of grain interfaces, for example).\r\n\r\nCode generation support is like so:\r\n* Code generator defines an assembly level `FeaturePopulatorAttribute` attribute that references generated POCO class which implement an interface `IFeaturePopulator<TFeature>` for each feature (currently: `SerializerFeature`, `GrainInterfaceFeature`, `GrainClassFeature`).\r\n* each `IFeaturePopulator<>` implementation has a `Populate(TFeature)` method which contains code to add metadata to the feature.\r\n* A FeatureProvider called `AssemblyAttributeFeatureProvider<TFeature>` scans each of the provided parts for assemblies which have the assembly-level attribute `FeaturePopulatorAttribute` and then executes the `Populate(feature)` method of each of the references, augmenting the metadata on the feature.\r\n\r\nThis lays the groundwork for implementing 'type forwarding' where a persisted type is forwarded to a different type with the same layout at runtime (eg different assembly, different namespace, different name).\r\n\r\nTODO: address `ProviderTypeLoader` which still scans the world","distinct":true,"url":"https://api.github.com/repos/dotnet/orleans/commits/df6a2bffcd86e83b19ab32fb1d65c718a4584d16"}]}
{"actor":{"display_login":"jdom"}}