hey folks - I've tried testing the cli platform once more and it successfully builds the binary but I have to force quit the process either way. any one else? this is the code:
app "hangman"
packages { pf: "../roc/examples/interactive/cli-platform/main.roc" }
imports [
pf.Program.{ Program, ExitCode },
pf.Stdout,
pf.Stdin,
pf.Task.{ Task },
]
provides [main] to pf
main : Program
main =
Program.noArgs mainTask
mainTask : Task ExitCode [] [Read [Stdin], Write [Stdout]]
mainTask =
line <- Stdin.line |> Task.await
Stdout.line "Got: \(line)"
|> Program.exit 0
so it waits on stdin forever and never prints "Got: "?
@Richard Feldman if I run the program it works normally - the problem happens when I compile the binary. It gets stuck on "Rebuilding platform..." forever. But if I kill the process it actually succeeded and the binary is already then. (I'm running the current main built from source on a non-M1 Mac)
if the platform is really there, you can pass the --prebuilt-platform=true
flag
though maybe not on an M1 machine
yeah that flag doesn't do anything on M1 yet
@Georges Boris is there a branch pushed somewhere I could try? I have an M1
Sorry folks - my bad. I was taking roc
as roc build
and I got confused since it both built and ran the program. The "getting stuck" was just the program waiting for the line (as part of the program running). I just remembered about roc dev
and roc build
and things made sense again! Thank you.
yeah that flag doesn't do anything on M1 yet
It still works. It just assumes the platform was already compiled and skips rebuilding it.
Last updated: Jul 06 2025 at 12:14 UTC