-
Notifications
You must be signed in to change notification settings - Fork 188
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
System.AggregateException: One or more errors occurred. (Internal error due to compile error.) #3096
Comments
hello I am surprised because there have never been any issue with same mode in years. So I suspect this is a red herring. Anyway, I have a few things that may help you and help us helping you.
...
// Stryker disable once all
if (condition == null || !helpers.TryGetValue(condition.Id, out var helper))
... This will disable mutating this line altogether. If you still have a compilation error, the problem comes from something else, and we will need the whole log file to help identify the cause. Even better, if you can share the problematic project, or a smaller project reproducing the issue this would be great. Finally, I think the mutation causing problem is the mutation of logical 'or' to logical 'and' if (condition == null && !helpers.TryGetValue(condition.Id, out var helper))
{
continue;
}
// here there is no guarantee that helper is initialized, as TryGetValue will not be called if condition!=null
source = helper.Apply(source, condition.Id) Hope this helps |
Thank you for your quick reply. Using Stryker Comments ( // Stryker disable once all) indeed made Stryker ignore that line and now it runs successfully. And I think you are right, probably the mutation that was making helper to be undefined was the logical condition instead of the method call (which explains why ignoring the method call was not making any impact). Although I tried to ignore the filename also and could not get it to work.... My solution has multiple projects and multiple tests projects, to make it easier to isolate the problem I started calling stryker passing just 1 project and 1 test project and the error never happened. So, I have feeling that I may not be able to replicate the problem by isolating the project alone, but I will try. I also ran stryker with trace verbosity and log to file (before adding the Stryker comment), I will review it and update here. |
thanks for the update. I am happy for you that the comment fixed the problem. |
Describe the bug
Stryker throws exception: "System.AggregateException: One or more errors occurred. (Internal error due to compile error.)"
Logs
log.txt
The function that is failing is like this (redacted, summarized):
My guess the mutation is removing out var helper and thus the line source = helper.Apply() fails. But why this just doesn't safe fail (like, compilation failed, mutation killed), I don't know.
As a work-around, I tried excluding the file from being mutated, but it didn't work, still got the error. Also tried to exclude the helpers.TryGetValue method from being mutated but also same error.
Expected behavior
Stryker does not throw exception
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: