Fix release builds producing a broken package - #10
Open
KharchenkoDmitriy wants to merge 1 commit into
Open
Conversation
Two problems that only show up in a packaged (tagged) build, not in a source checkout: 1. Double-wrapped debug blocks. release.sh's lua_filter comments out debug-only code in a release build by rewriting "--@debug@" to "--[==[@debug@" and "--@end-debug@" to "--@end-debug@]==]". Three blocks already carried the *packaged* form in the source, so the closing rewrite matched again and appended a second bracket: --@end-debug@]==] -> --@end-debug@]==]]==] That is a syntax error. RaidFrames/MainFrame.lua then failed to load, Cell.unitButtons was never created, and every consumer of it threw "attempt to index field 'unitButtons' (a nil value)" -- no unit frames, options frame at the wrong scale, tabs that never rendered. Restore the un-packaged source form in RaidFrames/MainFrame.lua and Modules/RaidDebuffs/RaidDebuffs.lua so the filter emits valid output. lua_filter debug only runs for release builds, which is why a source checkout never showed this. 2. Interface 38xxx was packaged as retail. Cell_Wrath.toc declares "## Interface: 38001", which toc_to_type did not recognise, so it fell through to the retail game type. Map 38xxx to wrath alongside 30xxx. Verified by running luac -p over the packaged output rather than the source: 160/160 Lua files in the built package compile, and the only remaining source-vs-package difference is the packager's intended single wrapping. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011YngV4VgYFwrPdgvWYVz7p
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two problems that only show up in a packaged (tagged) build, not in a source checkout:
Double-wrapped debug blocks.
release.sh's lua_filter comments out debug-only code in a release build by rewriting "--@debug@" to "--[==[@debug@" and "--@end-debug@" to "--@end-debug@]==]". Three blocks already carried the packaged form in the source, so the closing rewrite matched again and appended a second bracket:
That is a syntax error. RaidFrames/MainFrame.lua then failed to load, Cell.unitButtons was never created, and every consumer of it threw "attempt to index field 'unitButtons' (a nil value)" -- no unit frames, options frame at the wrong scale, tabs that never rendered.
Restore the un-packaged source form in RaidFrames/MainFrame.lua and Modules/RaidDebuffs/RaidDebuffs.lua so the filter emits valid output. lua_filter debug only runs for release builds, which is why a source checkout never showed this.
Interface 38xxx was packaged as retail.
Cell_Wrath.toc declares "## Interface: 38001", which toc_to_type did not recognise, so it fell through to the retail game type. Map 38xxx to wrath alongside 30xxx.
Verified by running luac -p over the packaged output rather than the source: 160/160 Lua files in the built package compile, and the only remaining source-vs-package difference is the packager's intended single wrapping.