-
Notifications
You must be signed in to change notification settings - Fork 68
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
Coverage information does not seem to be right #187
Comments
By the way, I am also wondering why it is marking this line as it was not executed: https://codecov.io/gh/JuliaSpace/ReferenceFrameRotations.jl/src/master/src/DCM.jl#L345 whereas the surrounding lines were executed. |
Using |
Without this option, the coverage results are not showing accurate measurements. For more information, see: JuliaCI/Coverage.jl#187
And I could not use
|
Sounds like JuliaLang/julia#28192 |
@ararslan yes, maybe. However, I started to see the problem today. The last coverage result, which was 2 days ago, was working perfectly. |
cc @fingolfin |
Yeah looking around at various PRs with coverage integration, I think we're going to need to revert the latest changes to this package unless we can come up with a quick fix. Something is very wrong. |
The old coverage was "accidentally correct". The problem is that due to a bug in Coverage.jl, it reported lines that do not contain code, and lines that are not covered, the same way. You can see that in e.g. https://coveralls.io/builds/18398285/source?filename=src/compose_rotations.jl only one line is marked green, but no lines red; so that means it thinks that exactly that one line contains code. Which is of course wrong. When I fixed this, the other lines of code started to be marked as "is code". But Julia still reports that there is no coverage for them, so now they get marked as "uncovered code". That's unfortunate, but other than either enabling I do not see any way JuliaCoverage.jl can help with that, other than reverting the fix and returning to broken coverage reporting. Which will result in great coverage scores for everybody, with a lot of uncovered code not reported as such. I.e., pick what kind of error you prefer, first or second order :/. |
@ararslan I am not sure anything is wrong in Coverage.jl, other than it not hiding the effects of JuliaLang/julia#28192 anymore. That said, one could of course try to mixup things further, and e.g. not report macros as "code"; then the example @ronisbr reports for |
I understood, thanks @fingolfin . Indeed, running with |
As a matter of fact, I wonder if any project using Coverage.jl with Julia 0.7 or 1.0 had a coverage score other than 100% prior to my fixes; I don't see how, at least. While that looks great, it is also completely useless... |
I see. The local runs with |
What did you try? I am looking at https://github.com/JuliaSpace/ReferenceFrameRotations.jl/blob/master/.travis.yml now. I assume you edited the four calls to Julia there to insert |
Currently, Pkg would have to be tweaked to run the tests with |
Hi @fingolfin, I modified the script in travis to execute the following command in my project:
I have reverted the commit because I saw no difference. I understood that something inside Pkg must change to fix this. I have two questions:
|
No super good workaround at the moment. Please open an issue at Pkg.jl. |
Done, should we close this one since it is not related to this package? |
While I get the sentiment, I personally prefer accidentally correct over way off until the real issue is fixed in Base. It wasn't perfect, but it certainly was closer to the truth. |
But always reporting 100% is only closer to the truth if you already know your coverage is above 50%. I'd also argue that it is always useless. You might as well turn off coverage completely. |
I started a PR for Pkg here: JuliaLang/Pkg.jl#866 |
Thank you for the Pkg PR and also your efforts in maintaining this package. Coverage 0.6.0 was not always reporting 100% for me, or for many other packages. Check out e.g. https://codecov.io/github/JuliaArrays/StaticArrays.jl?branch=master I'm just saying that stuff like https://codecov.io/gh/JuliaArrays/StaticArrays.jl/src/1683f798e0dcb8725768407053a45ae48434fed7/src/eigen.jl#L39 makes me completely distrust the current results. Let's see how much not inlining helps. I'm certainly not saying that the situation before was good though. |
For ReferenceFrameRotations, when I tested the coverage off-line using |
|
I forgot to mention: of course to test with |
Having the change on master with some documentation and a note clearly stating that it's experimental seems like a reasonable course of action to me. |
Can you give more details on this, @fingolfin ? |
If the environment variable DISABLE_AMEND_COVERAGE_FROM_SRC is set to `yes`, do not call `amend_coverage_from_src!`. This is an optional mitigation for issue JuliaCI#187, and in general makes it easier to test the impact of amending the coverage data.
If the environment variable DISABLE_AMEND_COVERAGE_FROM_SRC is set to `yes`, do not call `amend_coverage_from_src!`. This is an optional mitigation for issue JuliaCI#187, and in general makes it easier to test the impact of amending the coverage data.
This is meant to fix issue JuliaCI#187
If the environment variable DISABLE_AMEND_COVERAGE_FROM_SRC is set to `yes`, do not call `amend_coverage_from_src!`. This is an optional mitigation for issue JuliaCI#187, and in general makes it easier to test the impact of amending the coverage data.
If the environment variable DISABLE_AMEND_COVERAGE_FROM_SRC is set to `yes`, do not call `amend_coverage_from_src!`. This is an optional mitigation for issue JuliaCI#187, and in general makes it easier to test the impact of amending the coverage data.
If the environment variable DISABLE_AMEND_COVERAGE_FROM_SRC is set to `yes`, do not call `amend_coverage_from_src!`. This is an optional mitigation for issue #187, and in general makes it easier to test the impact of amending the coverage data.
I have just released Coverage.jl version 0.9.0. I hope many of you will see some improvement in coverage thanks to PR #210. I urge you to try that first. If you are still unhappy, you can try the |
@fingolfin Thanks! It is indeed much better on my tests. |
yup. we're back up to 99.11% coverage now. Thanks! |
Glad to hear this. And @sbromberger tested Without the option, and just Coverage.jl 0.9.0, the function is correctly marked as code that is not executed: https://codecov.io/gh/JuliaGraphs/LightGraphs.jl/src/master/src/Parallel/shortestpaths/johnson.jl#L40 |
I think we could close this now... @ararslan ? |
Just a final question: what should we expect if we turn off |
I am not sure I understand the question... turn off the DISABLE flag? As in, not use it? And what do you want to know about that?! |
ah, never mind. We tried both ways in LG and I concluded that we're going to not include the DISABLE flag. We get accurate and good results without it. |
I think you're in the best position to determine whether this is sufficiently resolved, so I trust your judgement on whether this should be closed. |
I'll close it then; but of course anybody is free to open a new issue if they still see problems anywhere |
I have still one small issue: one line (which is uncovered and next to another uncovered line) seems to be not considered, i.e. in coveralls it is not marked. |
Similarly one line which should be marked as covered is not marked |
@adamglos92 Are you sure that line 65 in your first example is executed? Have you verified it, e.g. by printing or throwing an exception there? As to the second example: I only see a line of code that is not marked as code, so neither marked as covered nor as uncovered. The cause of this has been discussed extensively in this PR, and also is discussed in the README.md section on |
@fingolfin It is not, but I think I get the idea now. So if in case there is multiple lines weren't executed, it is not promised that each is marked as uncovered. Can I expect that at least one (as in my case) is marked as uncovered? |
Hi guys!
After the new version of Coverage, the coverage information does not seem to be right. Take a look, for example, at the function
compose_rotation
here:https://coveralls.io/builds/19787299/source?filename=src/compose_rotations.jl#L53
It says that it is not tested at all. However, take a look at the test here:
https://github.com/JuliaSpace/ReferenceFrameRotations.jl/blob/6fd8162b51958ed809fe36c268eb11bd0a506a43/test/test_compose_rotations_quaternions.jl#L49
The last version of Coverage was saying that ReferenceFrameRotations.jl has a coverage of 100% and now it is 74%.
Notice that the same thing happened with Codecov.
The text was updated successfully, but these errors were encountered: