What it means. Two or more .gala files in the same directory declare different package names. Test files (_test.gala) may diverge, following Go’s pkg_test convention; regular sources may not.
lib/a.gala // package mylib
lib/b.gala // package other <- triggers the error
error[GALA-E0010]: directory lib has files with different package names: "other" and "mylib"
--> lib/b.gala:1:1
|
1 | package other
| ^^^^^^^ use the same package name across all sibling .gala files, or…
|
= hint: use the same package name across all sibling .gala files, or move the file to a different directory
The header names the directory and both package names it found; the frame points at the file being compiled.
Either rename one package so both files agree:
// lib/b.gala
package mylib
…or move the outlier into its own directory, where it can keep its own package name.
GALA’s sibling-file resolution treats every .gala file in a directory as part of one compilation unit, so conflicting package names break cross-file type resolution. Catching the mismatch in the analyzer is much cheaper than letting it surface as a cascade of “unresolved identifier” errors during transform.
gala.mod, and package layout