v0.13.8
errors and warnings / debugging

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

× failswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "profiles": { "dev": { "debug": false } }}
src/main.wowluawowlua
import todo from "wowlua:debug" local function exportData(): string    return todo("export")endprint(exportData())
✓ compileswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {} },    "profiles": { "dev": { "debug": false } }}
src/main.wowluawowlua
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

terminal
$ wowlua explain W7001
W7001 (warning): todo() in a release build

source on GitHub ↗