wails3 generate icons silently no-ops on Assets.car generation (-iconcomposerinput / -macassetdir)
Description
wails3 generate icons exits 0 with no output and no file changes when invoked with the documented -iconcomposerinput and -macassetdir flags, even when those flags are supposed to produce or update an Assets.car. Users assume the command worked because there is no error.
Reproduction
Tested on v3.0.0-alpha.78 (also reproduces on alpha.76).
-
Create a fresh project (which scaffolds a default
appicon.iconIcon Composer asset and a baselinedarwin/Assets.car):wails3 init -t vanilla -n freshtest cd freshtest/build -
Note the
Assets.carmtime:stat -f "%Sm" darwin/Assets.car -
Run icon generation with the documented Icon Composer flags:
wails3 generate icons \ -input appicon.png \ -macfilename darwin/icons.icns \ -windowsfilename windows/icon.ico \ -iconcomposerinput appicon.icon \ -macassetdir darwin
Observed
- Exit code:
0 - Stdout/stderr: empty
darwin/icons.icns: regenerated correctlywindows/icon.ico: regenerated correctlydarwin/Assets.car: mtime unchanged, contents unchanged
Expected
One of:
- Emit a warning explaining the missing dependency. (On a clean macOS 26 install, even with full Xcode 16+ installed,
xcrun --find iconcomposerfails — Apple ships Icon Composer as a GUI-only app at/Applications/Xcode.app/Contents/Applications/Icon Composer.app. There is no CLI binary by default.) - Fail with a non-zero exit code and a message indicating what's missing or how to compile the
.icon. - Document the dependency in
wails3 generate icons --helpfor-iconcomposerinput/-macassetdir.
Currently the command appears to succeed but produces stale output. This is especially confusing when:
- The user has updated the source
appicon.iconand assumes the new artwork was compiled. - A stale
Assets.carends up overriding a freshly-generatedicons.icnsin the bundled.app/Contents/Resources/(macOS prefersAssets.carfor icon-name-based lookups in modern bundles), causing the user to see the previous artwork in the dock and Cmd+Tab even after they've changed the icon and rebuilt.
Notes
- This was painful to debug because every other piece of the pipeline reports success. The build task that invokes this command (the default Taskfile's
generate:iconsstep) doesn't surface that anything was skipped, so users only notice when they ship and discover the icon didn't update.
System
- Wails: v3.0.0-alpha.78 (also v3.0.0-alpha.76)
- macOS: 26.0 (Tahoe), Xcode installed
- Go: 1.25
🤖 Triage: Confirmed silent no-op in wails3 generate icons for Assets.car generation. High-confidence bug with clear impact.
Labels: Bug ✓, v3 ✓, cli ✓ (all already applied)
Classification: macOS CLI bug. Icon Composer dependency not properly handled.
Action: Dispatching to Engineer - Mac for investigation and fix.
Fixed in commit fe1c8bbef.
Root cause: generateMacAsset() returned a bare sentinel error on every early exit (non-macOS, macOS < 26, actool missing/old). GenerateIcons() silently swallowed it when -input was also provided — exit 0, no output, stale Assets.car.
Fix (2 files in v3/internal/commands/):
- Each early exit in
generateMacAsset()now returns a descriptive wrapped error, e.g."Assets.car generation requires actool 26 or later (actool not found at /usr/bin/actool — install Xcode)".errors.Issemantics preserved via%w. GenerateIcons()now printsWarning: <reason>to stderr when falling through to PNG-based generation instead of silently no-opping.-iconcomposerinputand-macassetdirflag help updated to mention the macOS 26 + Xcode actool 26+ requirement.
After the fix:
$ wails3 generate icons -input appicon.png -macfilename darwin/icons.icns \
-windowsfilename windows/icon.ico \
-iconcomposerinput appicon.icon -macassetdir darwin
Warning: Assets.car generation requires actool 26 or later (actool not found at /usr/bin/actool — install Xcode): mac asset generation is only supported on macOS
Tests: 10 pass, 1 skip (Assets.car — needs full Xcode). New TestGenerateIconsFallthrough covers the fallthrough path on any platform.
PR pending.