Stream: ideas

Topic: Proposal: roc-lang/setup-roc stable & nightly roc


view this post on Zulip Luke Boswell (Sep 11 2026 at 02:26):

I've been working to replace python with roc for my scripts but I have a bootstrap problem. Here is my idea for the ideal solution, and I think it sets us up nicely also for a future with a 0.1 release. What do people think?

https://gist.github.com/lukewilliamboswell/1a16c7021d230aca0875d845fdface25

view this post on Zulip Richard Feldman (Sep 11 2026 at 02:36):

makes sense to me! :thumbs_up:

view this post on Zulip Luke Boswell (Sep 11 2026 at 02:49):

Thinking this through a little more, there are plenty of edge cases... I might fork setup-roc and iterate a little with that so I'm not messing with other people's or official roc repositories until its a little more mature.

view this post on Zulip Anton (Sep 11 2026 at 13:10):

A very logical evolution :+1:

view this post on Zulip Anton (Sep 11 2026 at 13:10):

I do wonder if the roc binary should be able to auto switch itself based on the version in the header :thinking:

view this post on Zulip Luke Boswell (Sep 11 2026 at 13:10):

:smile: I ended up making 3-4 more changes before I got something working ok

view this post on Zulip Anton (Sep 11 2026 at 13:11):

The general direction of the idea has probably stayed pretty similar?

view this post on Zulip Luke Boswell (Sep 11 2026 at 13:13):

This is the change here https://github.com/lukewilliamboswell/setup-roc/pull/1

I didn't really plan to amend the commits and force push ... so I dont have much of the history

view this post on Zulip Hannes (Sep 11 2026 at 13:46):

Hmm, why not let people run the setup action twice? Once with a version: 0.0.1 and then again with version: nightly? You'd also have to add an option add_to_path: false to avoid clashes

view this post on Zulip Anton (Sep 11 2026 at 14:16):

Hmm, why not let people run the setup action twice?

I thought this too, but you can't do this when your script is using stable roc and you are calling nightly roc from inside the script. If you build the script and then switch to nightly roc before running that could work but I am not sure if you can apply that type of fix for everything Luke had in mind.

view this post on Zulip Hannes (Sep 11 2026 at 15:56):

Maybe I'm misunderstanding, but as long as the two roc binaries are in different locations you could do something like pass the location of the nightly roc as an argument to the script?
Something like this:

view this post on Zulip Hannes (Sep 11 2026 at 16:00):

I just read through the PR that Luke shared, I think this is the relevant example, slightly simplified for space:

      - name: Setup stable and nightly Roc
        id: roc
        uses: ./
        with:
          version: stable-and-nightly

      - name: Verify dual installation
        run: |
          ${{ steps.roc.outputs.stable-executable }} version
          ${{ steps.roc.outputs.nightly-executable }} version

view this post on Zulip Hannes (Sep 11 2026 at 16:01):

And here's the alternative I'm suggesting

      - name: Setup stable Roc
        id: roc-stable
        uses: ./
        with:
          version: stable
          add_to_path: false

      - name: Setup nightly Roc
        id: roc-nightly
        uses: ./
        with:
          version: nightly
          add_to_path: false

      - name: Verify dual installation
        run: |
          ${{ steps.roc-stable.outputs.executable }} version
          ${{ steps.roc-nightly.outputs.executable }} version

view this post on Zulip Anton (Sep 11 2026 at 17:07):

you could do something like pass the location of the nightly roc as an argument to the script?

Yeah that sounds like a nice less complex option


Last updated: Sep 24 2026 at 15:59 UTC