docs← Back to article

Markdown for LLMs

LDC-E1108 — Files disagreeing about the package

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E1108 — Files disagreeing about the package

## What it means

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.

## Example

```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"}
```

## Fix

```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}
```

## Engine message

The engine reports this in its own wording:

```text
$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)
```

## Related

- [LDC-E1109](/diagnostics/LDC-E1109/) — the manifest disagreeing with the same header.
- [LDC-E1116](/diagnostics/LDC-E1116/) — declaring cross-file references inside one package.