docs← Back to article

Markdown for LLMs

LDC-W2101 — A bare name the dependencies could supply

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

Download this articlePlain text ↗
# LDC-W2101 — A bare name the dependencies could supply

## What it means

Inside a facts group, a bare relation name with no qualifier and no local
declaration would once have failed as unknown. When exactly the
dependencies presented alongside the package export a public relation of
that name, the engine instead keeps the local meaning and warns: the
assertion stays yours, but a reader could easily believe it calls the
dependency's relation.

The fix is one qualifier: spell the dependency explicitly. A local
declaration of the same name does not clear the warning — the ambiguity is
about which relation a reader sees, and only the qualifier settles it.

## Example

```law
language "law.core" version "0.2";
package p.consumer version "0.1.0";
namespace "urn:p:consumer";

import p.dep version "0.1.0";

facts Local { assert shared(); }
```

```imports
[{"package": {"name": "p.dep", "version": "0.1.0", "namespace": "urn:p:dep", "semanticHash": "sha256:0"}, "contentHash": "sha256:0", "exports": ["shared"], "exportRelationParameterNames": {"shared": ["x"]}}]
```

## Fix

```law
language "law.core" version "0.2";
package p.consumer version "0.1.0";
namespace "urn:p:consumer";

import p.dep version "0.1.0";

facts Local { assert p.dep::shared(); }
```

## Engine message

The engine reports this in its own wording:

```text
example.law:7:22: warning LDC-W2101: bare relation name "shared" matches a dependency public relation ; local semantics is preserved. Candidates for explicit qualification: p.dep::shared
```

## Related

- [LDC-W1105](/diagnostics/LDC-W1105/) — a cross-package link the resolver never described.