Stream: beginners

Topic: Multiple roc.exe versions


view this post on Zulip Daren (Feb 26 2026 at 20:02):

Is it not possible to have multiple roc.exe versions concurrently on the same machine? I've pulled down the compiler source to tidy up some things I've noticed, and was trying to test my changes by running the downloaded nightly and then my local build. However, running the nightly causes a kernel panic. (Windows)

view this post on Zulip Luke Boswell (Feb 26 2026 at 20:20):

Which version do you have?

view this post on Zulip Luke Boswell (Feb 26 2026 at 20:20):

Are you building the Rust or Zig roc from source?

view this post on Zulip Daren (Feb 26 2026 at 20:21):

I'm building the new Zig-based compiler

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:41):

I'd be curious to know why the nightly causes a panic... but it may be hard to track down

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:41):

There shouldn't be any reason they interact -- different versions

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:42):

I wonder if our CI that is building the nightlies on Windows has something goofy going on... you may just be the first person to have tried the nightly :sweat_smile:

view this post on Zulip Daren (Feb 26 2026 at 21:47):

They are different executables, but the same "version" if that should matter.

❯ …\Projects\Roc\test ❯  cat .\main.roc
app [main!] { pf: platform "https://github.com/lukewilliamboswell/roc-platform-template-zig/releases/download/0.6/2BfGn4M9uWJNhDVeMghGeXNVDFijMfPsmmVeo6M4QjKX.tar.zst" }

import pf.Stdout

main! = |_args| {
    Stdout.line!("Hello, World!")
    Ok({})
}

❯ …\Projects\Roc\test ❯  D:\Projects\Roc-compiler\roc\zig-out\bin\roc
Hello, World!

❯ …\Projects\Roc\test ❯ E:\Roc\roc_nightly-windows_x86_64-2026-02-26-adbec1c\roc.exe
thread 7656 panic: integer does not fit in destination type
???:?:?: 0x7ff7eb988e4a in ??? (???)
???:?:?: 0x7ff7eb907a2b in ??? (???)
???:?:?: 0x7ff7eb76def0 in ??? (???)
???:?:?: 0x7ff7eb6c4357 in ??? (???)
???:?:?: 0x7ff7eb68aa26 in ??? (???)
???:?:?: 0x7ff7eb682098 in ??? (???)
???:?:?: 0x7ff7eb68136e in ??? (???)
???:?:?: 0x7ff7eb6810d5 in ??? (???)
???:?:?: 0x7ff7eb681043 in ??? (???)
???:?:?: 0x7ff7ebaa8448 in ??? (???)
???:?:?: 0x7ff7ebaaf33f in ??? (???)
???:?:?: 0x7ffc33ec7373 in ??? (KERNEL32.DLL)
???:?:?: 0x7ffc3589cc90 in ??? (ntdll.dll)

❯ …\Projects\Roc\test ❯ E:\Roc\roc_nightly-windows_x86_64-2026-02-26-adbec1c\roc.exe version
Roc compiler version debug-adbec1c9

❯ …\Projects\Roc\test ❯ D:\Projects\Roc-compiler\roc\zig-out\bin\roc version
Roc compiler version debug-adbec1c9

FWIW the nightly worked OK before I downloaded and built the source.

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:48):

oh if they are the same "version" its conceivable they are messing with each other's Roc cache

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:48):

You could try deleting the cache before running and see if that changes anything.

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:49):

I'm not 100% on where that is on Windows... give me 1 sec

view this post on Zulip Daren (Feb 26 2026 at 21:49):

I did wonder about that, as I've noticed

❯  dir C:\Users\cobal\AppData\Roaming\Roc

        Directory: C:\Users\cobal\AppData\Roaming\Roc


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----        26/02/2026     20:12                  debug-adbec1c9

view this post on Zulip Daren (Feb 26 2026 at 21:49):

You're right, it works fine when I delete that

view this post on Zulip Daren (Feb 26 2026 at 21:50):

And then the locally compiled one doesn't work, but it doesn't panic just errors out, So if I want to run different builds locally I need to fiddle with a version number somewhere I guess

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:51):

The version comes from the git sha. But when you build from source it must be something like Debug verse ReleaseSafe or something like that maybe

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:52):

Two different versions should use different cache's so that's fine... but if you are building from source and using a nightly I'm not sure we should worry about that too much, I would just recommend you pick one and stick with it

view this post on Zulip Daren (Feb 26 2026 at 21:52):

Yeah, that's fine. I was just trying to compare nightly to my local version as I was making some changes I wanted to test

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:53):

This does suggest there is a deeper bug somewhere with our serialization of modules in the cache I think... but that's pretty deep into the compiler internals

view this post on Zulip Luke Boswell (Feb 26 2026 at 21:54):

If you commit you changes you will get a different version hash and use a different cache, so then you can compare ok I think

view this post on Zulip Daren (Feb 26 2026 at 21:55):

Ah good tip. I was trying to test before committing anything

view this post on Zulip Daren (Feb 26 2026 at 21:57):

I must say though, that the process of downloading and building Roc from source was buttery smooth compared to some things I've built myself in the past. Not in the least bit scary (all I had to do was work out why I kept getting the wrong version of Zig - turned out I'd installed it in three different places at various times, and completely forgot about the winget one that was first in my path)

view this post on Zulip Luke Boswell (Feb 26 2026 at 22:00):

Yeah it's really nice working with Zig. We learnt a lot from building the Rust version, and put a lot of lessons into making the Zig one a lot nicer.

view this post on Zulip Luke Boswell (Feb 26 2026 at 22:01):

I think the Zig guys have done an excellent job with their tooling


Last updated: Mar 20 2026 at 12:28 UTC