-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Remove stack overflow in EndpointFilterInvocationContexts #49285
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
Conversation
Thanks for your PR, @slang25. Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
src/Http/Http.Abstractions/src/EndpointFilterInvocationContextOfT.Generated.cs
Outdated
Show resolved
Hide resolved
Why not implement these instead? |
Good point, I've just pushed an implementation 👍 |
src/Http/Http.Abstractions/src/EndpointFilterInvocationContextOfT.Generated.tt
Outdated
Show resolved
Hide resolved
src/Http/Http.Abstractions/test/EndpointFilterInvocationContextOfTTests.cs
Outdated
Show resolved
Hide resolved
@slang25 There's a whitespace mismatch that's causing a test to fail. Looks like you cleaned up some stray spaces on an empty line which it's not happy about 😆.
|
<# foreach (var argumentCount in Enumerable.Range(0, arity)) { #> public T<#=argumentCount#> Arg<#=argumentCount#> { get; set; } | ||
<# } #> |
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.
Just to explain this change, I'm on macOS and using either Rider or VSCode the editors immediately delete the whitespace from the generated files the moment I touch them, so this change makes editing them by hand less volatile.
Why am I editing the generated code by hand? Because when I try to use the tt generator it completely re-writes the file in a way that creates a massive diff (the header text is different for example).
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.
Might be worth at some point having the repo updated to use the .NET 6 version of the tt generator - maybe that'll remove some of the xplat wonk (after an initial normalisation).
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.
Good recommendation! Mind filing an issue for this in case we're able to get around to it?
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.
Thanks for your help @adityamandaleeka, I totally missed that. |
Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. |
/azp run |
Commenter does not have sufficient privileges for PR 49285 in repo dotnet/aspnetcore |
close & open to trigger to re-run validation |
/azp run |
No commit pushedDate could be found for PR 49285 in repo dotnet/aspnetcore |
Remove potential stack overflow in EndpointFilterInvocationContexts
Description
This change replaces the infinite recursive behaviour of the properties on the
EndpointFilterInvocationContext
types, and implement theContains
andIndexOf
method explicitly instead.Fixes #49284