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
makes sense to me! :thumbs_up:
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.
A very logical evolution :+1:
I do wonder if the roc binary should be able to auto switch itself based on the version in the header :thinking:
:smile: I ended up making 3-4 more changes before I got something working ok
The general direction of the idea has probably stayed pretty similar?
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
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
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.
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:
~/roc-stable~/roc-nightlyroc-stable: ~/roc-stable build script.rocscript --roc=~/roc-nightly ...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
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
you could do something like pass the location of the nightly
rocas an argument to the script?
Yeah that sounds like a nice less complex option
Last updated: Sep 24 2026 at 15:59 UTC