-
Notifications
You must be signed in to change notification settings - Fork 40
ISourceInformationProvider doesn't work for async methods #138
Comments
It's probably worth noting that our implementation against the one built into Visual Studio needs to scout around for the state machine attribute, and ask for the |
We'd prefer to fix the defects in our implementation rather than require workarounds. I've done some prototyping using IL metadata reader, and it might get us closer to being able to fix these issues. @bradwilson - if we created another overload that accepted a metadata token would you be able to use that ? https://msdn.microsoft.com/en-us/library/system.reflection.memberinfo.metadatatoken(v=vs.110).aspx The defects I'm aware of (all cases where the class/method name don't match the actual user code):
In any of these cases, the method in question will show up as "unknown" in the VS Test Explorer when grouped by project, and source-code related features of VS won't work. |
Well, I have a MethodInfo, so assuming that DNX allows me access to MetadataToken, it shouldn't be a problem. |
Sad panda 🐼 Would it be feasible in xUnit to give us the |
Yeah, that shouldn't be a problem. During discovery for DNX I always have the |
For now I'm adding support for async/inherited methods based on the class/method names. We should talk about how to stage the transition of this API from names -> |
Actually, I take that back. We'll just do the reflection lookup in our fork and the remove the string-based-api. That makes this easy. |
Just let me know when this makes it to As for your private runner build, the change should be fairly trivial. If you look at this code: The |
I'm planning to let a build push to to the feed with the new functionality (but the same API), and then make the changes to the API in a separate change. A few things were red today when I came in, and we haven't had a coherence push since . |
FYI also about https://github.com/dotnet/corefx/issues/2375#issuecomment-129711086 We may get |
This has been checked in. Still waiting for a public build to be available. |
@bradwilson - this is available now via the aspnetvnext feed. v1.0.0-beta7-11855 https://www.myget.org/gallery/aspnetvnext |
It appears that, when given async methods, ISourceInformationProvider does not return source information.
This is our usage: https://github.com/xunit/dnx.xunit/blob/master/src/xunit.runner.dnx/DesignTime/SourceInformationProvider.cs
Related issue: xunit/xunit#530
The text was updated successfully, but these errors were encountered: