---
title: "U7009: Missing, invalid or inconsistent `ita.lock`"
url: https://una-lang.org/en/docs/errors/U7009/
release: v0.4.0
source: https://github.com/una-lang/una/blob/v0.4.0/crates/una-explain/explain/U7009.md
---

# U7009: Missing, invalid or inconsistent `ita.lock`

The `ita.lock` of a package is missing, invalid or does not meet `ita.una`.

## Why Una rejects it

A package of edition `0.4` commits `ita.lock` next to its `ita.una` (ADR 0122, `spec/30`). Only `una ita` and `una migrate` write it. It pins the solver, as `verification.lock` does for earlier editions, and, for every package of the program, its version, origin and content digest. Every command that loads the package reads it offline.

U7009 reports:

- a missing lock, at the start of `ita.una`;
- a lock with a syntax error, an unknown or misplaced line, or a value it does not support; and
- a lock that does not meet `ita.una`, such as a need with no locked package.

## How to fix it

The repair is `una ita lock`, which writes the lock again.

## Failing example

`ita.una`

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

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