ww source: align UTF-8 BOM placement

This commit is contained in:
2026-08-21 20:34:10 +09:00
parent ee4573bf55
commit 9381f8fb8e
11 changed files with 764 additions and 5 deletions

View File

@@ -415,6 +415,20 @@ generation. The directory command retains its existing attributable final
diagnostic. This ordering state is per source and never package, import,
variant, action, artifact, publication, or persistence identity.
Every eligible source also owns an independent source-start position. An exact
UTF-8 BOM (`EF BB BF`) at byte offset zero is ignored before package-clause and
import parsing, so production, same-package, external-package, and test-only
sources all count the marker's three bytes and begin the following token at
logical line 1 column 4. The same code point anywhere else,
including a comment or literal, is a source error before variant actions,
generated main, producers, test runtime, accounting, or retained publication.
The shared coordinator applies the offset-zero rule while classifying package
clauses; the selected stage driver scans the complete source and preserves the
per-file rule while composing package units. Wrong-target files remain excluded
before either operation. The marker is source representation only and never
package/import/action/artifact/publication/persistence identity; no test result
is cached.
After that eligibility boundary and the coordinator's required package-clause
classification and production `@test` validation parses, the delegated loader
performs selected-basename Go 1.26.5 simple-fold preflight before its graph