v0.13.7
errors and warnings / codegen

errors and warnings / codegen / E5002

E5002 error

Output validation failed (missing or unreachable file, unresolvable XML reference, invalid TOC or XML)

area
codegen (x5xxx)
fails the build
yes

The finished AddOn would not load as it is: an XML file references a file that doesn't exist (<Script file>, <Include file>), an XML file is not well-formed, a TOC entry names a file that is not part of the output, a Lua or XML file is shipped but nothing loads it, or a build.shared-files entry is not a source file. wowlua checks the output before it writes it, because in game a missing file only shows up as an error when the AddOn loads.

Fix the path (it is relative to the XML file's folder), add the missing file, or remove the reference.

Example

× failssrc/ui.xmlxml
<Ui xmlns="http://www.blizzard.com/wow/ui/">    <Script file="missing.lua"/></Ui>
✓ compilessrc/ui.xmlxml
<Ui xmlns="http://www.blizzard.com/wow/ui/">    <Script file="main.lua"/></Ui>
src/main.lualua
print("loaded")

The compiler reports it like this:

error[E5002]: XML reference `missing.lua` does not resolve to a source file
  ┌─ src/ui.xml:2:19
  │
2 │     <Script file="missing.lua"/>
  │                   ^^^^^^^^^^^ not found
codemessage
W5003Unresolvable XML reference in a packager @debug@ block, left out of a debug build
W5004An XML file of the output loads a file that is not part of the output

Offline

terminal
$ wowlua explain E5002
E5002 (error): Output validation failed (missing or unreachable file, unresolvable XML reference, invalid TOC or XML)

source on GitHub ↗