Stream: compiler development

Topic: Cleanup roc-lang/examples folder


view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

Some questions for this PR #6696 Remove platform rebuilding, in no particular order. I should have some time this week to chip away at this again.

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

We have talked about removing all the examples from roc-lang/examples into roc-lang/examples and replacing them with a README that explains where people can find the examples. I recently moved the basic-cli tests out, but I noticed @Anton you just moved hello world back to help with CI. Are you able to explain that a little more? Are we ok with just that one example in the roc repo?

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

There are some other things in examples which we may want to move out into roc-lang/examples. The interop examples (Ruby, Python, Java, SwiftUI). I propose we move these to a new folder at roc-lang/examples/platforms.

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

The same with virtual-dom-wip - I think we could move that to roc-lang/examples/platforms.

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

The same with the gui example and the inspect gui example over to roc-lang/examples/platforms.

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

I think we should move inspect-logging example into roc-lang/examples/CustomInspect.

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

In the PR above I have already moved the cli/effects-platform, and cli/false-interpreter, and cli/tui-platform into the crates/cli/tests/cli.

view this post on Zulip Luke Boswell (May 26 2024 at 23:27):

So that would be all that remains to clean-out the examples folder. What do you think?

view this post on Zulip Luke Boswell (May 26 2024 at 23:32):

Also - @Anton can you assist me with adding roc to the CI servers? Is this something we simply do in the GH action scripts or is that better done on the actual server?

view this post on Zulip Luke Boswell (May 26 2024 at 23:32):

Without roc none of the build.roc scripts run and build the platform binaries to run the tests.

view this post on Zulip Richard Feldman (May 27 2024 at 00:17):

just a quick note that Anton is on vacation right now! :big_smile:

view this post on Zulip Luke Boswell (May 27 2024 at 01:45):

haha, I forgot about that. Just in the weeds trying to sort through things. It's ok to wait until he returns, nothing urgent. :grinning:

view this post on Zulip Anton (May 27 2024 at 19:03):

Also - Anton can you assist me with adding roc to the CI servers? Is this something we simply do in the GH action scripts or is that better done on the actual server?

I would do it through the GH action script. On the main Roc repo, If the CI workflow requires the roc command, you execute cargo build --release --bin roc before the CI step that requires it, and next you can add the somedir/target/release/ folder to the PATH. If it's outside the main roc repo, you can curl and decompress the latest nightly, like here.

view this post on Zulip Anton (May 27 2024 at 19:06):

you just moved hello world back to help with CI

Yeah, that was the easiest way to fix it, but it does not need to stay there, a proper fix would take too long on vacation time :p


Last updated: Jul 06 2025 at 12:14 UTC