docs← Back to article

Markdown for LLMs

LDC-E1104 — Import without a presented dependency

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

Download this articlePlain text ↗
# LDC-E1104 — Import without a presented dependency

## What it means

A source file may declare dependencies, but the bytes behind those
dependencies travel separately: the resolve context presents exactly
which releases the build sees. When the file imports a package the
context never presented, the compiler cannot tell what the import
names, so it stops at the import line rather than lowering against a
closure that was never there.

The repair is to present the missing dependency in the resolve context,
or to import only what the context presents. An import that names a
package nobody presented is a claim about the build the build itself
cannot confirm.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

import dep.other version "0.1.0";

entity A;
```

```imports
[{"package": {"name": "dep.shapes", "version": "0.1.0", "namespace": "urn:law:dep:shapes", "semanticHash": "sha256:0"}, "contentHash": "sha256:0"}]
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

import dep.shapes version "0.1.0";

entity A;
```

## Engine message

The engine reports this in its own wording:

```text
example.law:5:1: error LDC-E1104: dependency "dep.other" is import-declared but not presented by the resolve context (§11: dependency bytes are pinned in law.lock; `lawc lower <file> --imports <context.json>`)
```

## Related

- [LDC-E1110](/diagnostics/LDC-E1110/) — naming a version the presented dependency does not carry.
- [LDC-E1302](/diagnostics/LDC-E1302/) — the mirror: a presented dependency the file never imports.