stryker-mutator / stryker-net

Mutation testing for .NET core and .NET framework!
https://stryker-mutator.io
Apache License 2.0
1.75k stars 176 forks source link

Publish nuget packages for all projects or include additional projects in stryker package #1939

Open Khitiara opened 2 years ago

Khitiara commented 2 years ago

Describe the bug I am trying to install the stryker nuget package to develop a runner that integrates with the build system I use (nuke in this case) and nuget fails to install the package due to Stryker.DataCollector and Stryker.RegexMutators not existing as independent nuget packages but not being bundled with the main package.

Logs

[Notification][Install] Install failed (project: _build, package: stryker v1.4.0)
Package restore failed. Rolling back package changes for '_build'.
Unable to find package Stryker.DataCollector. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org
Unable to find package Stryker.RegexMutators. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org

Expected behavior The stryker nuget package to be installed in my project.

Desktop (please complete the following information):

rouke-broersma commented 2 years ago

~This sounds like a problem with your build system because those are listed as project references (and thus packaged with stryker-net) and not nuget packages. Does nuke support dotnet cli tools?~

Sorry I misread, you're trying to use the stryker and not the stryker-net package because you're trying to create your own custom runner correct?

We don't yet publish those packages, we should do that!

Khitiara commented 2 years ago

Sorry I misread, you're trying to use the stryker and not the stryker-net package because you're trying to create your own custom runner correct? Yes, trying to reference stryker to write a custom runner that integrates with my build system better

richardwerkman commented 2 years ago

The issue should be fixed in release 1.4.1! Please let us know if you need help with your custom runner.

I wanted to warn you that (as you noticed) nobody really uses the stryker core package. And for the past few years we have introduced breaking changes in it. The semantic versioning is used on our own CLI runner, not the stryker core package. We currently don't have a way to diverge the versions of those packages so that will stay the same. So keep that in mind, breaking changes might occur. But we'll try to keep you in mind if your runner ends up usable.

rouke-broersma commented 2 years ago

Unfortunately the implementation for this had to be reverted because it was incomplete, it did not include transitive dependencies from referenced projects. Since microsoft does not provide any actual support for implementing what we tried here I think a better solution is to simply publish all packages to nuget.org.

jnysteen commented 10 months ago

@rouke-broersma Hi, are there any news on this? I'm unable to install stryker in a project. image Really, I just want to reference the types being serialized into a JSON report, but I'm unable to, due to this issue

rouke-broersma commented 10 months ago

@jnysteen we have not worked on this.

richardwerkman commented 10 months ago

This could be a good issue to pick up during hacktoberfest

rouke-broersma commented 10 months ago

We should probably move the types over to mutation testing elements and publish the package from there like we do for the other languages.