-
Notifications
You must be signed in to change notification settings - Fork 386
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
Fix exclude by files #524
Fix exclude by files #524
Conversation
Oh missed unix fs behaviour...I'll fix tests. |
@@ -5,6 +5,7 @@ | |||
<TargetFramework>netstandard2.0</TargetFramework> | |||
<AssemblyVersion>5.1.1</AssemblyVersion> | |||
<IsPackable>false</IsPackable> | |||
<LangVersion>preview</LangVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should master use preview version of C#?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question!
I did it for test project https://github.com/tonerdo/coverlet/blob/master/test/coverlet.core.tests/coverlet.core.tests.csproj
At the moment the only feature I used is null coalesce ??=
because other features(i.e. IAsyncEnumerable) needs new netcoreapp3.0/standard2.1 object.
Also corefx seem allow preview https://github.com/dotnet/corefx/blob/master/Directory.Build.props#L248
@ViktorHofer do you see any issue with this config related to emitted IL?
cc: @tonerdo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No concerns from my side.
I'll merge after Viktor opinion on |
When can we expect this to be released (I'd need to in the global tool)? |
We don't have a strict plan for release cc: @tonerdo |
@MarcoRossignoli nice! I installed the latest nightly version of the global tool, unfortunately i get this:
My command line: I didn't get the error with the previous official version. |
The version 1.5.69-gafe227b39e seems to work though:
|
can you cleanup files and retry with |
@MarcoRossignoli can you be a bit more specific which files I should clean up? |
something like git clean -fdx...to be sure to rebuild |
Oh I see, you're right: I cleaned up my project (deleted bin+obj folders) and One difference I noticed from the previous official version is it gives some warning messages: These weren't there when running the official version. |
Have you enabled logs And yes new version exclude in automatic way libs that are not instrumentable...a lib is instrumentable if has got pdb and if source(indicated in pdb) are present on current hard drive(source that builds dll+pdb). |
It actually shows the same regardless of verbosity (not specified / detailed). It's a minor issue, just thought you wanted to know. Thanks for the quick help! |
Uh...I'll investigate... |
😢 The problem with invalid COR20 header signature is now happening in my continuous integration environment:
The CI build does:
The error is only reported on some DLLs, others are Ideas? |
You could include only module you want to cover using filters |
Well in my case these are modules I want to cover, they belong to the app. In the meantime I discovered that the error might be related to some permissions so I switched the CI user to an admin and the However, I have a new issue 😢 Any clue as to why the hits file can't be found? |
Could be related to 2 fact...one there is no test that call that code...the second one could be an well know issue with vs test that we solved with collectors #110 |
@MarcoRossignoli you're right: the modules for which no hits file were generated didn't have any tests referencing them, so that's cool! Unfortunately I'm sorry to say my previous statement that the I can also supply some repro steps:
Same sequence of steps with version I noticed that if after step 3 I delete the |
@adrianhara thank's for infos...I'll try to repro...if you have already a repro please attach it here(zip solution) so I won't waste time(sometimes is not so easy perfectly repro, also a small difference changes the game) |
@MarcoRossignoli sure, I uploaded my repro code here https://github.com/adrianhara/coverlet-issue-repro |
@adrianhara to run on last version you should generate portable pdb from wpf project |
Fixes #122
At the moment the issue is that files to exclude are searched on current directory and this is the problem.
I moved source file exclusion evaluation inside instrumentation for every instrumented dll/source.
NB. At the moment we allow rule with root drive defined...but this doesn't work well with globbing pattern matching(d:\file and c:\file will be matched like same file), btw this implementation allow the use, in future we could think about forbid. I don't think make a lot of sense use full path on rules.
I run this test
win
with this result
ubuntu
Report without
Instrumenter.cs, InstrumenterResult.cs
coverage.json.txtNormal report without filter
Instrumenter.cs, InstrumenterResult.cs
are present coverage.json.txtcc: @tonerdo @petli
@ido-namely you did first implementation, if you've some time let me know what do you think.
@SlowLogicBoy @orkenstein @hack2root if you find some time could clone this branch and do tests, not obligated, you can use your local clone following this guide https://github.com/tonerdo/coverlet/blob/master/Documentation/Troubleshooting.md#use-local-build