scrml.dev v0.7.1
Reference › Errors

W-PROGRAM-001

No <program> root element found.

Warning Compile-time SPEC §4.12.2 (normative)

What it means

<program> is where a file declares database connections, protection settings and HTML spec version. A file with none still compiles — the defaults apply — but has no place to put that configuration, so the compiler nudges. Two shapes are recognised and stay silent: a pure module file (no markup nodes at all) and a non-entry page file (declares a <page> at file scope), because in a multi-page app the <program> is declared once in the entry file.

Minimal reproducer

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

<h1>no program root</h1>
<p>plain markup only</p>

How to fix

  1. Wrap the content in <program>. Correct for an entry file that needs configuration.
  2. Ignore it for a page or module file. If the file declares a <page> or contains no markup, this lint should not be firing — see the suppression rules above.

Related

Specification

Normative text: §4.12.2, §4.12.8, §4.12.9, §34. Spec lives at compiler/SPEC.md .

← Reference