Repository navigation
[10.x] fix(codegen): diagnose inaccessible compound-alias targets before metadata emission - #11607
Open
ReubenBond wants to merge 1 commit into
Open
ReubenBond wants to merge 1 commit into
ReubenBond wants to merge 1 commit into
Conversation
…ore metadata emission Backport dotnet#11578, including the final open-generic-key and diagnostic-location review corrections. Confirmed Microsoft.Orleans.CodeGenerator 10.4.0 emits inaccessible Payload.Hidden metadata for the dotnet#11523 reproduction. Retain the 10.x single-attribute extraction API and move applicable regressions to standalone CompoundTypeAliasTests, since serializer contexts are absent on this maintenance branch. (cherry picked from commit 40f4b5b) (cherry picked from commit 389b9fb) (cherry picked from commit eb17247) (cherry picked from commit 2b46165) (cherry picked from commit df5281e) Co-authored-by: Reuben Bond <reuben.bond@gmail.com>
This branch has not been deployed
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.
Backports #11578 to
10.x, including its final review corrections fromdf5281e2e23cb6adc1dddc359c6ce1d13fb05b27.Microsoft.Orleans.CodeGenerator 10.4.0 reproduces #11523: the issue's
Payload/ITag<T>/ privateHiddensource emitsconfig.CompoundTypeAliases.Add("required-private-alias", typeof(global::Payload.Hidden));and fails with CS0122 in the generated metadata file. The serializer-context declaration uses APIs absent from 10.4.0; removing only that declaration isolates the released generator defect.The generator now reports ORLEANS0116 at an inaccessible compound-alias attribute and emits metadata for accessible target/key types, including friend-accessible internals and open-generic keys. Diagnostic caching preserves current source-tree identity and spans after edits. Metadata diagnostics follow implementation-output gating.
This is one attributed, combined cherry-pick of
40f4b5b7d1,389b9fbce1,eb17247f9f,2b46165f65, anddf5281e2e2. Necessary maintenance-branch adaptations retain the existing single-attribute extraction signature, reserve the same diagnostic identifier, and place applicable regressions in standaloneCompoundTypeAliasTestsbecause10.xhas no serializer-context APIs. The backport includes focused accessibility, friend-assembly, open-generic, implementation-output, and incremental-edit regressions.Microsoft Reviewers: Open in CodeFlow