Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
May 18, 2023

Conversation

eiriktsarpalis
Copy link
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
Copy link

ghost commented May 16, 2023

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)
Copy link
Member Author

@eiriktsarpalis eiriktsarpalis May 16, 2023

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
Copy link
Contributor

layomia commented May 17, 2023

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

@eiriktsarpalis
Copy link
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