Stream: compiler development

Topic: code coverage


view this post on Zulip Anton (Sep 28 2024 at 10:37):

I was able to generate code coverage for "normal runs" of the roc cli like roc build myFile.roc. I love to instantly see if a function was used and what branches were taken when debugging something :) . I'll write up how you can do this and add it to the repo.

view this post on Zulip Anton (Sep 28 2024 at 12:57):

https://github.com/roc-lang/roc/pull/7125

view this post on Zulip Anton (Oct 22 2024 at 18:03):

After using the code coverage for a while, I have to say I really love it. I highly recommend using it when debugging the compiler!

view this post on Zulip Brendan Hansknecht (Oct 22 2024 at 18:30):

I wonder if that would help for any of the morphic stuff...

view this post on Zulip Anton (Oct 23 2024 at 08:17):

You mean like the performance issue here?

view this post on Zulip Brendan Hansknecht (Oct 23 2024 at 15:11):

Yeah

view this post on Zulip Anton (Oct 26 2024 at 17:57):

FYI if any of you ever want to know how many times certain lines of code are being run during a specific command, you can use the html report produced by the code coverage tool:
Screenshot from 2024-10-26 19-55-56.png


Last updated: Jul 06 2025 at 12:14 UTC