src/main/groovy/muddler/mudlet/items/Button.groovy exists, but nothing in
App.groovy constructs one. App.groovy builds five packages - alias,
script, timer, trigger, key - and yields those five into the MudletPackage
XML. There is no sixth for buttons, so a project with a populated
src/buttons/ builds without any error and simply produces no buttons.
The failure is silent - the build reports success and every other item type
in the same project comes through fine.
Reproduce
mfile:
{ "package": "buttons-repro", "version": "1.0.0" }
src/buttons/buttons.json - a toolbar with one button:
[
{ "name": "Toolbar", "isFolder": "yes", "isActive": "yes",
"children": [
{ "name": "Show affs", "isActive": "yes", "script": "Show_affs.lua" }
]
}
]
src/buttons/Show_affs.lua:
src/triggers/triggers.json - a canary, to show every other item type still
builds normally:
[ { "name": "Canary", "patterns": [{"pattern": "x", "type": "exactMatch"}], "script": "X" } ]
Run muddle.
Expected
The log prints "Scanning for buttons", the way it does for aliases, scripts,
timers, triggers and keys. The output XML has an ActionPackage/Action
element for "Show affs" inside an ActionGroup for "Toolbar".
Actual
"Scanning for buttons" never appears in the log. The canary trigger builds
correctly, but there is no Action or ActionGroup element anywhere in the
output - the button leaves no trace at all.
Cause
App.groovy only builds AliasPackage, ScriptPackage, TimerPackage,
TriggerPackage and KeyPackage, and only yields those five into the
package XML. There is no ButtonPackage/ActionPackage to scan
src/buttons/ and construct Buttons. Button.groovy itself only looks
finished, too: it declares fields for the button's options but its
constructor sets none of them, so even a Button built by hand would
serialise as all-null.
Impact
A project with a src/buttons/ folder silently loses every button on
build - there is no error, warning, or partial output to indicate anything
is missing. Converting an existing package with a toolbar drops the toolbar
entirely.
Runnable reproduction
https://github.com/TheLastDarkthorne/mudlet-tooling-repros/tree/main/muddler/bug6-missing-buttons
Found while converting svof (in-client-svof branch) from XML into a muddler project.
muddler version: fork of 1.1.0, pre-fix (TheLastDarkthorne/muddler @ svof-fixes)
Java: OpenJDK 17
OS: Windows 11
src/main/groovy/muddler/mudlet/items/Button.groovyexists, but nothing inApp.groovyconstructs one.App.groovybuilds five packages - alias,script, timer, trigger, key - and yields those five into the
MudletPackageXML. There is no sixth for buttons, so a project with a populated
src/buttons/builds without any error and simply produces no buttons.The failure is silent - the build reports success and every other item type
in the same project comes through fine.
Reproduce
mfile:{ "package": "buttons-repro", "version": "1.0.0" }src/buttons/buttons.json- a toolbar with one button:[ { "name": "Toolbar", "isFolder": "yes", "isActive": "yes", "children": [ { "name": "Show affs", "isActive": "yes", "script": "Show_affs.lua" } ] } ]src/buttons/Show_affs.lua:src/triggers/triggers.json- a canary, to show every other item type stillbuilds normally:
[ { "name": "Canary", "patterns": [{"pattern": "x", "type": "exactMatch"}], "script": "X" } ]Run
muddle.Expected
The log prints "Scanning for buttons", the way it does for aliases, scripts,
timers, triggers and keys. The output XML has an
ActionPackage/Actionelement for "Show affs" inside an
ActionGroupfor "Toolbar".Actual
"Scanning for buttons" never appears in the log. The canary trigger builds
correctly, but there is no
ActionorActionGroupelement anywhere in theoutput - the button leaves no trace at all.
Cause
App.groovyonly buildsAliasPackage,ScriptPackage,TimerPackage,TriggerPackageandKeyPackage, and only yields those five into thepackage XML. There is no
ButtonPackage/ActionPackageto scansrc/buttons/and constructButtons.Button.groovyitself only looksfinished, too: it declares fields for the button's options but its
constructor sets none of them, so even a
Buttonbuilt by hand wouldserialise as all-null.
Impact
A project with a
src/buttons/folder silently loses every button onbuild - there is no error, warning, or partial output to indicate anything
is missing. Converting an existing package with a toolbar drops the toolbar
entirely.
Runnable reproduction
https://github.com/TheLastDarkthorne/mudlet-tooling-repros/tree/main/muddler/bug6-missing-buttons
Found while converting svof (
in-client-svofbranch) from XML into a muddler project.muddler version: fork of 1.1.0, pre-fix (
TheLastDarkthorne/muddler@svof-fixes)Java: OpenJDK 17
OS: Windows 11