fix(v3/cli): give generate icons its documented default paths#5825
Conversation
`wails3 generate icons` advertised input and output paths in its help text but had no defaults, so running it bare produced nothing useful. Closes #5699. The fix is three struct tags. The clir `default:` tag already works on this command: `Sizes` has carried one all along and `-help` prints it, so the other three fields simply needed the same treatment. Verified: gofmt clean, and `wails3 generate icons -help` now prints (default "build/appicon.png"), (default "build/windows/icon.ico") and (default "build/darwin/icon.icns"). Supersedes the approach in #5753, which does not compile. Claude-Session: https://claude.ai/code/session_01FigQqUQbNu9ngE4a2CSNm8
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe icon generation options now provide default paths for the source image, Windows icon, and macOS icon when omitted through CLI or Wails bindings. ChangesIcon generation defaults
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.12.2)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
leaanthony
left a comment
There was a problem hiding this comment.
Three tags, and the help output confirms it rather than the code implying it. Right call to check whether the existing mechanism worked before accepting the restructure in #5753 — Sizes printing its default was the giveaway that the tag path was already wired up.
…nerate icons` its documented default paths
Closes #5699. Supersedes #5753 — see below.
The fix
wails3 generate iconsadvertised input and output paths in its help text but had no defaults, so running it bare did nothing useful.Three struct tags. The clir
default:tag already works on this command —Sizeshas carried one all along — so the other three fields just needed the same treatment.Why not #5753
#5753 restructured the subcommand to set the defaults imperatively, and its CI is red on all three platforms. It references
flags.GenerateIconsOptions, which does not exist anywhere in v3, whilecommands.GenerateIconstakes*IconsOptions. It also renamed a localtaskvariable toTask, set each default in two places at once (struct tag and imperative assignment, so the two can silently diverge), and stripped the trailing newline from four Go files.None of that is needed once you notice the tag mechanism already works. Worth closing #5753 in favour of this.
Verification
gofmtclean.Summary by CodeRabbit