Closed JackSteel97 closed 1 year ago
thanks for reporting this; in short, this is not an issue. Let me explain:
Compilation succeeds because the actual type being operated on by ToUniversalTime is a never null DateTime
Compilation failed because Stryker injected one mutation that broke this guarantee (never being null); the fact that it results in a compilation error means the mutation was killed by the compilation phase (no test needed). So far so good.
The problem is that Stryker cannot identify which mutations triggered this compilation error, so it marks all mutations within the method as being killed by the compilation phase. That is why you have this warning.
If this is expected behaviour then maybe the This should not happen, please report this as an issue on github with the previous error message.
part of the warning message should be removed?
If this is expected behaviour then maybe the
This should not happen, please report this as an issue on github with the previous error message.
part of the warning message should be removed?
It is expected but we also want to be notified that this happend in case we can change something to avoid the scenario. The explanation is mostly to let you know you don't need to worry about this.
just to be very precise:It is expected that some mutations will result in compilation errors. Stryker is often able to link a compilation error to the culprit. Which is then removed and marked as compilation error, and compilation will be successful. This is not reported as a warning.
There is a warning if and only if Stryker is not able to identify which mutation triggers the compilation error, it has to remove every mutations (in that method) for the compilation to be successful. This is far from ideal, hence the warning.
Describe the bug Stryker throws the below warning logs in a few places involving nullable types that have been defaulted with the
??
operator. The line mentioned in the logs below looks like this:Logs
Expected behavior Compilation succeeds because the actual type being operated on by
ToUniversalTime
is a never nullDateTime
Desktop (please complete the following information):