-
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
Upgrading from 4.0.6 to 4.2.0 analysis no longer works for project #3038
Comments
Looks like we used to be unable to properly detect some information, falling back to a default that happens to work. I suspect that we are now able to find a result we can work with, which happens to actually be incorrect. Strange. I base this on these logs that used to appear:
I see you also changed the target frameworks ordering, did you do this after you noticed stryker failed or before? |
humm will try to reproduce it via integration testing |
It failed before, and I swapped it to see if it would fix it, but alas it didn't. |
I do have a problem when specifying a non supported target framewok, but it fails differently, and I have no idea why. I am surprised that |
I opened a PR where Stryker no longer asks for the configured target framework when analyzing a project. |
Thanks - if there are genuine issues with our setup I'm fine with us having to fix through them to take the upgrade (e.g. tweaking settings). |
well, if could either adapt the target framework option so that it matches one that is an actual target for the project. |
I don't fully understand the previous comment. The test project targets |
The problem is that you're explicitly specifying that you wish to target In that case we used to fall back to 'random TFM'.
We no longer do this. Now this doesn't seem to be entirely intentional as that is a breaking change as we can see and we did not consider that. So we can re-add the previous logic where if the requested TFM does not exist, we choose a 'random' TFM to target. However in essence your configuration is invalid, because you're requesting a TFM that does not exist. So the question is, is it more valid in that case to then hard-fail, or is it more valid to choose a random TFM and keep going. WDYT? |
Will stryker "do the right thing" if we remove the explicit TFM from the config completely? Our projects have different available TFMs (by design) and I'd rather avoid needing to have per-project stryker config (as 99% if it will be identical). |
I tried just removing it, but that breaks a completely different project:
|
Thanks, that was the key missing information here. I should have though about this. This explains why I have a different result. And it looks like I do reproduce the issue as you experience it, so I should be able to fix it properly now. Yes, Stryker should work seamlessly, as long as the test projects do support the selected target framework. The change introduced between V4.06 and V4.2 aimed at actually removing the random framework selection that happens for the tested project. To achieve that, Stryker picks the exact target project configuration resolved by the test project. The problem you face when no longer picking a target framework is that Stryker may pick a net framework version (and not a core one), and then it needs the solution for building it. |
Disclaimer: I reproduce this issue using Stryker integration test projects. They normally target net 8.0, but I have modified the 'tested project' to target net7.0 instead (and using our XUnit test project as the starting point, to be specific). I have been able to resolve this issue, by requesting .net8.0 only on the test project. And voila, it does work. I still have a warning about the being able to use .net8. Note that this fix works for single project mode, I sill have to look into solution mode, where it may be a bit trickier |
quick update: |
Thanks @dupdob - do you have a pre-release feed I can pull the fix down from pre-compiled? Otherwise I think it'll be a bit too many hoops to jump through to validate it against our build. |
I don't think there is any feed available for that. No problem anyway |
Confirmed fixed with 4.3.0 - thanks. |
Describe the bug
Attempting to upgrade from 4.0.6 to 4.2.0, analysis is failing for one of our test projects, causing an error.
Specifying
--dev-mode
doesn't appear to add any additional details.4.0.6
4.2.0
Logs
See the
mutation-report
artifact here.Expected behavior
Mutation tests work.
Desktop (please complete the following information):
net462,net472,net6.0,netstandard2.0
4.2.0
Additional context
Failing upgrade: App-vNext/Polly#2293
The text was updated successfully, but these errors were encountered: