Closed tristanevain closed 4 months ago
this problems from the fact that Stryker's MutantControl class does not use nullable annotations as it needs to be compatible with older CSharp versions and it is not nullable correct, which leads to warnings, which result in errors when warning as errors is enabled.
We need to update the code to fix these warnings. In the meantime, the single workaround I can think of is either disabling warning as errors or nullable disagnostics when using Stryker.
Thank you for your answer. It made me investigate more why the Azure pipeline was successful and not the local run.
It turns out that one setup works: a non-global installation of Stryker (installed under the test project to mutate) in version 3.11.0
Versions 3.13.2 and 4.0.0 both still fail in this setup.
So I have a temporary solution to my problem, but it looks like a regression in Stryker since I didn't have to disable "warnings as errors" to make 3.11.0 work. It also means that we are currently stuck with an outdated version. Wishing we could upgrade for a more recent version soon.
thanks for the feedback. This is not a regression per se: 'warnings as errors' was disregarded by Stryker, but users requested it, arguing some mutations would be rightfully flagged as killed/compile error due/thanks to 'warnings as errors'
I just opened a PR that should fix this
Describe the bug On one specific (but not exotic) .net 8 project, Stryker fails and repeatedly prints the error in the title. It happens on Windows machines but not when running in an Azure pipeline. Other projects of the same solution run fine.
The flow of repeating, and similar errors ends with the following message:
Logs
Note that the place in the file is not always the same. Neither is the name of the faulty field.
Expected behavior Stryker executes without reporting compilation errors in its own files.
Desktop (please complete the following information):