-
Notifications
You must be signed in to change notification settings - Fork 19
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
ArgumentNullException when running coverage #165
Comments
This is going to be an interesting one to track down, as it's from deep inside the Would it be possible for you to cut this down to a minimum repro case, sufficiently sanitized that I might be allowed visibility? The code would not have to do anything apart from compile, so it would be a case of just cutting chunks of code away stopping and backtracking when the issue goes away. Meanwhile, I'll look to reverse engineering the part of the assembly writing that fails to create a version of AltCover that will provide some tracing of where the issue might lie, and what the code construct is that causes the fault, that you could then run. |
Here's an experimental build that attempts to identify and fix the defective constant definitions It will log as a warning any such constant giving its name and the method in which it is declared; that should also help with the task of identifying a minimal repro case that can then be used as a regression test. |
Thank you for the test build, it seems like it did indeed point to an issue: I tried last week to make a minimal repo but it was hard going in blind and trying to keep it in a compilable state. I'll try again now that I have the identifying info. |
That's very interesting, as the type I'm surprised that this hasn't shown up before -- it may simply be that |
Yeah once I knew where to look having a null const seemed quite odd. Inlining it, the problem goes away (using the above build and 8.3.838). As such I do longer have any particular need for a fix, but I'll try to make a minimal repro. |
I'm able to repro with https://github.com/twcclegg/NullConst |
That's even simpler than I'd expected. Thank you for that. |
Cecil issue 873 raised; and PR submitted. For the moment, though, I shall retain the experimental changes, awaiting a new release of that library. |
AltCover 8.3.839 release contains this fix but with the messages directed to the Verbose rather than Warn output channel. |
Thanks1 |
Things have worked great for me in the past, however in joining a new project; when running
dotnet test /p:AltCover=true
I get:Log file contains the following:
Any insight would be much appreciated, thanks.
The text was updated successfully, but these errors were encountered: