Clarify Orleans constructor migration guidance#52870
Open
ReubenBond wants to merge 4 commits intodotnet:mainfrom
Open
Clarify Orleans constructor migration guidance#52870ReubenBond wants to merge 4 commits intodotnet:mainfrom
ReubenBond wants to merge 4 commits intodotnet:mainfrom
Conversation
Update the Orleans migration guide and breaking changes summary to distinguish serializer constructors from generated activator constructors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Orleans 10 migration documentation to clarify which attribute you should use when selecting constructors for serialization versus generated activators, and aligns the Orleans 10 breaking changes summary with that guidance.
Changes:
- Clarifies that
OrleansConstructorAttributeshould be replaced with<xref:Microsoft.Extensions.DependencyInjection.ActivatorUtilitiesConstructorAttribute>for serializer constructor selection. - Explains that
<xref:Orleans.GeneratedActivatorConstructorAttribute>is intended for generated activators (for example, DI-based activation). - Updates the Orleans 10 breaking changes summary row to match the clarified guidance.
Show a summary per file
| File | Description |
|---|---|
| docs/orleans/migration-guide.md | Expands the breaking change explanation and updates the example to use [ActivatorUtilitiesConstructor] for serializer construction. |
| docs/orleans/includes/orleans-10-breaking-changes.md | Updates the breaking changes summary migration guidance to distinguish serializer vs. generated activator constructor attributes. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
Clarify that the replacement attributes are for dependency injection scenarios and update the migration example to use an injected service instead of serialized data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the Orleans migration guide example so the injected dependency property is marked with [field: NonSerialized] and does not trigger analyzer warnings. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update the Orleans migration guide sample to note that [OrleansConstructor] was obsolete and ignored. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes dotnet/orleans#9895
Internal previews