coverlet
coverlet copied to clipboard
Release for update that has `ExcludeAssembliesWithoutSources`?
TL;DR: new release please?
I've been using coverlet with Godot (open source game engine with C# support). Coverlet is a wonderful tool and I'm very grateful for it.
Since Godot is a game engine, it's non-trivial to write a dotnet test adapter for it given the scarcity of detailed documentation on how to do that (at least for most of us mortals). Instead, I use a bit of custom code to run "tests" (normal C# classes with custom attributes) inside it and coverlet just monitors the entire process. That was working great in Godot 3, which used mono.
Godot 4 actually integrates .NET 6 support directly, without the need for mono, using source generators and dynamic assembly loading, etc. Unfortunately, the latest release on coverlet does not work with it.
I have confirmed that the latest changes introduced on main from #1392 which introduce ExcludeAssembliesWithoutSources
allow coverlet to successfully collect code coverage for the Godot 4 process. I built it myself locally and used the build to verify.
The readme for the simple "test" harness I use contains more info about how coverlet is being used with Godot, if anyone finds that info useful.
All this to say: can we get an official release of the latest changes? It's been very helpful to me!
Not sure about an ETA as there were not much additional changes since. Until we release a new version, wouldn't consuming our nightly build be an alternative for you? I just tried it with the changes from #1392 and it works properly. You can read about consuming the nightly here.
~~Doesn't seem to be working for me. I tried running dotnet tool install -g coverlet.console --prerelease
on macOS 12 with .NET 6.0.402, but I keep getting the following error:~~
(microsoft.netcore.app.host.osx-x64 is not found in NuGet feeds https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json".)
I have the following nuget.config
file.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="coverlet" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
</packageSources>
</configuration>
Any ideas? Maybe it's user error — I'm not really sure how to go about this.
EDIT: Was user error! Forgot to add the default nuget feed to my nuget.config
file. 🤦♀️ Thanks for the tip! 😁
(Would still love to see an official release, though, as I'm building project templates that rely on this unreleased version of coverlet to collect coverage).
I guess there have been more fixes since, because the nightly version correctly generated coverage where the current release generated 0% coverage. Any updates on when the next release is planned?
@definitelyokay Please use latest release of coverlet.console.
The nuget.config should also have nuget.org feed
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="coverlet" value="https://pkgs.dev.azure.com/tonerdo/coverlet/_packaging/coverlet-nightly/nuget/v3/index.json" />
</packageSources>
</configuration>
This issue is stale because it has been open for 3 months with no activity.
coverlet V6.0.1 is released.