roc goes through setupSharedMemoryWithModuleEnv and explicitly compiles sibling modules before app canonicalization, based on imports extracted from the app AST./home/nandi/code/roc/src/cli/main.zig (see the section starting with “Compile sibling .roc files BEFORE app canonicalization.”)roc build uses compileAndSerializeModulesForEmbedding, which only compiles platform modules + app, and does not compile app sibling modules./home/nandi/code/roc/src/cli/main.zig inside compileAndSerializeModulesForEmbedding.Is this a question or bug report?
Have you observed some behaviour that isn't right?
Is it a bug that roc build doesnt compile sibling modules?
I don't understand what you mean by doesn't compile sibling modules.
Like if I have an app, with an import Foo in it -- you can't use Foo with roc build app.roc but you can with roc app.roc?
It has to be in platform folder in roc build
Which kinda breaks for modules that aren't in platforms
I've reproduced this... should be able to fix it soon
ok fixed it... but going to take a side quest to refactor things and hopefully eliminate this kind of bug from happening again
what do you mean "this kind of bug"?
Where there are different code paths roc check roc test roc build etc doing the same thing in different ways
Just refactor the common parts into helpers and keep things DRY
I had noticed some different behavior with roc build that was unexpected but assumed I was Doing It Wrong. i think i hit this, though
https://github.com/roc-lang/roc/pull/9072
Last updated: Feb 20 2026 at 12:27 UTC