Stream: beginners

Topic: How to glue


view this post on Zulip Agus Zubiaga (Feb 28 2023 at 22:23):

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?

view this post on Zulip Agus Zubiaga (Feb 28 2023 at 22:25):

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

view this post on Zulip Brendan Hansknecht (Feb 28 2023 at 22:28):

I think it needs to be run on InternalFile.roc

view this post on Zulip Agus Zubiaga (Feb 28 2023 at 22:31):

Interesting, I just tried that and it succeeded but it didn't generate any types: CleanShot-2023-02-28-at-19.31.112x.png

view this post on Zulip Brendan Hansknecht (Feb 28 2023 at 22:32):

@Richard Feldman is something currently broken with glue? Does it need to be run differently? I think the glue cli tests still work.

view this post on Zulip Folkert de Vries (Feb 28 2023 at 22:52):

you need to give it an app module I think

view this post on Zulip Folkert de Vries (Feb 28 2023 at 22:52):

or perhaps the platform's main module?

view this post on Zulip Agus Zubiaga (Feb 28 2023 at 23:17):

Using src/main.roc failed: CleanShot-2023-02-28-at-20.16.412x.png

view this post on Zulip Agus Zubiaga (Feb 28 2023 at 23:18):

Tried it with examples/args.roc and it failed too

view this post on Zulip Agus Zubiaga (Feb 28 2023 at 23:19):

Switching to master to see if this is caused by any of my changes

view this post on Zulip Agus Zubiaga (Feb 28 2023 at 23:20):

Yeah, I get the same errors on main

view this post on Zulip Notification Bot (Feb 28 2023 at 23:30):

11 messages were moved here from #beginners > sockets by Agus Zubiaga.

view this post on Zulip Richard Feldman (Mar 01 2023 at 00:57):

I can look into this tomorrow - maybe there was a regression the tests didn't catch?

view this post on Zulip Agus Zubiaga (Mar 01 2023 at 00:58):

Sounds good. Which .roc file are we supposed to run it with? Out of curiosity

view this post on Zulip Richard Feldman (Mar 01 2023 at 01:00):

right now it's the platform's main.roc

view this post on Zulip Richard Feldman (Mar 01 2023 at 01:01):

I'd like that to expand in the future, but right now roc glue is basically "Minimum Viable Product targeting Rust" :big_smile:

view this post on Zulip Richard Feldman (Mar 01 2023 at 01:01):

(evidently with a regression currently!)

view this post on Zulip Agus Zubiaga (Mar 01 2023 at 01:01):

Haha, makes sense. Thanks!

view this post on Zulip Brendan Hansknecht (Mar 01 2023 at 03:16):

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