Stream: bugs

Topic: `roc build` throws error "NOT END OF FILE"


view this post on Zulip Austin Davis (Jan 29 2025 at 23:28):

The full text of the error is below:

$ roc build
── NOT END OF FILE in .../Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk/main.roc ─

I expected to reach the end of the file, but got stuck here:

32  main_for_host! = |raw_args|

This occurred after upgrading the compiler version and basic-cli platform version and then running roc format --migrate

I have no idea what it means, but the language server is red-underlining a single character at a consistent arbitrary distance from the start of the file. If I delete text above the error error location, the error location remains at the same distance from the start of the file. The text it is pointing at seems to be completely irrelevant. The code will not compile at all in this state.

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:29):

This is saying your dependency is invalid

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:29):

It could definitely be more clear...

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:29):

Do you have packages in your header?

view this post on Zulip Austin Davis (Jan 29 2025 at 23:30):

Yes, but after removing them the same error is thrown

view this post on Zulip Austin Davis (Jan 29 2025 at 23:36):

I just created a new project with just a main.roc file with this code:

app [main!] { pf: platform "https://github.com/roc-lang/basic-cli/releases/download/0.19.0/Hj-J_zxz7V9YurCSTFcFdu6cQJie4guzsPMUi5kBYUk.tar.br" }

import pf.Stdout

main! = \_args ->
    Stdout.line! "Hello, World!"

And this throws the same error.

view this post on Zulip Austin Davis (Jan 29 2025 at 23:40):

I tried it again with the same (latest) compiler version and reverted the basic-cli package version to 0.18.0, and builds with no issues. Seems like the issue must be with the basic-cli version.

Here is the link to the working release:
https://github.com/roc-lang/basic-cli/releases/download/0.18.0/0APbwVN1_p1mJ96tXjaoiUCr8NBGamr8G8Ac_DrXR-o.tar.br

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:43):

https://github.com/roc-lang/basic-cli/releases/tag/0.19.0

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:44):

Try a more recent version of basic cli

view this post on Zulip Austin Davis (Jan 29 2025 at 23:45):

Sorry if I wasn't clear, but 0.19.0 is causing the build failure. 0.18.0 works for me.

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:45):

Which version of roc are you using? This one should be compatible with 0.19.0 https://github.com/roc-lang/roc/releases/tag/0.0.0-alpha2-rolling

view this post on Zulip Sam Mohr (Jan 29 2025 at 23:46):

We are right now releasing a whole lot of changes, we'll be finished in about 24 hours

view this post on Zulip Austin Davis (Jan 30 2025 at 00:03):

Hmmm, it's possible I messed up when upgrading and was using the old compiler version.

view this post on Zulip Anton (Jan 31 2025 at 09:46):

Your language server may have also been using an older version, in vscode there is a setting in the extension that points to the path of the roc_language_server binary.


Last updated: Jul 06 2025 at 12:14 UTC