Home / Learn / 19 Editions

Release v0.4.0Edition 0.1, 0.2, 0.3, 0.4

19.10 Recap and reference

Page 11 of 11

19.10.1 For agents

A construct of a later edition usually gives U0101 or U0103 at the construct, a table of a later edition U7002 at una.toml, edition = "0.4" in una.toml U7002 with una migrate as its repair, and a later prelude function or type rule a type error, such as U1001, U2001 or U2002. To move a package, change only edition, run una --json check ., apply una fix ., and repair the rest by hand; to move it to 0.4, run una migrate . instead of editing the line, then the same loop. Never edit ita.lock by hand. Never apply a U0103 rename to edit, take or together used as a keyword: change the edition instead. A U0101 at a word the new edition made a keyword needs a rename by hand. In edition 0.3, the test declaration is test; an example there is U0103, which una fix . rewrites. The compact rule: an edition is a line of the manifest, una.toml or, from 0.4, ita.una; a later edition adds constructs and, with few exceptions, tightens rules.

19.10.2 Recap

  • [package] edition names a package's edition, and is required. A single file has edition 0.1.
  • Upgrading una keeps what each stable edition accepts and rejects, except to fix a soundness or security error.
  • Editions 0.1 to 0.4 are cumulative: each adds constructs, keywords and rules, and removes no construct of the one before.
  • 0.2 adds loops, let edit, edit and take, together, maps, JSON and more, makes old a keyword, and reserves weak.
  • 0.3 is a preview: conditions on operations, locked contracts, boundaries, narrowed rebindings, units, refined type arguments, no dead failure handling, and tests written test. It may get stricter in a later release.
  • To move a package: change the edition, una check ., una fix ., repair the rest, una test ., and compare the output.
  • 0.4 is a preview whose package is described by ita.una and pinned by ita.lock: una migrate writes both, rewrites the modules in its canonical form, and prints what the new edition reads differently. A later release may change it, never in silence.
  • Never let una fix rename a keyword of a later edition; change the edition instead.

19.10.3 Reference

Next:Documentation