-
Notifications
You must be signed in to change notification settings - Fork 120
compiled code not showing up on windows #448
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
Comments
There shouldn't be anything special you need to do, I will try to look into it and see if I can reproduce the issue on my Windows machine. |
I noticed that covr can't find gcov on my work machine. It uses R 3.6.1 (probably should upgrade) with the usual Rtools. I can find gcov.exe in Rtools/mingw_64/bin/ but in R; Setting the path via:
Worked. |
I was wondering if this would be fixed by #460 which was recently merged into master, so I installed current master, but the problem persists. On my windows machine R can find gcov just fine (that is not the problem either).
|
I was able to get a full report on Windows 10, with R 3.6.1 and covr 3.5.1. Because I was using an older toolchain (Rtools 3.5) I had to add a src/Makevars.win to set the correct C++ standard, but I can't see how this would affect covr. I also have to set > options(covr.gcov='whatever/Rtools/mingw_64/bin/gcov.exe')
> covr::package_coverage()
binsegRcpp Coverage: 99.31%
R/binseg_normal.R: 97.56%
src/binseg_normal.cpp: 100.00%
src/interface.cpp: 100.00% Session info in case you are interested:
|
Another thing you could check is that
You could step through |
seems like the problem is that the first gcov on my PATH is "C:/mingw/bin/gcov.exe" which is version 6.3.0 (does not generate gcov files), whereas Rtools gcov is version 8.3.0 (does generate gcov files). So a short term fix is to manually specify the Rtools gcov, > options(covr.gcov="c:/rtools40/mingw64/bin/gcov.exe")
> setwd("~/R/binsegRcpp")
> covr::package_coverage()
binsegRcpp Coverage: 99.31%
R/binseg_normal.R: 97.56%
src/binseg_normal.cpp: 100.00%
src/interface.cpp: 100.00%
> for a longer term / big picture fix, can you please add a warning? I would have expected something like |
Are you sure it's the gcov version, as opposed to, say, a conflict between the gcc/g++ tools used to create the .gcno files (probably from I've added warnings when covr identifies relevant '.gcno' files but obtains no output from 'gcov' because either;
I think this would be useful, although I'm not sure if there would be some cases that the warning might 'annoy' a user (I think they could always adjust their .covrignore so any .gcno that they don't need doesn't get built anyway) |
The gcov version has to match the version you are compiling the package with. If you compile with the R toolchain you need to use the gcov from Rtools. |
Closed by #465 |
super thanks! |
hi @jimhester first of all thanks for maintaining covr which I find to be a very useful tool for many projects.
On my windows box the compiled code coverage is not showing up on the local report created via
This is with https://github.com/tdhock/binsegRcpp -- I only see one file R/binseg_normal.R on the coverage report, and I expected to also see src/binseg_normal.cpp and src/interface.cpp as on codecov e.g. https://coveralls.io/builds/33368011
I do have gcov on the path, is there any other setup that I need to do to get this to work?
The text was updated successfully, but these errors were encountered: