Files and packages
- Source files use the
.aesextension and live underscripts/in the project. Any directory underscripts/is a package; files in one directory belong to one package. - The package path is
project.module + "/" + directory(mygame/player). Thepackageclause must equal the directory's base name (package player); a mismatch isAES4001. - A module path uses
[a-z0-9_/-]only, no dots: qualified names (mygame/player.State) are split on the last dot. importworks as in Go; there are no import aliases. Importing a package that is not underscripts/and not a host module isAES4002; cycles areAES4005. Unused imports are warnings.- Host modules (
aego/input,mygame/combat) and script packages share one namespace. A script directory whose package path equals a host module path isAES4010. Theaego/prefix is reserved for the standard library;module = "aego"is a project error. - Visibility follows Go: identifiers starting with an uppercase letter are exported from the package; everything else is package-private.
@exportis unrelated to visibility (see §8). *_test.aesfiles are compiled only byaego test.
A package that fails to compile keeps its last good build; its files are marked invalid and Play is blocked until they compile again.