Skip to content

wowlua v0.10.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 12:53
· 560 commits to main since this release

0.10.0 (2026-10-25)

New

  • Debugger: wowlua debug lets VS Code (or any editor that speaks the Debug Adapter Protocol) debug a test file or your addon running in the emulated client: line breakpoints with conditions, hit counts and log messages; breakpoints on functions, API calls (C_Timer.After), events (event:PLAYER_LOGIN), scripts (script:MyFrame:OnClick) and timers; stop on errors, on taint or on a blocked protected action. Step into event handlers, OnUpdate and timers, and out of one handler into the next. The call stack shows which event or script ran your code, variables show their taint and secret values what they hide, widgets their size, points and children, and watches can change locals. VS Code asks which flavor to debug when your launch configuration names none and the package has several, and the Debug Console says which flavor runs and shows chat lines as the chat frame does (no colour codes, "2 days" for |4day:days;). Debugging the addon itself ("addon": true), type slash commands in the Debug Console as in chat (/wdemo), and /reload loads the UI again with your SavedVariables, your breakpoints still set. A launch configuration's "profile" starts the session in that world profile (your character, its gear and bags). Errors in event and script handlers stop the debugger in tests too (they reach the error handler), a stop in Blizzard's UI code or another addon's opens that file at the line, and stopping the debugger ends the session at once.
  • VS Code: the wowlua extension (editors/vscode) adds the wowlua debug type, so VS Code runs wowlua debug for you: breakpoints in .wowlua and .lua files, and launch configurations for the addon or a test file.
  • VS Code: the game's screen: while you debug, the wowlua extension shows the UI beside your code, drawn as the game draws it with your installation's textures and fonts. It redraws at every breakpoint and step and about once a second while the addon runs, and a click in the picture is a click in the game, so your OnClick breakpoints stop. Zoom in with Ctrl or Cmd and the wheel (or a pinch), or pick a frame by name to zoom to it; zoomed in, the picture is drawn sharper. The new wowlua Frames view in the debug sidebar lists the frames on screen; select one to outline it in the picture, or zoom to it. Open the panel with wowlua: Show UI; wowlua.ui.autoOpen and wowlua.ui.refreshInterval set when it opens and how often it redraws.
  • Screenshots: expect(frame).toMatchScreenshot() (or expect(mock.screen)) compares what the player would see with an image stored in __screenshots__ next to the test; a missing one is written, wowlua test -u updates it, and a mismatch writes the new image and a diff beside it. mock.screenshot() and wowlua screenshot tests/x.test.wowlua -o x.png write images too. Drawn with your own WoW installation's textures and fonts when there is one (for camelot, retail and every classic client), never copied anywhere.
  • 3D models in screenshots: model frames and model scenes show their models, read from your WoW installation: SetDisplayInfo, SetCreature, SetModel with a file ID, and an actor's SetModelByCreatureDisplayID and SetModelByFileID, posed in their animation, turned by SetFacing, zoomed by SetPortraitZoom, placed by the scene's camera. Characters too (SetUnit, SetModelByUnit, TryOn): race, skin, face and hair, and what they wear, so the default UI's character sheet shows your character; humanoid NPCs wear their gear. With an installation at hand, C_ModelInfo answers from the client's model scene tables, so Blizzard's model scenes place their models: the character sheet, the dressing room (DressUpItemLink) and the wardrobe show your character. SetPortraitTexture draws the unit's head in 3D, as unit frames show it in game. SetCreature finds creatures you have met (the client's creature cache), SetItem shows an item's own model, and models show their particles (with their tails, falling and changing texture cells over their life), glows, reflections, trails behind moving parts (ribbons) and parts that always face the camera.
  • Minimap in screenshots: the minimap shows the land around the player from your WoW installation's map tiles, at the minimap's zoom, through its mask, with the player's arrow in the middle. It follows the player: mock.moveTo({ mapID = 1429, x = 0.42, y = 0.65 }) and Minimap:SetZoom(2) show Goldshire close up. mock.moveTo({ facing = math.pi / 2 }) turns the player west (GetPlayerFacing): the arrow turns, or with the rotating minimap (rotateMinimap) the map and the compass around it do, as in game. Group members you place with mock.spawnUnit({ …, world = { y, x } }) show as their class's dots, and Minimap:PingLocation(x, y) shows a ping (GetPingPosition). As in WoW Forever's client, MINIMAP_PING reaches only event callbacks (frame:RegisterEventCallback); RegisterEvent refuses it. Indoors the minimap stays empty for now.
  • Profiler: wowlua debug and wowlua mcp profile calls, instructions run, memory allocated and time per function, event, script, OnUpdate and game frame, and write speedscope files (speedscope.app opens them); wowlua test --profile-out prof writes one for each test file.
  • For AI agents: wowlua mcp is an MCP server: an agent can start your addon in the emulated client, look at it in screenshots, find frames, click, type, run slash commands, move time on, set breakpoints, step, read variables and profile it.
  • Language server: wowlua lsp checks your addon as you type, with the edits you haven't saved, and the VS Code extension uses it: errors and warnings show in the Problems view a moment after you stop typing (and at once when you save), Format Document formats as wowlua fmt does with your fmt settings, and the outline and breadcrumbs list a file's functions, classes with their methods, locals, enums and types, hovering a name shows its type (a variable's as inferred where you read it, a function's parameters and results) with its --- doc comment, Go to Definition (F12, or Ctrl or Cmd + click) takes you from a name to where it is defined: a local, an imported function or class in its module, a method or field in its class (also inherited ones), a type, a global function of your addon, or the game's API (C_Timer.After opens its declaration), and completion lists what you can write as you type: the locals in scope, your addon's and the game's globals (GetSp offers GetSpellInfo), after . and : the fields and methods of the value (self., a frame's widget API, C_Spell., a module you imported, an enum, s:upper()), type names in annotations, and in strings the names their type allows (event names in frame:RegisterEvent("…") with each event's payload, anchor points in SetPoint("…"), the values of a string union you declared, also after event == "), after @ the decorators you can put on what follows (@script on a method, @global, @inline, … with what each does, your own decorator functions, @events.event("…") with event names), each with its type and doc comment; and inside a call's parentheses the function's parameters with their types and descriptions, the one you are typing highlighted (several forms for an overloaded function). It never writes your files or wowlua.lock and never reaches the network. It stays quick on large addons: errors in the file you edit show about a fifth of a second after you stop typing (first the file and what it imports, the rest of your addon once you pause), formatting, the outline and go to definition answer at once even while your addon is checked, a save checks the packages that depend on yours too, files changed outside the editor (a branch checked out) are checked again, and a check that fails or hangs is logged and stopped without taking the server down; the server itself uses little memory. Turn it off with wowlua.languageServer; wowlua: Restart Language Server restarts it, and it restarts by itself if it stops. Other editors can start wowlua lsp themselves.
  • VS Code: syntax colors: .wowlua files are colored: keywords, strings with their {…} expressions, comments (doc comments apart), decorators, class, function and type names, base classes, and type annotations (with a type parameter's extends) as types. Cmd+/ (or Ctrl+/) toggles -- comments, brackets and quotes close by themselves, and blocks indent as you type. Format Document uses wowlua for .wowlua files even when another formatter is your default.
  • The API explained in the editor: hovering or completing a game API function shows what it does, what its parameters and results mean and a link to its warcraft.wiki.gg page (UnitHealth, C_Spell.GetSpellInfo, frame:SetPoint), as the wiki and Blizzard's documentation describe them; for the functions neither describes, a sentence wowlua wrote from the function's name and signature, marked as such. Lua's own functions (string.format, table.insert, pairs) and every function of wowlua's modules are explained too.
  • VS Code: Testing view: the extension lists your test files and their @tests in VS Code's Testing view, with "Run test" and "Debug" above each test in the editor (and "Run all tests" at the top of the file; wowlua.testCodeLens hides them), runs a file or a single test with a click, shows each result at the test, a failure at the line it failed on (with the flavor when several run), debugs a test in wowlua debug, and with Run with Coverage shows which of your addon's lines, branches and functions the tests ran (VS Code 1.88 or newer). The cases of a @cases test appear as they run. wowlua test "tests/x.test.wowlua::adds two numbers" runs exactly that test.
  • VS Code: the coverage report in the editor: wowlua: Show Coverage Report opens the HTML coverage report in an editor tab, from your last Run with Coverage in the Testing view or the newest coverage.html wowlua test --coverage --reporter html wrote (right-click a coverage.html in the Explorer to open that one; the Test Coverage view has a button for it too). It follows your light or dark theme, and clicking a line's number opens that line of the source beside it.
  • Examples that run: a ```wowlua code block in a --- doc comment is a test now. wowlua test (and the Testing view) runs it as add example with expect and everything the module exports at hand, reports it under its source file, and points a failure or a type error at the comment's line; the editor shows an example's type errors as you type. Mark a block wowlua norun to only show it.
  • Other players in the world: a world profile's units can be other players, online and not in your group ("player": true). /invite brings them in a moment later, as if they accepted, so you can fill a party or, after converting to a raid, a raid of up to 40 and see your party and raid frames with them. /uninvite, /kick and /promote work on them (with the game's errors: "Your party is full.", "You are not the party leader."), /ginvite adds them to your guild, and /who lists them. mock.spawnUnit({ …, acceptsInvites = true }) does the same in a test. The widget demo's camelot profile has eight to try.
  • "fmt": { "exclude": ["src/Data/**"] } leaves files out of wowlua fmt, such as data your tools generate. A file you name (wowlua fmt src/Data/Quests.wowlua) is still formatted.
  • SetPortraitTextureFromCreatureDisplayID draws the creature's portrait in screenshots, and a model given SetCreature(npcID) reports its display through GetDisplayInfo() when the game's data has that creature.
  • A profile can leave files out of its builds: "profiles": { "release": { "exclude": ["src/Diagnostics/**"] } } keeps developer tools in your dev builds and tests and out of the release players get. Guard an import of such a file in code you keep with @if(build.debug).
  • mock.setPlayer(data, { events = true }) and mock.setRenown(faction, level, { events = true }) fire the events a real change would (PLAYER_LEVEL_CHANGED, UNIT_LEVEL, UNIT_HEALTH, MAJOR_FACTION_RENOWN_LEVEL_CHANGED, …), so Blizzard's UI and your addon see the new level or renown. Without the option they stay quiet, as before.

Changed

  • The language server remembers your addon between VS Code sessions: the first check after opening VS Code reuses what the last session found out about the files you haven't changed since, so errors show sooner (SuuUI: about 0.3 s instead of 0.4 s). It is kept in ~/.wowlua/cache/check/ (wowlua cache clean removes what no session used for 30 days, --all everything); set WOWLUA_NO_CHECK_CACHE=1 to turn it off.
  • Class methods without a result annotation return what their body returns, as functions do: obj:get() is a number when get returns self.count, where it was any. Completion and hover show the results (-> (), -> number), and code that used a method's results wrongly now gets the error. Generic methods still return any unless annotated.
  • wowlua check, wowlua build and wowlua test type-check code that passes event names (EventName) to generic functions much faster: SuuUI's workspace checks in two thirds of the time.
  • wowlua test uses your WoW installation's own data (item names, creatures, appearances) only with --game-data: by default a test sees only what it defines, so it gives the same result on every machine and in CI. Debug sessions and wowlua screenshot still show the game as your installation has it.
  • texture:GetTexture() and GetTextureFileID() give the file's ID, as in game, instead of the path you set: SetTexture("Interface\\Buttons\\WHITE8X8") then GetTexture() is 130871 with your WoW installation, nil for a file that doesn't exist. A test that compared it with a path now compares with the ID (or reads GetTextureFilePath()). SetTexture("") and SetTexture(0) return false, and SetAtlas replaces a file set before.
  • The HTML coverage report (wowlua test --coverage --reporter html) is a page to work from: the files to test next, a file table you can sort and filter, and one file at a time with the lines that never ran (jump between them with j and k), its functions and how often each was called, and its source with each branch's counts in words. It carries wowlua's mark and colours, and is less than half the size it was.

Fixed

  • wowlua fmt keeps a comment after a field of a table type (color?: string, -- a class colour) on that field; it moved one field down on every run.
  • wowlua fmt breaks a function header that is too long one parameter per line, instead of in the middle of a parameter's type (units: UnitToken / | UnitToken[]), and puts the end of an empty function on its own line when the header and end together would be too long.
  • wowlua fmt leaves a table on one line when a comment on its own line stands before it, where it used to spread { "0000" } over three lines.
  • In tests, C_FriendList.GetWhoInfo(i) for a row that isn't there answers nothing, GetUICameraInfo of an unknown camera nine zeros and false, and C_TransmogCollection.GetAppearanceCameraID of an unknown appearance 0, as the game does. A character loaded from a snapshot keeps its own talent config.
  • A frame with an OnEnter, OnLeave, OnMouseDown or OnMouseUp script takes the mouse, as in game, even without EnableMouse(true): clicks reach it and IsMouseEnabled() is true (OnMouseWheel turns on the wheel). The side tabs of the character frame and the group finder can be clicked now.
  • More of what you type gets the server's answer, as in game: /roll ("Player rolls 42 (1-100)"), /played, /afk and /dnd (with UnitIsAFK and UnitIsDND), /ignore and /unignore (a real ignore list), /who, and the game's errors for /invite, /ginvite, /gpromote, /gremove and /gquit when the name doesn't exist or the guild master would leave. Emotes (/dance, /wave) no longer print "Type '/help' for a listing of a few commands.", and plural words in game text ("1 day", "2 days") show as the game shows them.
  • Chat you send gets the server's answer, as in game: what you say, yell and emote shows in chat, party, raid and guild chat shows when you are in one (else the game's error, "You aren't in a party."), and a whisper shows as sent, or "No player named '…' is currently playing." for a name nobody has. Before, SendChatMessage did nothing.
  • C_SkillInfo.SetSelectedSkill selects the skill line, so the character window's skills tab shows the first skill's details when it opens, as in game.
  • Addons that load their own modules on demand through GetAddOnInfo's reason (AtlasLoot) load them: it is "DEMAND_LOADED" for a load-on-demand addon that isn't loaded yet.
  • GetFileIDFromPath answers nil for a file that doesn't exist, such as one of an addon you haven't installed, so AtlasLoot no longer draws the Atlas addon's maps without it. With your WoW installation, a game file answers its own ID.
  • With your WoW installation, C_Map.GetAreaInfo names every area (AtlasLoot's instance names), and C_Item.DoesItemExistByID is true for items the game ships without a name.
  • C_Item.GetItemInfoInstant and C_Item.GetItemIconByID answer for every item in the game's item table, also those whose names WoW only gets from the server, as in game: addons' loot lists show the items' icons instead of question marks.
  • texture:SetColorTexture replaces a file set before, and SetTexture a plain color, as in game: textures given a file and then a faint color were drawn as the file, solid white (the Forever Dungeon Journal's dungeon cards).
  • Text in a scaled frame (frame:SetScale) is drawn at that scale in screenshots: it was drawn full size and cut off (the Settings list's "NEW" badge read "N...").
  • The friends window shows your BattleTag and your online status icon: BNGetInfo() answers the account, inline atlases (|A:name:…|a) are read right, and a texture named .tga that the game stores as .blp is found.
  • Texture gradients (texture:SetGradient and XML <Gradient>) are kept and drawn in screenshots: Blizzard's help tips are dark gold boxes again instead of white ones.
  • The dressing room lists the outfit beside the model (each slot's item with its icon), as in game: an actor's GetItemTransmogInfoList() holds what it wears and tried on, and its model scene gets OnDressModel as it dresses. The panel was empty.
  • Textures and atlases inline in text (|T…|t, |A…|a) are drawn in screenshots and take their width in the line, as in game: the quest log's "characters with a ! above their head" shows its icon.
  • The character window's PvP tab shows your rank, rank points, the next rank's rewards and the season's cap, as in game (WoW Forever's PvP ranks, major faction 2800), with its rank ring: texture:SetAtlas with an atlas the game lacks leaves the texture as it was, as in game. Side panes show their descriptions (an XML font string without anchors fills its frame), and the atlas table follows the updated client (1.60.1.70532).
  • wowlua test no longer crashes with "stale handle" when garbage is collected while a test waits (mock.waitSeconds and the like): the running test could be freed between its steps. Long tests hit it most.
  • The world map shows the player's arrow where the player stands, turned as the player faces (UnitPositionFrame:AddUnit, which Blizzard's map pins use).
  • frame:SetFrameLevel(n) moves the frame's children that have their own level along with it, as in game: Blizzard's dropdown and right-click menus show their entries over the menu's background (they were drawn faint underneath).
  • Tooltips show in screenshots: a tooltip lays out its lines and sizes itself as the game's does, mock.showTooltip places it where the default UI places a tooltip, and a |cAARRGGBB color code ignores its alpha byte, as in game (a line written |c00… was invisible).
  • A frame with useParentLevel is drawn together with its parent, layer by layer, as in game, and XML fonts keep their justifyH, justifyV and spacing: the gossip window shows its parchment and its options sit left beside their icons.
  • button:GetTextWidth() measures the button's text in its font string's font, as in game: Blizzard's money displays show the amount beside each coin (a vendor's prices were drawn over the item icons).
  • Text is drawn over the textures of its own layer, as in game: window titles on Blizzard's metal frames ("Options" on the Settings panel) show again.
  • XML textures take their <Color> (a plain color without a file, a tint with one) and frames their clipChildren, as in game: the Settings panel has its background again (no more white corners or the world showing through), and its scrolling lists stop at their edges.
  • A font string without a draw layer is drawn on OVERLAY, as in game, so a button's text shows over its background (the Legacy challenges' categories were empty rows), and button:SetNormalFontObject("GameFontNormal") and its highlight and disabled versions take a font's name, as SetFontObject does (the text was drawn a pixel high).
  • button:SetFormattedText(...) shows the text on the button, as SetText does; it was kept but not drawn (the macro window's "Specific Macros" tab was blank).
  • When two anchors set the same edge of a frame, the one WoW gives priority to wins (TOPLEFT before TOPRIGHT and so on), as in game: the default UI's dropdowns show their text inside the box instead of over its bottom edge, and window tabs sit side by side instead of overlapping ("Merchant" was cut off).
  • The wardrobe shows each appearance from the camera WoW uses for your character's race and sex (C_TransmogCollection.GetAppearanceCameraID), read from your WoW installation; it used one Undead male's for everyone.
  • Model frames framed with Model_ApplyUICamera (the wardrobe, the dressing room's slots) show the model as in game: TransformCameraSpaceToModelSpace scales by the frame's effective scale, as the client's does, and screenshots draw the shot at the client's field of view, with the model's pitch and roll turned as the client turns them.
  • Models drawn with material blend 7 add their light, as in game (a totem's rune showed on a black square), and particles of the newer emitters draw no stray tails (a fire elemental showed long streaks).
  • Minimap:GetPingPosition() gives the ping's place from the player in widths of the minimap's view, the ping staying where it was in the world, and C_Minimap.GetViewRadius() follows the zoom, as in game.
  • Screenshots read your WoW installation after the client updates: a file the updated client's index lists twice is read from the entry that holds it (all textures were missing after today's camelot patch).
  • frame:RegisterEvent refuses the events WoW Forever keeps for event callbacks alone, as the client does ("Attempt to register unknown event"): MINIMAP_PING, TOOLTIP_SHOW_ITEM_COMPARISON, COMBAT_LOG_EVENT_INTERNAL_UNFILTERED, COMBAT_LOG_APPLY_FILTER_SETTINGS, COMBAT_LOG_REFILTER_ENTRIES and CLASS_TALENTS_SWITCH_TO_LOADOUT_BY_NAME. COMBAT_LOG_EVENT_UNFILTERED still registers.
  • An addon's RegisterEventCallback for MINIMAP_PING, COMBAT_LOG_ENTRIES_CLEARED, COMBAT_LOG_APPLY_FILTER_SETTINGS or COMBAT_LOG_REFILTER_ENTRIES is forbidden, as in game: ADDON_ACTION_FORBIDDEN fires, the callback is never called, and frame:RegisterEventCallback returns false. Only Blizzard's own code hears these events.
  • Talent points follow the character's level: one a level from level 10 (earlier with Legacy's "Talented" ranks), at most 51, so the talent window and C_Traits.GetTreeCurrencyInfo show what a character of that level has.
  • The default world's talent tree shows its talents: the player's talent config is the one the emulated client holds talents for (it named another, so Blizzard's talents tab drew only its backgrounds).
  • With your WoW installation at hand, an item your test doesn't define is the game's own: C_Item.GetItemInfo, DoesItemExistByID and Blizzard's item loading answer with its name, quality, icon, class and description from the client's tables, so Blizzard's Legacy rewards panel no longer raises "invalid itemID". Items you define stay yours.
  • Textures in XML without anchors fill their frame even when they have a size, sliders place their thumb by their value (anchored LEFT to the slider's LEFT, so thumb:GetPoint() answers as in game), and a texture's rotation attribute turns it: Blizzard's group finder, Settings' sliders and the group finder's divider look as in game.
  • C_SpecializationInfo.HasPlayerEarnedATalentPoint() follows the player's level (from level 10, earlier with Legacy's "Talented" ranks), as in game: the talents button turns on once the character reaches it.
  • frame:GetScaledRect() gives the rectangle times the frame's effective scale, as in game. Layouts built on it (Blizzard's action bars, ResizeLayoutFrame) came out too large by one over UIParent's scale, so the default UI's bars sat apart.
  • A button's normal, pushed, disabled and highlight textures that SetNormalAtlas or SetNormalTexture makes fill the button, as in game; they had no size (the default UI's micro menu buttons showed no icons).
  • <MaskedTextures> in XML masks the textures it names (<MaskedTexture childKey="icon"/>): action buttons' icons are masked and drawn over their slot art.
  • bar:SetStatusBarTexture("atlas-name") takes an atlas by its name, as Blizzard's bars use it (the experience bar).
  • A frame in XML with both setAllPoints="true" and its own <Anchors> is placed by its anchors and size, as in game: the player frame's resting "Z" sits at the portrait's top right instead of over the health bar.
  • Textures snap to the pixel grid unless SetSnapToPixelGrid(false) or snapToPixelGrid="false" says otherwise, as in game: IsSnappingToPixelGrid() answers true and GetTexelSnappingBias() 0.3 at first, and screenshots draw their edges on whole pixels. XML's horizTile, vertTile and texelSnappingBias attributes are read too.
  • Text with a named colour (|cnNAME:text|r, as chat links write it) shows and measures only its text; it showed part of the colour's name.
  • font:CopyFontObject(other) copies the other font's file, height, colours and shadow, as in game: Blizzard's chat frames lost their font when they made it their own.
  • An animation group with setToFinalAlpha keeps its alpha animations' end values when it finishes, so GetAlpha on their regions reads them, as in game; flipBookRows, flipBookColumns and flipBookFrames in XML are kept too.
  • GetBindingText(key, 1) shortens the modifiers as the action bars show them (s-1, c-2), so Blizzard's hotkey labels in tests and screenshots read as in game.
  • Textures from XML templates (UIPanelButtonTemplate's and others') now get their <TexCoords> and alphaMode, as in game: GetTexCoord and GetBlendMode give what the template sets.
  • The HTML coverage report of a workspace showed no source and took the name of the last addon in it: it now shows each file's source and the root package's name.
  • Code in a branch your build removes (if build.debug then … end in a release, if flavor == "vanilla" then … end in another flavor) is no longer checked, as documented: it may use what that build doesn't have, such as an import under @if(build.debug).