v0.13.7
errors and warnings / manifest

errors and warnings / manifest / E4012

E4012 error

Profile config key missing from the top-level config, or with an incompatible type

area
manifest (x4xxx)
fails the build
yes

A profile's config sets a key that the top-level config does not define, or gives it a value of another type. The top-level config lists every configuration key with its default, and its values decide the type of config in wowlua:meta; profiles may only change those values.

Add the key with its default to the top-level config, or give the profile's value the same type (below, a number instead of a string).

Example

× failswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "flavors": {        "camelot": {}    },    "config": {        "maxHistory": 50    },    "profiles": {        "dev": { "config": { "maxHistory": "500" } }    }}
✓ compileswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "flavors": {        "camelot": {}    },    "config": {        "maxHistory": 50    },    "profiles": {        "dev": { "config": { "maxHistory": 500 } }    }}

The compiler reports it like this:

error[E4012]: profile `dev`: config key `maxHistory` is a string but the top-level `config` defines a number
   ┌─ wowlua.json:14:30
   │
14 │         "dev": { "config": { "maxHistory": "500" } }
   │                              ^^^^^^^^^^^^ invalid config key

Offline

terminal
$ wowlua explain E4012
E4012 (error): Profile config key missing from the top-level config, or with an incompatible type

source on GitHub ↗