v0.13.7
errors and warnings / manifest

errors and warnings / manifest / W4001

W4001 warning

Unknown TOC directive in addon.toc-extra

area
manifest (x4xxx)
fails the build
with --deny-warnings

A key of addon.toc-extra is neither a TOC directive wowlua knows nor a custom field starting with X-. The client ignores directives it does not know, and custom metadata fields, which addons read with C_AddOns.GetAddOnMetadata, are meant to start with X-.

Rename the key to X-<Name> (X-Website). Directives that wowlua writes itself (Title, Interface, SavedVariables, …) are E4002 in toc-extra; set them through their manifest keys.

Example

× failswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "addon": {        "toc-extra": { "Website": "https://example.com" }    },    "flavors": {        "camelot": {}    }}
✓ compileswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "addon": {        "toc-extra": { "X-Website": "https://example.com" }    },    "flavors": {        "camelot": {}    }}

The compiler reports it like this:

warning[W4001]: unknown TOC directive `Website` in `addon.toc-extra`
  ┌─ wowlua.json:8:24
  │
8 │         "toc-extra": { "Website": "https://example.com" }
  │                        ^^^^^^^^^ unknown directive
  │
  = help: custom metadata fields should start with `X-`
codemessage
E4002Manifest does not match the schema (unknown key, wrong type)

Offline

terminal
$ wowlua explain W4001
W4001 (warning): Unknown TOC directive in addon.toc-extra

source on GitHub ↗