stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Warnings after upgradin to .NET 8.0

Open CzBuCHi opened this issue 1 year ago • 2 comments

Describe the bug On .net 7.0 where wasnt any warnings, after upgrading to 8.0 im getting InvalidOperationException warnings

i think root cause is this one: The analyzer Microsoft.NET.Sdk.Razor.SourceGenerators references a newer version (4.8.0.0) of the compiler than the one used by Stryker.NET.

Logs logs.zip

Expected behavior No warning obviously :)

Desktop (please complete the following information):

  • OS: windows 11
  • Type of project class library
  • Framework Version .net 8.0
  • Stryker Version 3.11.0

Additional context Im using version 3.11.0 due to #2776 bug in 3.12.0 Warnings dont have any effect on stryker - it will happily slauther mutants as before ...

CzBuCHi avatar Dec 02 '23 13:12 CzBuCHi

Thanks for reporting this. I am afraid this is a catch 22 situation here: you need V3.12 to for full Net 8 support. That basically what the warning says. For the time being, Stryker is not able to identify if a referenced code generator will actually generate code. So Stryker always produce a warning when it fails to load a generator/analyzer. So this is the expected behavior for now.

That being said, the warning was improved in V3.11 to provide extra information in order to better understand why the loading fails. Judging by your logs, there are extra failure notifications that are triggered by the first one. I will shortly open a PR for fixing this.

dupdob avatar Dec 02 '23 16:12 dupdob

see #2786

dupdob avatar Dec 02 '23 16:12 dupdob