v0.13.7
errors and warnings / manifest

errors and warnings / manifest / E4335

E4335 error

Packager @version-…@ blocks in a multi-version build

area
manifest (x4xxx)
fails the build
yes

A Lua or XML file of a converted packager project (compat.packager-keywords) uses a game version block such as --@version-mists@ in a build for several flavors. The BigWigs packager refuses these blocks in a build for several game versions, and wowlua does the same.

Check the game at run time with WOW_PROJECT_ID, or put the code in a file that only some flavors load (build.flavor-files). A project that releases one game at a time can set compat.per-game, which applies the blocks per flavor.

Example

× failswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "flavors": {        "camelot": {},        "mists": {}    },    "compat": {        "packager-keywords": true    }}
src/main.lualua
--@version-mists@print("Mists only")--@end-version-mists@
✓ compileswowlua.jsonjson
{    "package": {        "name": "playground",        "version": "0.1.0",        "wowlua": "^0.13"    },    "flavors": {        "camelot": {},        "mists": {}    },    "compat": {        "packager-keywords": true    }}
src/main.lualua
if WOW_PROJECT_ID == WOW_PROJECT_MISTS_CLASSIC then    print("Mists only")end

The compiler reports it like this:

error[E4335]: build type version keywords (`@version-…@`) are not allowed in a multi-version build
 = in src/main.lua
 = help: use Lua conditions on `WOW_PROJECT_ID` or TOC load conditions, like the packager asks
codemessage
W4031Packager @retail@ blocks left as written in a multi-version build
W4030Unsupported packager keyword

Offline

terminal
$ wowlua explain E4335
E4335 (error): Packager @version-…@ blocks in a multi-version build

source on GitHub ↗