I added error types like these for the Socket
module: https://github.com/roc-lang/basic-cli/blob/4d7c6906745c9be0ca1b80312540a9f0d14ad804/src/InternalFile.roc#L5
How do I regenerate the glue code to include them?
I tried:
$ roc glue src/Effect.roc src/src/glue.rs
but got this error:
thread 'main' panicked at 'not yet implemented: Handle Apply for builtin symbol `11.IdentId(0)` and layout InLayout(32)', crates/glue/src/types.rs:808:21
I think it needs to be run on InternalFile.roc
Interesting, I just tried that and it succeeded but it didn't generate any types: CleanShot-2023-02-28-at-19.31.112x.png
@Richard Feldman is something currently broken with glue? Does it need to be run differently? I think the glue cli tests still work.
you need to give it an app
module I think
or perhaps the platform's main
module?
Using src/main.roc
failed: CleanShot-2023-02-28-at-20.16.412x.png
Tried it with examples/args.roc
and it failed too
Switching to master
to see if this is caused by any of my changes
Yeah, I get the same errors on main
11 messages were moved here from #beginners > sockets by Agus Zubiaga.
I can look into this tomorrow - maybe there was a regression the tests didn't catch?
Sounds good. Which .roc file are we supposed to run it with? Out of curiosity
right now it's the platform's main.roc
I'd like that to expand in the future, but right now roc glue
is basically "Minimum Viable Product targeting Rust" :big_smile:
(evidently with a regression currently!)
Haha, makes sense. Thanks!
I have a guess. Before we could run roc glue
directly on InternalFile.roc
. I think for that platform, it was never run on the platform main.roc
. So probably when we changed to main.roc
it never got tested to work with the new changes. Given that the basic-cli main.roc
is a lot more complex and pulls in extra stuff, I wouldn't be surprised if it doesn't really work properly until we update roc glue
to fully support main.roc
with more complex effects/transition to the new effect interpreter stuff.
Last updated: Jul 05 2025 at 12:14 UTC