Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage misses on macros that work on functions #36283

Closed
aminya opened this issue Jun 14, 2020 · 2 comments
Closed

Coverage misses on macros that work on functions #36283

aminya opened this issue Jun 14, 2020 · 2 comments

Comments

@aminya
Copy link

aminya commented Jun 14, 2020

Coverage data generated by Julia misses the first line of the head of the function definition:

using TypeTransform
@transform function foo(a, b::allsubtypes(A))
    println("a new method")
end

Other examples:
https://codecov.io/gh/aminya/AcuteML.jl/src/master/src/xmlutils/findcontent.jl#L45
https://github.com/JuliaCI/Coverage.jl/issues/269

@aminya aminya changed the title Coverage miss on macros that work on functions Coverage misses on macros that work on functions Jun 14, 2020
awadell1 added a commit to awadell1/Interpolations.jl that referenced this issue Jan 11, 2021
Julia seems to have difficult tracking coverage for macros -> Switch to
using a type alias to avoid this

JuliaLang/julia#36283

Still not having coverage issues, but they go away if we disable
inlining -> julia --inline=no ...
@vtjnash
Copy link
Member

vtjnash commented Jun 22, 2021

Possibly fixed now, this issue is > 18 months old

@vtjnash vtjnash closed this as completed Jun 22, 2021
@kellertuer
Copy link

I still have the same problem for example here:
https://codecov.io/gh/JuliaManifolds/Manifolds.jl/src/kellertuer%2Fdecorator-adaptions/src/groups/group.jl#L470
One can see that the function itself is run but the macro line is still be marked as uncovered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants