Migration guides¶
Each page lists the breaking changes in one release and what to change in your code when you upgrade to it. Read every page between the version you use and the one you move to.
- v0.1.6
- What a module imports no longer reaches the files that import it
- std/assert and std/random drop the module name from their functions
- A
hostordylibblock's functions are called with::only - Rebuild your .cdlb artifacts: the artifact format is now version 15
- Rebuild your .cdlb artifacts again: the artifact format is now version 16
std/convertand itsto_*methods are removedDefault::default()is removed; a struct literal ends in a bare..instead- A list of ints or floats passed to a C function sees what C writes into it
findis split:find(pred)searches with a predicate,index_of(x)finds a position- fs raises fs_directory_not_empty and fs_other for failures it had no kind for
- The file functions are the
std/fsmodule - A
defaultfunction in a struct'simplblock is now its default - An import binds the module's name instead of merging its names into scope
- The
is_*andas_*built-ins are replaced byisandas - The
json_parseandjson_stringifybuilt-ins are removed first,last,minandmaxon a list return anOptionlist.partition(sep)is renamedlist.split(sep)m.get_or(k, fallback)is removedm.get(k)returns anOptioninstead of the value- Map entries are written with
m[k] = v;insertis removed print(null)printsnull- A set is made with
set::Set<int>::new(); the module functionnewis removed str(x)is renamedstring(x)s.is_int()ands.is_float()are replaced bys.parse<T>()throwis a statement:throw "kind";- The string trim methods are renamed to
trim_start,trim_endandtrim_chars
- v0.1.5
- Returning an any from a function declared with another type checks the value
- A call has the type its function declares, not the type its body returns
- Rebuild your .cdlb artifacts: the artifact format is now version 14