Skip to content
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

Invalid iteration specification #44

Closed
timholy opened this issue Nov 23, 2020 · 9 comments
Closed

Invalid iteration specification #44

timholy opened this issue Nov 23, 2020 · 9 comments

Comments

@timholy
Copy link
Member

timholy commented Nov 23, 2020

https://github.com/mojaie/MolecularGraph.jl/pull/38/checks?check_run_id=1441476647

To make this more searchable, the stacktrace is:

ERROR: LoadError: Base.Meta.ParseError("invalid iteration specification")
Stacktrace:
 [1] parse(::String, ::Int64; greedy::Bool, raise::Bool, depwarn::Bool) at ./meta.jl:184
 [2] parse(::String, ::Int64) at ./meta.jl:176
 [3] amend_coverage_from_src!(::FileCoverage) at /home/runner/.julia/packages/CoverageTools/6Qc5H/src/CoverageTools.jl:189
 [4] process_file(::String, ::String) at /home/runner/.julia/packages/CoverageTools/6Qc5H/src/CoverageTools.jl:240
 [5] process_folder(::String) at /home/runner/.julia/packages/CoverageTools/6Qc5H/src/CoverageTools.jl:263
 [6] process_folder(::String) at /home/runner/.julia/packages/CoverageTools/6Qc5H/src/CoverageTools.jl:269
 [7] process_folder() at /home/runner/.julia/packages/CoverageTools/6Qc5H/src/CoverageTools.jl:255
 [8] top-level scope at /home/runner/work/_actions/julia-actions/julia-processcoverage/v1/main.jl:9
 [9] include(::Function, ::Module, ::String) at ./Base.jl:380
 [10] include(::Module, ::String) at ./Base.jl:368
 [11] exec_options(::Base.JLOptions) at ./client.jl:296
 [12] _start() at ./client.jl:506
in expression starting at /home/runner/work/_actions/julia-actions/julia-processcoverage/v1/main.jl:9
@DilumAluthge
Copy link
Member

So, usually this means the problem is somewhere in the package's code.

@DilumAluthge
Copy link
Member

I believe that there is a syntax error here:
https://github.com/timholy/MolecularGraph.jl/blob/004bd8b850ec087a24b9d822c85093e7f9175fd6/src/geometry/embed2d.jl#L78

@timholy
Copy link
Member Author

timholy commented Nov 23, 2020

Dang you are quick!

@DilumAluthge
Copy link
Member

To discover this, I looked at the log:

[ Info: CoverageTools.process_file: Detecting coverage for src/geometry/cartesian.jl
[ Info: CoverageTools.process_cov: processing src/geometry/cartesian.jl.2641.cov
[ Info: CoverageTools.process_file: Detecting coverage for src/geometry/embed2d.jl
┌ Info: CoverageTools.process_cov: Coverage file(s) for src/geometry/embed2d.jl do not exist.
└ Assuming file has no coverage.
ERROR: LoadError: Base.Meta.ParseError("invalid iteration specification")
Stacktrace:

Since the last source file mentioned was src/geometry/embed2d.jl, I figured that the syntax error was in that source file.

Since it was a parsing error related to iteration, I went to that source file and searched for the word for.

@timholy
Copy link
Member Author

timholy commented Nov 23, 2020

xref #42

@fingolfin
Copy link
Member

What I don't understand, though: why did the syntax error in src/geometry/embed2d.jl not cause a failure in an earlier part of the CI? The only reason I can think of is that src/geometry/embed2d.jl wasn't loaded at all -- but then why would there be coverage data for it?

@timholy
Copy link
Member Author

timholy commented Nov 23, 2020

It's because the source file is checked in but the package doesn't include it. And there isn't any coverage data, but this package counts files that lack coverage against the final percentage.

@timholy
Copy link
Member Author

timholy commented Nov 23, 2020

For packages that are precompiled, we could look at the cachefile (*.ji) header and see which files are actually included. But that won't work for __precompile__(false) packages, so I propose we just shouldn't bother.

@vtjnash vtjnash transferred this issue from JuliaCI/Coverage.jl Nov 23, 2020
@DilumAluthge
Copy link
Member

Now that #43 is merged, can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants