errors and warnings / debugging / W7001
W7001 warning
todo() in a release build
- area
- debugging (x7xxx)
- fails the build
- with --deny-warnings
A release build (a profile with debug = false) still contains todo() from
wowlua:debug. todo is kept in every build and raises "not implemented"
when it runs, so players would hit the error. wowlua build --release and
wowlua check --release report it; the example turns debug off for the dev
profile so that wowlua check sees it.
Write the missing code before releasing.
Example
{ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {} }, "profiles": { "dev": { "debug": false } }}import todo from "wowlua:debug" local function exportData(): string return todo("export")endprint(exportData()){ "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" }, "flavors": { "camelot": {} }, "profiles": { "dev": { "debug": false } }}local function exportData(): string return "data"endprint(exportData())The compiler reports it like this:
warning[W7001]: `todo()` in a release build ┌─ src/main.wowlua:4:12 │ 4 │ return todo("export") │ ^^^^^^^^^^^^^^ raises "not implemented" when it runs
Offline
$ wowlua explain W7001 W7001 (warning): todo() in a release build