---
title: "U7011: A locked package that is neither in the vendor directory nor in Itaoca"
url: https://una-lang.org/en/docs/errors/U7011/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U7011.md
---

# U7011: A locked package that is neither in the vendor directory nor in Itaoca

U7011 reports a locked package that is neither in the vendor directory nor in Itaoca, or whose provenance at the lock's resolution point Itaoca does not hold. The need is not mounted, so the package's modules cannot import it.

## Why Una rejects it

A package of edition `0.4` builds from what its lock pins, with no network (ADR 0122, `spec/30`). Every command that loads the package looks for each locked registry package in the vendor directory of the root, `vendor/ita/<source>/`, and then in Itaoca, the store of fetched packages under `~/.una/itaoca` or the directory `UNA_ITAOCA` names. No command but `una ita` ever reads a registry.

## How to fix it

- The repair is `una ita fetch`, which reads the release from the first of the source's places whose copy verifies, the mirrors Itaoca's `mirrors.una` lists then its own URL, verifies it and stores it in Itaoca. This release has no https transport, so only a mirror directory listed as a `file://` URL is read.
- Then, to build anywhere with `una` alone, `una ita vendor`, which copies it with its provenance into the vendor directory to commit with the lock.

A self-contained example cannot carry a registry's signed files, so the fixed example shows the package once the dependency is no longer needed.

## The repair at a glance

`ita.una`

```diff
  ita demo
    version 0.1.0
    edition 0.4
-
- sources
-   acme "https://ita.acme.example"
-     root "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"
-     owners acme
-
- needs
-   acme/ledger 0.3 from acme
```

`ita.lock`

```diff
  -- Written by `una ita`; do not edit.
  lock 1

  solver
    encoding "una-smt-1"
    name "z3"
    version "5.1.0"
    logic "QF_UFLIA"
    steps 5000000
    seed 0
-
- registry acme
-   root "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"
-   checkpoint 2 "sha256:0b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c11"
-   last root 1 "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"
-
- package acme/ledger 0.3.1
-   from acme
-   digest "sha256:3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c"
-   signed "ed25519:acme:7c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d2"
-   logged 1
```

## Failing example

`ita.una`

```una
ita demo
  version 0.1.0
  edition 0.4

sources
  acme "https://ita.acme.example"
    root "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"
    owners acme

needs
  acme/ledger 0.3 from acme
```

`ita.lock`

```una
-- Written by `una ita`; do not edit.
lock 1

solver
  encoding "una-smt-1"
  name "z3"
  version "5.1.0"
  logic "QF_UFLIA"
  steps 5000000
  seed 0

registry acme
  root "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"
  checkpoint 2 "sha256:0b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c110b7e3c11"
  last root 1 "sha256:5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a5e0d1b7a"

package acme/ledger 0.3.1
  from acme
  digest "sha256:3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c3b1f8e0c"
  signed "ed25519:acme:7c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d27c0a91d2"
  logged 1
```

`src/demo.una`

```una
module demo

pub one() -> Int = 1
```

## Fixed example

`ita.una`

```una
ita demo
  version 0.1.0
  edition 0.4
```

`ita.lock`

```una
-- Written by `una ita`; do not edit.
lock 1

solver
  encoding "una-smt-1"
  name "z3"
  version "5.1.0"
  logic "QF_UFLIA"
  steps 5000000
  seed 0
```

`src/demo.una`

```una
module demo

pub one() -> Int = 1
```
