Skip to content
docs
Arxo ↗

LDC-E1108 — Files disagreeing about the package

For LLMs5 sections

Every file in a package carries the same header: the same language line, the same package name and version, the same namespace. The first file sets it; any later file that names something else splits the package in two on paper while the tooling reads one directory. The compiler stops at the diverging header line.

The repair is to spell the header identically in all files. When two halves genuinely disagree, one of them belongs to another package — move the file, not the header.

run
{"argv": ["check", "$ROOT"], "files": {"a.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nentity A;\n", "b.law": "language \"law.core\" version \"0.2\";\npackage demo.other version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nentity B;\n"}, "expect": "LDC-E1108"}
run
{"argv": ["check", "$ROOT"], "files": {"a.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nentity A;\n", "b.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nentity B;\n"}, "expect": null}

The engine reports this in its own wording:

Output
$ROOT/b.law:2:1: error LDC-E1108: package "demo.other version 0.1.0" diverges from package "demo.diagnostics version 0.1.0" declared earlier in this package (§22: files of one package carry a single header and form a single namespace tree)

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.