JuliaCI / Coverage.jl

Take Julia code coverage and memory allocation results, do useful things with them
MIT License
174 stars 68 forks source link

Error running coverage test on travis #264

Closed logankilpatrick closed 4 years ago

logankilpatrick commented 4 years ago

Hey all, I am getting this error on Travis:

┌ Info: CoverageTools.process_cov: Coverage file(s) for src/archive/model.jl do not exist.
1025└ Assuming file has no coverage.
1026ERROR: Base.Meta.ParseError("missing comma or ) in argument list")
1027Stacktrace:
1028 [1] #parse#1(::Bool, ::Bool, ::Bool, ::typeof(Base.Meta.parse), ::String, ::Int64) at ./meta.jl:184
1029 [2] parse(::String, ::Int64) at ./meta.jl:176
1030 [3] amend_coverage_from_src!(::CoverageTools.FileCoverage) at /home/travis/.julia/packages/CoverageTools/mRqnP/src/CoverageTools.jl:189
1031 [4] process_file(::String, ::String) at /home/travis/.julia/packages/CoverageTools/mRqnP/src/CoverageTools.jl:240
1032 [5] process_folder(::String) at /home/travis/.julia/packages/CoverageTools/mRqnP/src/CoverageTools.jl:263
1033 [6] process_folder(::String) at /home/travis/.julia/packages/CoverageTools/mRqnP/src/CoverageTools.jl:269
1034 [7] process_folder() at /home/travis/.julia/packages/CoverageTools/mRqnP/src/CoverageTools.jl:255
1035 [8] top-level scope at none:1

Has anyone seen this or know what do do? My coverage tests pass locally when I run Pkg.test("MyPkg", coverage=true)

DilumAluthge commented 4 years ago

This is almost always indicative of a syntax error in your package. What is the package that you are testing? I can take a look.

logankilpatrick commented 4 years ago

It's a private Package sadly, but I'm guessing it's from one of the files in my archive folder. Is there a way to add a ignore to certain files?

DilumAluthge commented 4 years ago

Not yet. See https://github.com/JuliaCI/CoverageTools.jl/issues/33

Can you fix the syntax error in the file? It looks like src/archive/model.jl is probably the culprit. You don't have to get the file running. You just need to fix the syntax error. Looks like maybe a missing comma.

The other option is to rename the file from src/archive/model.jl to src/archive/model.jl.ignore or something like that.

logankilpatrick commented 4 years ago

Fixed all those syntax errors and it works like a charm!