JuliaCI / JuliaCI/CoverageTools.jl

`process_cov` throws `BoundsError: attempt to access 8-codeunit String at index [1:9]`

Open
#70 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
9
Forks
7
PR merge metrics
No merged PRs in 30d

Description

BoundsError: attempt to access 8-codeunit String at index [1:9]
Stacktrace:
  [1] checkbounds
    @ ./strings/basic.jl:216 [inlined]
  [2] getindex
    @ ./strings/string.jl:265 [inlined]
  [3] process_cov(filename::String, folder::String)
    @ CoverageTools ~/.julia/packages/CoverageTools/JSYpL/src/CoverageTools.jl:133
  [4] process_file(filename::String, folder::String)
    @ CoverageTools ~/.julia/packages/CoverageTools/JSYpL/src/CoverageTools.jl:232
  [5] process_folder(folder::String)
    @ CoverageTools ~/.julia/packages/CoverageTools/JSYpL/src/CoverageTools.jl:258
  [6] process_folder(folder::String) (repeats 2 times)
    @ CoverageTools ~/.julia/packages/CoverageTools/JSYpL/src/CoverageTools.jl:264
  [7] (::var"#3#4")()
    @ Main ~/test_retestitems.jl:39
  [8] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:511
  [9] with_logger(f::Function, logger::Logging.ConsoleLogger)
    @ Base.CoreLogging ./logging.jl:623
 [10] top-level scope
    @ ~/script.jl:38

https://github.com/JuliaCI/CoverageTools.jl/blob/9d8fba371f4c65a7e9ca3bdaae753a52bcb22218/src/CoverageTools.jl#L133

Where ~/script.jl:38 looks like:

    Logging.with_logger(Logging.ConsoleLogger(stderr, Logging.Warn)) do
        src_coverage = Coverage.process_folder("src")
        LCOV.writefile("lcov.info", src_coverage)
    end

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/CoverageTools.jl:133 in process_cov, then trace the call from process_folder shown in the report. Reproduce with the provided Logging.with_logger and Coverage.process_folder("src") example; done means the reported BoundsError no longer occurs while processing the coverage folder.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.