v0.13.8
errors and warnings / names

errors and warnings / names / E1035

E1035 error

build.load-order contradicts a computed load-time dependency

area
names (x1xxx)
fails the build
yes
in plain Lua files
reported as W1035

build.load-order lists a file before a file it imports. An import always loads the imported module first, so the listed order can't be kept. Reorder the list, or remove the files from it and let wowlua compute the order. (A contradiction with a dependency found only by usage analysis is the warning W1035.)

Example

× failswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "build": { "load-order": ["src/main.wowlua", "src/util.wowlua"] }}
src/main.wowluawowlua
import greet from "./util"print(greet())
src/util.wowluawowlua
export function greet(): string    return "hi"end
✓ compileswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "build": { "load-order": ["src/util.wowlua", "src/main.wowlua"] }}
src/main.wowluawowlua
import greet from "./util"print(greet())
src/util.wowluawowlua
export function greet(): string    return "hi"end

The compiler reports it like this:

error[E1035]: `build.load-order` lists `src/main.wowlua` before `src/util.wowlua`, but it depends on it
  ┌─ src/main.wowlua:2:7
  │
2 │ print(greet())
  │       ^^^^^ `main.wowlua` uses the import `greet` from `util.wowlua` while it loads
codemessage
W1035Usage-analysis dependency contradicts build.load-order; the listed order is kept (contradicting imports are E1035)
E1014Import or usage cycle containing a load-time edge (run-time-only cycles are allowed)

Offline

terminal
$ wowlua explain E1035
E1035 (error): build.load-order contradicts a computed load-time dependency

source on GitHub ↗