OxL Reference

error config-type

error Standard: [§14.1]

What it means#

A config is filled from text: command-line flags (--set App.port=8080), environment variables, config/<profile>.toml (§14.1). Every field must therefore have a type with a textual form: numbers, bool, char, str, Duration ("250ms", "1h30m"), plain enums (the variant name), List<T>, an optional T?, data records of such fields, distinct/refined types over them, and secret<T>. Maps, sets, tuples, functions, unions other than T?, enums with fields, time points (Time, Date, …), generic data and other configs have no textual form (D-2705).

Example#

oxl✓ checked in CI
config App {
  limits: Map<str, i32>      // <- config-type
  shape: (i32, i32) = (1, 2)
}
error
config-type

How to fix#

Use a type that can be written as text: replace the map by a List of data records, the tuple by a data with two fields, an enum with fields by a plain enum plus separate fields.

oxl✓ checked in CI
data Limit { name: str; max: i32 }

config App {
  limits: List<Limit> = []
}

See also#

OxL 1.0.0-beta · Documentation version 1.0.0-beta© OxwaldLink · generated from the Standard, the std sources and the guides