Troubleshooting & Reinstall

Most Rasmalai problems fall into three buckets, and you should work them in this order: a diagnostic you can read, a stale project, or a stale toolchain. Nine times out of ten you never reach step three.

Read the diagnostic first

Every compiler error carries a code. Run the checker on your project to see it with a span pointing at the exact column:

sh
rnx check

Then ask the toolchain what the code means:

sh
rnx explain E108

The explanation names the cause and the fix. The full directory of codes lives in the Language Manual. If a message looks wrong (a span pointing nowhere, a code with no entry), that is a compiler bug: skip to filing an issue and paste the output verbatim.

When output looks suspiciously terse, rerun with the pipeline log turned on:

sh
rnx -v check

Verbose mode prints each pass as it runs, which tells you whether the failure is in parsing, typechecking, or code generation.

A healthy program to compare against. If this checks clean but your project does not, the problem is in your project, not the toolchain:

.rnx
let total = [10, 20, 30].reduce(0, (acc, n) => acc + n);
assert(total == 60, "sum");

Fix the project before the toolchain

Three commands resolve most project-level breakage. Run them in this order:

sh
rnx fmt
rnx check
rnx test

rnx fmt normalizes layout so you stop chasing whitespace ghosts. rnx check revalidates in milliseconds. rnx test reruns the suite so you know the fix did not move the failure elsewhere.

Dependencies went stale. A fetch that worked yesterday fails today, or a type from a git dependency suddenly mismatches. Dependencies resolve into Project.deplock; when the lockfile disagrees with the manifests, re-resolve from scratch:

sh
rm Project.deplock
rnx fetch
rnx check

The standard library cache went stale. An @std/* import fails with the registry named, or rnx doctor reports missing packages. The binary carries no library sources, so everything @std/* comes from the global cache (~/.cache/rnx, or $RNX_CACHE_HOME when set). Check it, then repair it:

sh
rnx doctor
rnx doctor --repair-std

rnx download re-seeds the same cache from scratch: that is also the recovery when you installed while offline.

The editor disagrees with the terminal. Stale squiggles, completions from another era. The language server is almost always holding onto a closed project. Restart it through the setup command rather than reinstalling anything:

sh
rnx setup

The editor setup chapter covers per-editor details.

Reinstall the toolchain cleanly

Reach for this when rnx --version itself fails, when the binary predates the error you are seeing, or when support asks you to rule out a corrupted install. The procedure is the same on every OS: remove the old install, then install fresh. Uninstallation is step one of a reinstall.

First, confirm what you have. On Linux and macOS:

sh
rnx --version
which rnx

On Windows PowerShell:

powershell
rnx --version
Get-Command rnx

Linux

Remove the old toolchain (default locations; adjust if you passed --prefix at install time):

sh
rm -rf ~/.local/bin/rnx ~/.local/bin/rnx.bin ~/.local/bin/rnx.exe ~/.local/lib

Then reinstall:

sh
curl -fsSL https://rasmalai.rovelstars.com/install.sh | sh

The installer honors $XDG_BIN_HOME when it is set, otherwise it uses ~/.local. To put it elsewhere:

sh
curl -fsSL https://rasmalai.rovelstars.com/install.sh | sh -s -- --prefix /usr/local

macOS

Same layout as Linux. ~/.local is the conventional home for CLI tools outside the App Store, and $XDG_BIN_HOME is honored the same way. Rasmalai ships Apple Silicon builds only; on Intel Macs, run the toolchain under Rosetta 2.

sh
rm -rf ~/.local/bin/rnx ~/.local/bin/rnx.bin ~/.local/lib
curl -fsSL https://rasmalai.rovelstars.com/install.sh | sh

Windows

If you installed with the PowerShell installer (default %LOCALAPPDATA%\rnx), remove that directory and drop its bin from the user PATH:

powershell
Remove-Item $env:LOCALAPPDATA\rnx -Recurse -Force

Then open Settings → System → About → Advanced system settings → Environment Variables, edit the user Path, and delete the ...\rnx\bin entry. Then reinstall in a fresh terminal:

powershell
irm https://rasmalai.rovelstars.com/install.ps1 | iex

If you installed under Git Bash or MSYS2 instead, remove the Unix-side prefix and rerun the shell installer:

sh
rm -rf ~/.local/bin/rnx* ~/.local/lib
curl -fsSL https://rasmalai.rovelstars.com/install.sh | sh

After any reinstall, verify in a new terminal (new, so PATH changes take effect):

sh
rnx --version

Filing an issue

If the steps above did not fix it, file it. A clean repro against the latest toolchain is exactly what maintainers need. Include all four:

  1. The full rnx --version output, every line. It carries the commit hash, install kind, executable path, standard library source, and target triple.
  2. Your OS and CPU (uname -sm, or $PSVersionTable on Windows).
  3. The smallest source file that still fails.
  4. The full command and its complete output (with rnx -v if it is a compiler crash).

Open the issue at github.com/rovelstars/rasmalai. Reproducible reports get fixed first; "it broke" with no version gets asked for a version.