v0.13.8
errors and warnings / stdlib

errors and warnings / stdlib / E8300

E8300 error

Standard-library function unavailable on a targeted flavor (no fallback)

area
stdlib (x8xxx)
fails the build
yes

A standard-library function, or a kind it takes, doesn't exist on one of the flavors you build for, and the module has no fallback there. The compiler reports it for aura.container on flavors without aura containers, and for tooltip kinds (tooltip.hook, @onTooltip) a flavor lacks: clients without the tooltip data system only hook "Item", "Spell" and "Unit" tooltips. In game the call would raise an error on that flavor.

Keep the code to the flavors that have it: in an if flavor == … then branch (either flavor mode), or with @if(flavor == …) on the declaration (in split flavor mode). A call is checked only for the flavors that can run it. Or use something every flavor has, such as aura.each instead of a container.

Example

× failswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {}, "vanilla": {} }}
src/main.wowluawowlua
import onTooltip from "wowlua:tooltip" @onTooltip("Mount")local function showMountId(tip, data)    print(data.id)end
✓ compileswowlua.jsonjson
{    "package": { "name": "playground", "version": "0.1.0", "wowlua": "^0.13" },    "flavors": { "camelot": {}, "vanilla": {} }}
src/main.wowluawowlua
import onTooltip from "wowlua:tooltip"import flavor from "wowlua:meta" @if(flavor == "camelot")@onTooltip("Mount")local function showMountId(tip, data)    print(data.id)end

The compiler reports it like this:

error[E8300]: `Mount` tooltips are not available on vanilla
  ┌─ src/main.wowlua:3:12
  │
3 │ @onTooltip("Mount")
  │            ^^^^^^^ not on every targeted flavor
  │
  = help: without the tooltip data system only "Item", "Spell" and "Unit" tooltips are hooked; guard the hook with `@if(flavor == …)`
codemessage
W8301Standard-library function uses a reduced fallback on a targeted flavor (lists missing fields or features)

Offline

terminal
$ wowlua explain E8300
E8300 (error): Standard-library function unavailable on a targeted flavor (no fallback)

source on GitHub ↗