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
{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "addon": { "toc-extra": { "Website": "https://example.com" } }, "flavors": { "camelot": {} }}{ "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-`
Related codes
| code | message |
|---|---|
| E4002 | Manifest does not match the schema (unknown key, wrong type) |
Offline
$ wowlua explain W4001 W4001 (warning): Unknown TOC directive in addon.toc-extra