scrml.dev v0.7.1
Reference › Errors

W-PROGRAM-SPA-INFERRED

The compiler inferred single-page-application shape from the filesystem.

Warning Compile-time SPEC §40.8 (normative)

This lint fires on a correct single-file app, so it appears in the reproducer output for many other codes on this site. That is expected, not a second defect.

What it means

Three signals together mean SPA: the entry file declares a top-level <program>, that body contains zero <page> siblings, and no pages/ directory exists at the project root. The lint states the inference out loud so a multi-page app that is accidentally compiling as an SPA — usually a missing or misplaced pages/ directory — is caught immediately rather than at deploy.

Minimal reproducer

This is the exact source compiled against the linked compiler and verified to produce W-PROGRAM-SPA-INFERRED.

<program title="p">
    <count> = 0
    <p>${@count}</p>
</>

How to fix

  1. Nothing, if SPA is the intent. This lint is informational. A genuine single-page app should expect it on every build.
  2. Add pages/ or <page> siblings for a multi-page app. The inference flips as soon as either signal is present.

Related

Specification

Normative text: §40.8, §40.8.1, §34. Spec lives at compiler/SPEC.md .

← Reference