Editions
Also known as: edition version compatibility breaking change backwards compatible upgrade migrate stability 2026
● Intermediate2 minBefore this: SettingsSpec 10.8
Code that compiles today keeps compiling. A change that would break old code comes in a new edition, which each package chooses.
A package names its edition in kavach.toml. kavach new writes the newest one:
edition = "2026"- Packages on different editions work together in one program.
- Editions come out rarely, every few years, and only with a tool that upgrades code to the new one.
2026is the first and, so far, the only edition.
An edition Kavach doesn't have is an error that names the ones it has:
[package]
name = "shop"
edition = "2062"The compiler refused the program:
error: Kavach has no edition `2062`: its editions are `2026` (spec 10.8)