Stream: beginners

Topic: ✔ dbg: not working at all?


view this post on Zulip Mo (Dec 11 2024 at 22:04):

Hi again, I see some issues and conversations about dbg, but I'm just trying a simple roc dev or roc dev main.roc with the following, and get no output:

app [main] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.17.0/lZFLstMUCUvd5bjnnpYromZJXkQUrdhbva4xdBInicE.tar.br" }

main =
    dbg "hello"
    Task.ok {}

If dbg is currently not working, what's a good way to do print debugging? From my extremely novice understanding, it seems functions would have to be converted to Tasks to enable Stdout, right?

view this post on Zulip Brendan Hansknecht (Dec 11 2024 at 22:08):

Hmmm... I think I may have broken this with a pr the other day

view this post on Zulip Brendan Hansknecht (Dec 11 2024 at 22:13):

If you can go back to this commit or earlier, it should work: 50ec8ef1d1aa9abb2fda6948fb13abb431940ddf

view this post on Zulip Brendan Hansknecht (Dec 11 2024 at 22:13):

https://github.com/roc-lang/roc/commit/50ec8ef1d1aa9abb2fda6948fb13abb431940ddf

view this post on Zulip Mo (Dec 11 2024 at 22:18):

Nice, I'm using Nix (also novice-level) so in theory this should be straightforward, right? I'll give it a go

view this post on Zulip Mo (Dec 11 2024 at 22:52):

Excellent, dbg works again, thank you! For reference, I changed this line in my flake.nix:

roc.url = "github:roc-lang/roc?ref=50ec8ef1d1aa9abb2fda6948fb13abb431940ddf";

view this post on Zulip Notification Bot (Dec 11 2024 at 22:52):

Mo has marked this topic as resolved.

view this post on Zulip Brendan Hansknecht (Dec 11 2024 at 23:12):

I'll have a proper fix up soon

view this post on Zulip Brendan Hansknecht (Dec 11 2024 at 23:12):

Trying to do a larger cleanup of some of our handling here.

view this post on Zulip Brendan Hansknecht (Dec 12 2024 at 00:25):

Properly fixed on main starting at https://github.com/roc-lang/roc/commit/146710a129ec4f5403522dba2b334a19521d885d

view this post on Zulip Mo (Dec 12 2024 at 00:29):

That was fast! Latest commit works for me :)

view this post on Zulip Luke Boswell (Dec 12 2024 at 00:31):

Roc: the Fast, Friendly, Functional language ... and dev team :joy:


Last updated: Jul 06 2025 at 12:14 UTC