docs← Back to article

Markdown for LLMs

LDC-E1340 — Expansion alias without a pin

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

Download this articlePlain text ↗
# LDC-E1340 — Expansion alias without a pin

## What it means

Reusable reasoning blocks — expansions — are pinned like dependencies:
the manifest declares an alias, and a separate pin context presents
the actual definition the alias resolves to. An instance that names a
manifest alias nobody presented has no definition to expand into, so
the compiler stops at the instance rather than expanding thin air.

The repair is to present the pin context the alias needs, or to drop
the instance and its manifest row together. A declared alias with no
presented definition is a promise the build cannot keep.

## Example

```run
{"argv": ["check", "$ROOT"], "files": {"law.toml": "[package]\nname = \"demo.diagnostics\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:law:demo:diagnostics\"\n\n[expansions]\noffence = { name = \"offence\", version = \"0.1.0\", path = \"defs\" }\n", "a.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nentity Organization;\n\nexpand offence Article1 {\n}\n"}, "expect": "LDC-E1340"}
```

## Fix

```run
{"argv": ["check", "$ROOT"], "files": {"law.toml": "[package]\nname = \"demo.diagnostics\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:law:demo:diagnostics\"\n", "a.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nentity Organization;\n"}, "expect": null}
```

## Engine message

The engine reports this in its own wording:

```text
$ROOT/a.law:7:8: error LDC-E1340: expand Article1: alias "offence" is declared by the manifest [expansions] section, but the pin context is not presented (§279.1.8: `--expansions`)
```

## Related

- [LDC-E1104](/diagnostics/LDC-E1104/) — an import the resolve context never presents.
- [LDC-E1109](/diagnostics/LDC-E1109/) — the manifest disagreeing about the package itself.