Home / Docs / Configure a package

una migrate

What it does

una migrate moves a package from una.toml and verification.lock, of any edition from 0.1, to ita.una and ita.lock of edition 0.4. Every table becomes its section, grants become their lines, and comments are carried above the line they precede. It then checks the package in edition 0.4, and prints every diagnostic the change of edition causes, with its repairs. It applies none of them: una fix does that.

Edition 0.4 is written only in ita.una. A una.toml that names it is U7002, with una migrate as its repair:

una.tomltoml
[package]
name = "shop"
version = "0.1.0"
edition = "0.4"
src/shop.unauna
-- fails with U7002
module shop

pub one() -> Int = 1

After una migrate, the same package is:

ita.unauna
ita shop
  version 0.1.0
  edition 0.4
src/shop.unauna
module shop

pub one() -> Int = 1

Forms

text
una migrate [path] [--dry-run] [--name <name>] [--json]

Examples

Terminal
$ una migrate
wrote ita.una, ita.lock; removed una.toml, verification.lock
name: events-example -> events_example
edition 0.2 -> 0.4: 1 diagnostic
una.toml ita.una
[package] name, version, edition ita <name>, version, edition 0.4
[labels] categories labels, one per line
[trusted] modules trusted
[escape_budget] checked_per_module escapes, checked per module <n>
[boundaries], [contracts] boundaries, contracts
[run] entry, grants run, entry, grants, one line per grant
verification.lock the solver section of ita.lock

Edge cases

Diagnostics

Edition

From editions 0.1 to 0.3, and a una.toml that names 0.4, to edition 0.4.

Normative source