Skip to content

Export jl_write_coverage_data or its equivalent in Julia 1.10+ #52452

@Drvi

Description

@Drvi

Since #49600 jl_write_coverage_data is no longer exported, making it inaccessible in Julia 1.10+. We recently started calling it (as ccall(:jl_write_coverage_data, Cvoid, (Ptr{Cvoid},), Base.JLOptions().output_code_coverage)) in our tests since we're using ReTestItems.jl which runs tests in multiple Julia processes in a parallel. Sometimes one of the test-running processes dies (e.g. we kill a worker on timeout or when the machine is getting too close to OOMing), at which point we lose the coverage information from it -- and our mitigation for that is calling jl_write_coverage_data after each test item. This seems to work well on 1.9 but is not currently compatible with 1.10 and onwards.

It would be great to have the option to generate coverage files eagerly on 1.10.

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