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
{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {} }, "build": { "load-order": ["src/main.wowlua", "src/util.wowlua"] }}import greet from "./util"print(greet())export function greet(): string return "hi"end{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {} }, "build": { "load-order": ["src/util.wowlua", "src/main.wowlua"] }}import greet from "./util"print(greet())export function greet(): string return "hi"endThe 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
Related codes
| code | message |
|---|---|
| W1035 | Usage-analysis dependency contradicts build.load-order; the listed order is kept (contradicting imports are E1035) |
| E1014 | Import or usage cycle containing a load-time edge (run-time-only cycles are allowed) |
Offline
$ wowlua explain E1035 E1035 (error): build.load-order contradicts a computed load-time dependency