GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — perf(codegen): generate provider metadata at build time by ReubenBond · Pull Request #10493 · dotnet/orleans Conversation
|
|
I audited the incremental-generator impact and pushed A three-way BenchmarkDotNet comparison used |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This PR shifts RegisterProviderAttribute interpretation into the Orleans incremental source-generator pipeline, emitting lightweight build-time provider metadata and updating client/silo configuration to resolve providers via a shared runtime resolver.
Changes:
IProviderMetadataProvider and generates implementations only when provider metadata exists.ProviderRegistrationResolver and routes both client and silo provider resolution through it (with legacy attribute fallback for older assemblies).| File | Description |
|---|---|
| test/Orleans.Core.Tests/ProviderRegistrationResolverTests.cs | Adds coverage for generated metadata consumption, legacy fallback, and non-activation of custom manifest providers. |
| test/Orleans.CodeGenerator.Tests/ModelExtractorTests.cs | Verifies provider registrations are extracted (and deterministically ordered) during reference extraction. |
| test/Orleans.CodeGenerator.Tests/IncrementalModelEqualityTests.cs | Extends reference assembly model builder to include provider registrations. |
| test/Orleans.CodeGenerator.Tests/IncrementalCachingTests.cs | Adds incremental caching tests to ensure provider changes invalidate the pipeline and unrelated changes do not. |
| src/Orleans.Serialization/Configuration/ITypeManifestProvider.cs | Introduces the new public IProviderMetadataProvider contract in the serialization configuration namespace. |
| src/Orleans.Runtime/Hosting/DefaultSiloServices.cs | Switches silo provider registration resolution to ProviderRegistrationResolver. |
| src/Orleans.Core/Core/ProviderRegistrationResolver.cs | Adds shared runtime resolver for provider registrations (generated metadata + legacy fallback). |
| src/Orleans.Core/Core/DefaultClientServices.cs | Switches client provider registration resolution to ProviderRegistrationResolver. |
| src/Orleans.CodeGenerator/ReferenceAssemblyDataProvider.cs | Ensures empty reference model includes an empty provider-registration collection. |
| src/Orleans.CodeGenerator/Model/ReferenceAssemblyModelExtractor.cs | Extracts RegisterProviderAttribute metadata and adds it to the reference model with deterministic ordering. |
| src/Orleans.CodeGenerator/Model/ReferenceAssemblyModel.cs | Adds RegisteredProviderModel and stores it on ReferenceAssemblyModel. |
| src/Orleans.CodeGenerator/Model/MetadataAggregateModelBuilder.cs | Normalizes/uniquifies provider registrations for stable incremental caching. |
| src/Orleans.CodeGenerator/MetadataGenerator.cs | Emits IProviderMetadataProvider.ConfigureProviders(...) only when provider registrations exist. |
| src/Orleans.CodeGenerator/LibraryTypes.cs | Adds RegisterProviderAttribute to known library types for extraction. |
| src/api/Orleans.Serialization/Orleans.Serialization.cs | Updates public API surface to include IProviderMetadataProvider. |
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
ae7a554 to
9adc458
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
src/Orleans.Serialization/Configuration/TypeManifestProviderAttribute.cs:37
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
public Type ProviderType { get; }
src/Orleans.Serialization/Configuration/TypeManifestProviderAttribute.cs:18
This issue also appears on line 36 of the same file.
public TypeManifestProviderAttribute(
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
Type providerType)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Port provider registration discovery to the current incremental reference-assembly model and consume generated manifest metadata during client and silo configuration. Co-authored-by: Copilot <[email protected]>
Retain constructed generic provider types in generated registrations and avoid executing non-OrleansCodeGen manifest providers while collecting provider metadata. Co-authored-by: Copilot <[email protected]>
Preserve closed generic provider types, avoid activating custom manifest providers outside DI, and retain a legacy fallback for packages built with older generators. Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]> Copilot-Session: dd22afa0-8eac-4b78-bc16-d2f60bc3cb22
Avoid executing full serialization manifests when resolving configuration-driven providers. Generate a lightweight provider metadata contract, preserve legacy attribute fallback, and cover client, silo, and custom-provider behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 90ba28fa-3faa-4c32-a712-d8cb4b5fd3f0
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 90ba28fa-3faa-4c32-a712-d8cb4b5fd3f0
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 90ba28fa-3faa-4c32-a712-d8cb4b5fd3f0
9adc458 to
1093681
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-authored-by: Copilot App <[email protected]> Copilot-Session: 90ba28fa-3faa-4c32-a712-d8cb4b5fd3f0
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Source Generator should scan for RegisterProvider attributes at build time
There was an error while loading. Please reload this page.