benaadams / Ben.Demystifier

High performance understanding for stack traces (Make error logs more productive)
Apache License 2.0
2.76k stars 118 forks source link

Don't enumerate fields on generic type Def #77

Closed TylerAP closed 5 years ago

TylerAP commented 5 years ago

Prevent exception being thrown when generic type definition is not a constructed generic type when trying to retrieve field values. Added TODO with suggestion as to how to diagnose type arguments for generic type definition to create a constructed generic type.

TylerAP commented 5 years ago

Doing this as quickly as possible thru letting your appveyor do the testing, don't merge yet pls

TylerAP commented 5 years ago

https://github.com/benaadams/Ben.Demystifier/issues/75

Ready for my review fellow kids.

benaadams commented 5 years ago

Could you also add a test for what was previously failing?

TylerAP commented 5 years ago

Sure

TylerAP commented 5 years ago

I've got a test written, but it's end of day and I'm heading home, going to minimize it and submit when I get home in ~1hr.

TylerAP commented 5 years ago

Sorry for the delay. Reality hits you hard, bro. Thought I was going to have some time to commit to this. I was off a bit. By like... 20 hours.

benaadams commented 5 years ago

Thank you :)

TylerAP commented 5 years ago

Just a note, 'cause this is in a static context, there is no 'this' on the stack, despite the TODO I wrote (and it'd be nigh impossible to grab anyway)... I think MS might have to change the method on the stack frame for this scenario to a complete generic type.

Maybe pass this along to MS and reference this ticket. They can use a test case similar to this one.

benaadams commented 5 years ago

https://www.nuget.org/packages/Ben.Demystifier/0.1.2