Skip to content

Remove System.Reflection wrappers from the STJ source generator. - #86334

Merged
eiriktsarpalis merged 6 commits into
dotnet:mainfrom
eiriktsarpalis:json-remove-typewrapper
May 18, 2023
Merged

eiriktsarpalis merged 6 commits into
dotnet:mainfrom
eiriktsarpalis:json-remove-typewrapper

Conversation

@eiriktsarpalis

Copy link
Copy Markdown
Member

Fix #79533.

Contributes to #68353.

@eiriktsarpalis eiriktsarpalis self-assigned this May 16, 2023
@eiriktsarpalis eiriktsarpalis added this to the 8.0.0 milestone May 16, 2023
@eiriktsarpalis
eiriktsarpalis requested a review from layomia May 16, 2023 16:21
@ghost

ghost commented May 16, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Fix #79533.

Contributes to #68353.

Author: eiriktsarpalis
Assignees: eiriktsarpalis
Labels:

area-System.Text.Json

Milestone: -

/// <summary>
/// Traverses a DAG and returns its nodes applying topological sorting to the result.
/// </summary>
public static T[] TraverseGraphWithTopologicalSort<T>(T entryNode, Func<T, ICollection<T>> getChildren, IEqualityComparer<T>? comparer = null)

@eiriktsarpalis eiriktsarpalis May 16, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replaces the algorithm now deleted from ReflectionExtensions.cs to one that better works for both Symbol and Type instances.

@layomia

layomia commented May 17, 2023

Copy link
Copy Markdown
Contributor

The plan is to remove symbol.AsType(metadaLoadContext) => System.Type abstraction at some point, yes?

@eiriktsarpalis

Copy link
Copy Markdown
Member Author

Yes, the PR should be removing all the classes that make this abstraction possible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove Roslyn-Reflection helper abstraction from System.Text.Json source generator

3 participants