v0.13.7
errors and warnings / manifest

errors and warnings / manifest / E4120

E4120 error

SavedVariables name used by several addons in the workspace

area
manifest (x4xxx)
fails the build
yes

Two addons of one workspace use the same SavedVariables name. The client keeps SavedVariables in global variables, so both addons would read and overwrite the same saved data.

Give each addon its own name, for example one that starts with the addon's name.

Example

× failswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "addon": {        "saved-variables": ["PlaygroundDB"]    },    "flavors": {        "camelot": {}    },    "workspace": {        "members": ["options"],        "default-members": ["."]    }}
options/wowlua.jsonjson
{    "package": {        "name": "playground-options",        "version": "0.1.0"    },    "addon": {        "saved-variables": ["PlaygroundDB"]    },    "flavors": {        "camelot": {}    }}
✓ compileswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "addon": {        "saved-variables": ["PlaygroundDB"]    },    "flavors": {        "camelot": {}    },    "workspace": {        "members": ["options"],        "default-members": ["."]    }}
options/wowlua.jsonjson
{    "package": {        "name": "playground-options",        "version": "0.1.0"    },    "addon": {        "saved-variables": ["PlaygroundOptionsDB"]    },    "flavors": {        "camelot": {}    }}

The compiler reports it like this:

error[E4120]: SavedVariables `PlaygroundDB` is used by both `Playground` and `PlaygroundOptions`
 = in options/wowlua.json
codemessage
E4325Two workspace members with the same addon.name

Offline

terminal
$ wowlua explain E4120
E4120 (error): SavedVariables name used by several addons in the workspace

source on GitHub ↗