Stream: beginners

Topic: Opaque error message when in `roc build --bundle <bundle>`


view this post on Zulip Ian McLerran (Jan 24 2025 at 01:35):

I just encountered an error message when trying to do a bundle on a package: The package tests fine, and examples using the package run without issue (0 failed and 381 passed). However, when I run roc build --bundle .tar.br (or any other zip format), I encounter the following error message:

Error: Custom { kind: NotFound, error: Error { depth: 0, inner: Io { path: Some(""), err: Os { code: 2, kind: NotFound, message: "No such file or directory" } } } }

For reference, I am on roc version:
roc built from commit 36aa6f0883, committed at 2025-01-23 16:58:12 UTC

view this post on Zulip Ian McLerran (Jan 24 2025 at 01:40):

Okay, I was able to determine the cause of the error message - its pretty simple. I didn't pass the file name into build. However the error message could be much better.

view this post on Zulip Ian McLerran (Jan 24 2025 at 01:40):

I expected build to behave the same when bundling a package as building an app, and look for main.roc in the CWD, however apparently this is not the case when bundling. A simple error message indicating proper usage would be very helpful here.

view this post on Zulip Sam Mohr (Jan 24 2025 at 01:41):

Agreed, would love a better error message!

view this post on Zulip Sam Mohr (Jan 24 2025 at 01:41):

Could you make an issue on github for this with a commit hash and a repro?

view this post on Zulip Ian McLerran (Jan 24 2025 at 01:42):

Commit hash for my roc version?

view this post on Zulip Sam Mohr (Jan 24 2025 at 01:42):

Yeah


Last updated: Jul 06 2025 at 12:14 UTC