I find it really horrible that when expect does fail it shows no additional output. Is this by design ?
ouch, I hope we haven't designed Roc to be really horrible :frown:
can you be more specific about what output you would have liked to see?
This may have occurred with a top-level expect?
I created expect on top level. I see that it is failing but I can't see exact values which are not matching (obviously it would be helpful)
This is a bug
Using dbg should help you out for now @Artur Swiderski
does dbg
work in roc test
? I've never tried it, so it might not :big_smile:
not reliably, I think
thx I will try that
how exactly I should use dbg in roc test what is the correct syntax ?
dbg
is in the tutorial. Is there something more you are looking for? It would be good to add this to the tutorial for others too.
Basically I think you can give it any expression you like, like a string, and it will print it out etc when you roc dev
your application.
ok there is limitation to dbg , I see only first print even if I place more dbg checks one after another.
There is even bigger limitation .Whenever there are warnings in the app (which is normal during development) roc dev does not execute app and I cant see dbg. What left is to roc run to execute and in this mode dbg are invisible
Thanks for the report. The first limitation is a known issue - it will be worked on.
The latter we have a PR for here: https://github.com/roc-lang/roc/pull/4661. It should land today, and then it will be in tomorrows nightly release of Roc
Last updated: Jul 06 2025 at 12:14 UTC