v0.13.7
errors and warnings / codegen

errors and warnings / codegen / W5004

W5004 warning

An XML file of the output loads a file that is not part of the output

area
codegen (x5xxx)
fails the build
with --deny-warnings

An XML file of the build loads a file that exists in your sources but is not part of this build's output: build.flavor-files restricts it to flavors this build doesn't target, or build.exclude or the profile's exclude leaves it out (a developer tool left out of release). In game the reference fails to load in those builds.

Restrict the XML file to the same flavors, or let the generated TOC load the file (it lists each file only for the flavors it belongs to) and drop the reference. For an excluded file, load it from code that the same builds leave out, or stop excluding it. A reference to a file that doesn't exist at all is E5002.

Example

× failswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "build": { "flavor-files": { "src/Vanilla.lua": ["vanilla"] } }}
src/ui.xmlxml
<Ui xmlns="http://www.blizzard.com/wow/ui/">    <Script file="Vanilla.lua"/></Ui>
src/Vanilla.lualua
print("vanilla only")
✓ compileswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "build": { "flavor-files": { "src/Vanilla.lua": ["vanilla"] } }}
src/Vanilla.lualua
print("vanilla only")

The compiler reports it like this:

warning[W5004]: `src/ui.xml` loads `Vanilla.lua`, which is not part of this build's output
 = help: check `build.exclude` and `build.flavor-files`
codemessage
E5002Output validation failed (missing or unreachable file, unresolvable XML reference, invalid TOC or XML)

Offline

terminal
$ wowlua explain W5004
W5004 (warning): An XML file of the output loads a file that is not part of the output

source on GitHub ↗