You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Julia v1.10.6, the code below gets 100% coverage. In Julia v1.11.1, foo is not marked as covered.
src/Example.jl:
module Example
export foo, bar
functionfoo(x) end# covered in v1.10 but not covered in v1.11functionbar(x; o=1) end# covered in both versionsend
test/runtests.jl:
using Example, Test
@testisnothing(foo(1))
@testisnothing(bar(1))
I understand that this package uses a workaround to mark lines as code that then may not be marked as covered. Indeed, with DISABLE_AMEND_COVERAGE_FROM_SRC=yes, I get full coverage in v1.11.
Based on that, I presume the explanation here is that the compiler optimizes foo out, while bar has a default parameter and somehow gets tracked anyway.
But I am surprised to see this change when switching between Julia versions. My questions are:
Is this intended behavior?
Is there a way to get full coverage back in v1.11 without setting the environment variable?
The text was updated successfully, but these errors were encountered:
In Julia v1.10.6, the code below gets 100% coverage. In Julia v1.11.1,
foo
is not marked as covered.src/Example.jl
:test/runtests.jl
:I understand that this package uses a workaround to mark lines as code that then may not be marked as covered. Indeed, with
DISABLE_AMEND_COVERAGE_FROM_SRC=yes
, I get full coverage in v1.11.Based on that, I presume the explanation here is that the compiler optimizes
foo
out, whilebar
has a default parameter and somehow gets tracked anyway.But I am surprised to see this change when switching between Julia versions. My questions are:
The text was updated successfully, but these errors were encountered: