RaggieScript v1.3.0
Browse Table of Contents (17 chapters)
Getting Started (2)
Language Reference (4)
Core Standard Library (3)
Windows, MSI SQL & Native FFI (3)
Wizard UI & Studio Sandboxes (3)
Diagnostics & Bytecode ISA (2)
Master Symbol Index
3 min read Module: raggiesoft.raggiescript F1: IDH_RSSC_DIAGNOSTICS (0x200F)

Compiler & Verifier Diagnostics Reference (RSW700 – RSW715)

Every diagnostic emitted by raggiescript.exe check, raggiescript.exe lsp, instbuild.exe, and RaggieScript.Core carries a stable RSW7xx code, 1-based (line, column) coordinates, and actionable fix guidance.

Summary Table of All RaggieScript Diagnostics

CodeCategoryPhaseSummary
RSW700Lexical / Syntax / PreprocessorParseUnterminated string/comment, unexpected token, missing ; / }, or cyclic include.
RSW701Wizard Phase IsolationBinderMutating call (fs.write*, reg.write*, msi.install, svc.*, etc.) reached directly or transitively inside wizard { ... }.
RSW702Capability Sandbox ViolationBinderSandboxed Studio profile (use training;, use a11y;, use localization;, use document;) attempted host OS/FS/Registry/Network access.
RSW704Bytecode & SHA-256 IntegrityLoaderInvalid RSWBC2/RSWBC1 magic header, truncated stream, or 32-byte SHA-256 tamper mismatch!
RSW710Undeclared IdentifierType BinderVariable, ref target, or function name is not in scope (includes Levenshtein "Did you mean '...'?" hint).
RSW711Static Type MismatchType BinderIncompatible initializer, assignment, struct field type, match arm pattern, or return value type.
RSW712Call Arity or Unknown MethodType BinderUnknown ns.method() (with fuzzy suggestion) or wrong argument count/type passed to a function.
RSW713Immutability ViolationType Binder / VMReassigning a const binding, passing a const variable as ref, or mutating a CLI hard-locked KEY:VALUE parameter.
RSW714Unknown struct Field or enum VariantType BinderTypo in MyStruct { badField: 1 } or MyEnum.BadVariant (includes fuzzy field/variant suggestion).
RSW715Control-Flow ViolationType BinderNon-void typed fn missing a return along a code path, or break; / continue; outside a loop.

Detailed Diagnostic Guides & Fixes

RSW701 — Wizard Phase Isolation Violation

Why it happens: wizard { ... } (and any helper fn called from wizard) must remain 100% read-only so canceling the wizard leaves zero trace on the PC and Uac.Deferred can run the wizard un-elevated.

// FAILS WITH RSW701:
wizard {
    step Welcome {
        reg.writeString(Hive.HKCU, r"Software\App", "VisitedWizard", "1"); // <-- RSW701!
    }
}

// FIX: Bind a 'param' in wizard, and write to the Registry inside 'install { ... }'!
param optedIn: bool = true;
wizard {
    step Welcome { ui.checkbox(text: "Save preference", bind: ref optedIn); }
}
install {
    if (optedIn) { reg.writeString(Hive.HKCU, r"Software\App", "OptedIn", "1"); }
}

RSW702 — Capability Sandbox Violation

Why it happens: Scripts running inside SCORM web courses (use training;) or compliance linters (use a11y;) are isolated from host OS I/O. Remove fs.*/reg.*/net.* calls or switch to use installer; for native setup tools.

RSW704 — Bytecode SHA-256 Tamper Rejection

Why it happens: Every compiled .rswbc file and #225 PE resource embeds a 32-byte bcrypt.dll SHA-256 digest over the entire constant pool and instruction stream. Any single flipped bit halts LoadRaggieScriptBytecode before a single instruction executes.

RSW710 & RSW714 — Undeclared Symbol / Unknown Field (Fuzzy Suggestions)

param installDir: path = sys.programFiles / "Demo";
install {
    fs.mkdir(instalDir);
    // -> [RSW710] Undeclared identifier 'instalDir'. Did you mean 'installDir'?
}

RSW711, RSW712, RSW713 & RSW715 — Type, Arity, const & Return Checks

const lockedPort: int = 8443;
// ui.textBox(label: "Port:", bind: ref lockedPort);
// -> [RSW713] Cannot pass immutable 'const' binding 'lockedPort' by 'ref'. Use 'param' or 'let'!

fn computePort(useTls: bool) : int {
    if (useTls) { return 443; }
    // -> [RSW715] Function 'computePort()' declares return type 'int' but not all control paths return a value.
    return 8080;
}
Indexed API Calls & Symbols on This Page (10):