Skip to content

Coverage mode is --code-coverage=user, which recompiles dependencies on 1.11-1.13 #129

Open

Description

@gpeairs

Coverage-mode test processes are started with --code-coverage=user (src/testprocess.jl, src/testitemcontroller.jl, in coverage_arg). Meanwhile julia-runtest calls Pkg.test(coverage=true), which passes --code-coverage=@<package root> instead, so only the package under test is tracked.

It looks like (until Julia 1.14) a package tracked for coverage can't reuse package images across processes. Under user, that applies to every dependency, so each test process compiles the whole dependency tree again with coverage counters.

Unless there's a reason to default to user that I'm not aware of, I think this could be improved by something like: When the test environment belongs to a package, pass --code-coverage=@<package root> to match Pkg.test, maybe with a way to override it.

Activity

  1. halleysfifthinc commented on Nov 4, 2026

    @halleysfifthinc

    Chiming in to say I'm running into this too: running tests with coverage from VSCode adds ~5 minutes to my test suite runtime (vs 2 mins when running with coverage from the legacy Pkg.test interface). Claude debugged to the same root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions