-
-
Notifications
You must be signed in to change notification settings - Fork 836
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
check if generic type assembly has been added to set #1438
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #1438 +/- ##
===========================================
+ Coverage 79.03% 79.05% +0.01%
===========================================
Files 200 200
Lines 5682 5685 +3
Branches 1143 1144 +1
===========================================
+ Hits 4491 4494 +3
Misses 696 696
Partials 495 495 ☔ View full report in Codecov by Sentry. |
@@ -68,6 +68,11 @@ private static void PopulateAllReferencedAssemblies(Type inputType, HashSet<Asse | |||
|
|||
foreach (var genericArgumentType in genericArguments) | |||
{ | |||
if (holdingSet.Any(a => a.DefinedTypes.Contains(genericArgumentType))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For performance reasons, if this only overflows in a tight loop where we're self-referencing, can we please pass into PopulateAllReferencedAssemblies a "HashSet activeWorkingSet" and insert there each time we add a type, then check that active working set instead? This should result in a simple O(1) check for the type having already been seen in this tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure thing. Changes have been committed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for helping out!
Check the holding set to see if the type assembly has already been added to avoid the stack overflow.
#1437