JuliaCI / JuliaCI/Coverage.jl

enable code coverage from C-embedded Julia

Open
#348 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
182
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Currently, as far as I understand, the only way to activate code coverage in Julia is via the --code-coverage command-line flag. However, when embedding Julia through the C API using functions like jl_init(), there is no documented or supported way to pass such flags.

As a result, it appears to be impossible to enable code coverage when Julia is embedded from a C program. This limitation makes it difficult to track test coverage in environments where Julia is integrated as a component of a larger native application.

It would be extremely helpful to:

Allow passing startup arguments (like --code-coverage=user) programmatically via jl_init() or a similar API.

Or alternatively, provide a global programmatic interface or configuration file to enable coverage in embedded contexts.

This would greatly enhance the tooling and testing capabilities for projects embedding Julia.

Thanks for considering this!

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 by investigating Julia's existing --code-coverage handling and the jl_init() embedding entry point. Determine whether startup arguments or another supported configuration path can be exposed for embedded Julia, and define how coverage activation would be verified in an embedding scenario. The issue is stale and proposes alternatives rather than naming a specific implementation path.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.