coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.99k stars 387 forks source link

Remove deterministic build feature hack for 3.1.300+ SDK #900

Closed MarcoRossignoli closed 4 years ago

MarcoRossignoli commented 4 years ago

Ref issue https://github.com/coverlet-coverage/coverlet/issues/882#issuecomment-657547636

gitfool commented 4 years ago

@MarcoRossignoli I'd also love to see this fixed and published in a stable version.

clairernovotny commented 4 years ago

You should be able to depend on InitializeSourceRootMappedPaths to return the SourceRoot items directly. https://github.com/dotnet/roslyn/blob/c64d1e3a7b3e2b6d5a71ca4ceb5848bcd79a0970/src/Compilers/Core/MSBuildTask/Microsoft.Managed.Core.targets#L186-L202

The target initially didn't return anything and in 3.1.300 it was changed to return those items.

MarcoRossignoli commented 4 years ago

Some notes for version checking https://github.com/novotnyllc/MSBuildSdkExtras/blob/master/Source/MSBuild.Sdk.Extras/Build/RIDs.targets#L145-L151

MarcoRossignoli commented 4 years ago

@gitfool pls can you try(tomorrow, we build at midnight) to test with nightly removing the workaround to confirm that with sdk >= 3.1.100 the workaround is not needed anymore? https://github.com/coverlet-coverage/coverlet/blob/master/Documentation/ConsumeNightlyBuild.md

gitfool commented 4 years ago

@MarcoRossignoli it's now midnight (GMT) but I don't see a new preview for coverlet.collector. I guess I need to wait another day?

MarcoRossignoli commented 4 years ago

Oh issue with myget quota https://dev.azure.com/tonerdo/coverlet/_build/results?buildId=1197&view=logs&j=12f1170f-54f2-53f3-20dd-22fc7dff55f9&t=7dae026f-9e99-5d65-075e-3f7579577f94 cc: @tonerdo can you cleanup all version older than last month?

@clairernovotny is there some unlimited nuget feed service provided by foundation?Or what is the most used way by other?Didn't check for a while are github package feats complete right now?

@gitfool I attach here master packages, move to a local folder and use it as nuget feed source.

preview.34.zip

gitfool commented 4 years ago

@MarcoRossignoli it works!

Specifically, I removed the Directory.Build.targets workaround so coverlet.collector 1.3.1-preview.27.gdd2237a3be reported no coverage; then I bumped it to 1.3.1-preview.34 via local NuGet source and it reported coverage as expected. 🎉

MarcoRossignoli commented 4 years ago

Great thanks a lot for your time! Really appreciated!

gitfool commented 4 years ago

You're welcome. If you don't mind me asking, will we see this in a stable release soonish?

MarcoRossignoli commented 4 years ago

soonish

Is on plan...but I don't have ETA atm, my desire is to fix other 3 nasty issues and align versions to 3.0.0

Simple ones https://github.com/coverlet-coverage/coverlet/issues/874 https://github.com/coverlet-coverage/coverlet/issues/705 (waiting for vstest team answer) Complex https://github.com/coverlet-coverage/coverlet/issues/936 every new c# compiler release we have some pain on new patterns

clairernovotny commented 4 years ago

We recommend moving away from MyGet. Artifacts/Pipelines is free for opens source projects so you can use your own account or we can set you up on the .NET Foundation one. Since you're already using DevOps, I'd just create a public feed there and push to that.

MarcoRossignoli commented 4 years ago

OK thanks!

eduherminio commented 3 years ago

@MarcoRossignoli Please let us know as soon as you have any ETA for the next stable version.

JimBobSquarePants commented 3 years ago

Is there a 1.3.1-preview.34 available to anyone else?

MarcoRossignoli commented 3 years ago

We're in the middle of nightly update(https://github.com/coverlet-coverage/coverlet/issues/969) so for the moment the last version is on my tmp feed https://f.feedz.io/marcorossignoli/coverletunofficial/nuget/index.json

JimBobSquarePants commented 3 years ago

Thanks!

MarcoRossignoli commented 3 years ago

Is there a 1.3.1-preview.34 available to anyone else?

Also we consolidate all versions to 3.0.0(since next release).

StefH commented 3 years ago

Hello @MarcoRossignoli , is it possible that you already provide a 3.0.0-preview on NuGet ?