hey folks, just checking in on the state of projects with multiple files. It seems roc check
still crashes on a simple multi-file projects, which means the LSP also doesn't work (see: https://gist.github.com/drewolson/358b196935083982d982339e672c7474). are others struggling with these same problems?
Intriguing. I definitely have seen it work with multiple files
So would require more debugging to know why that doesn't work
Must be something more specific than just multifile
hmm, interesting. this is the simplest multi file project i could come up with
as it is literally just two files, one main
and one with an add
function.
i wonder if removing the type annotation on add or changing it from using Int _ to using Int * (or Int a) would help
fails with all of these as well
Int *
doesn't actually compile :slight_smile:
but no type annotation has the same error
wait it's just with Check
yes
and not when you build?
yes
which means the LSP also doesn't work
that's extra strange since check is a subset of the build pipeline
agreed. i think this same bug has been here for at least a year, but i don't know why i'm the only one experiencing it
what's the version you have?
i just pulled the rolling nightly
and what platform etc?
$ roc --version
roc nightly pre-release, built from commit c47a8e9cdac on Sat Mar 22 09:14:20 UTC 2025
i followed the install directions
see the gist above
i have never experienced this and i did all of AOC last winter in Roc
latest CLI platform
Anthony Bullard said:
i have never experienced this and i did all of AOC last winter in Roc
interesting, that's good to hear
can you reproduce this with the gist i shared?
oh you are checking a single file that's a module
hmmm
yep
i'm trying to think if i ever would have done that
semantic analysis requires an entire project. whether that's a package, a platform, or an app
i fixed a similar bug with apps that had a package dependency
i've been so deep in the compiler rewrite i've unfortunately not had the chance to write much of any Roc in the past 3-4 months
ironic, I know
np, i figured that is often the case!
can you try adding --main main.roc
to your check command before Foo.roc?
so, roc check --main main.roc Foo.roc
same error
ok it looks like we have an issue here where the derived module is still locked because main is referencing it
Maybe @Anton can take a look into this when he comes on next. the load system is rather complicated to debug and i'm on my phone
i think we need main to not be queued for processing
if we don't reference a package or platform
Sorry that this important issue did not get solved for so long @drew!
I may be close to solving #compiler development > slow build with lots of `?` and will take a look after that.
and will take a look after that.
I could not resist, fix coming in :airplane_arrival:
Gemini 2.5 pro was able to fix the bug given some debug logs, I'm pretty impressed, this requires real understanding.
would love to see that PR!
mainly to see if my high level diagnosis was correct
@drew tomorrow's nightly will contain fixed binaries for roc and roc_language_server
Gemini 2.5 pro was able to fix the bug given some debug logs, I'm pretty impressed, this requires real understanding.
The file with the bug(file.rs) is nearly 7000 lines too :p
Approved @Anton but there is a check failure
Anton said:
and will take a look after that.
I could not resist, fix coming in :airplane_arrival:
Gemini 2.5 pro was able to fix the bug given some debug logs, I'm pretty impressed, this requires real understanding.
how did you interface with gemini to fix the bug? aider? something else?
Raw :p through aistudio.google.com share link
I like to have full control over the messages, no prompt pollution from middle men
timely — https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/
drew said:
timely — https://blog.google/technology/developers/introducing-gemini-cli-open-source-ai-agent/
This quote from the blog sent me:
That free license gets you access to Gemini 2.5 Pro and its massive 1 million token context window. To ensure you rarely, if ever, hit a limit during this preview, we offer the industry’s largest allowance: 60 model requests per minute and 1,000 requests per day at no charge.
60 requests per MINUTE on 2.5 pro free-of-charge???
indeed
Google may have just looped me back in, and that is something I would probably put on my machine (after some inspection of the source, of course)
Now I just gotta get code assist working in Neovim
i think the point of the cli is it is editor independent like claude code
Yeah, but i'll have to check the tools it has to see if I can have it access the open files and projects in my editors
Anthony Bullard said:
Approved Anton but there is a check failure
@drew it's possible that the change causes issues on some machines, so it's not going to be in tomorrow's nightly yet. I need to investigate some more.
Problem resolved, fix will be in tomorrow's nightly
do i get access to this buy downloading the alpha3-rolling
binary from github?
(tomorrow, that is :slight_smile:)
No, there have been breaking changes since alpha3, you can get the nightly here in less than an hour probably https://github.com/roc-lang/roc/releases/tag/nightly
Fresh nightlies are up :)
drew:~/code/hello-roc (main)$ roc main.roc
3
Hello, World!
drew:~/code/hello-roc (main)$ roc check Foo.roc
0 errors and 0 warnings found in 20 ms.
it's working!
thanks
confirmed the language server also now works
Last updated: Jul 06 2025 at 12:14 UTC