Repository navigation
Embed the application icon into the openapi2zig binary - #117
Conversation
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe build now embeds a Windows icon in CLI executables. The resources directory is included in package snapshots and Zig package paths. Snap metadata now references ChangesApplication icon packaging
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Feature Suggested reviewers: Merge Risk: ⚪ Minimal · up to The localized icon packaging changes have no confirmed failure in the supported Windows and Snap metadata paths, so the change is mergeable. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🔵 Needs a closer look
The Snap icon must be provided as a 256×256 PNG.
Pull request overview
Adds application icon support for Windows executables and Snap packages.
Changes:
- Embeds the Windows icon resource across executable builds.
- Includes resource files in package contents.
- Declares the application icon in Snap metadata.
File summaries
| File | Summary |
|---|---|
snapcraft.yaml |
Declares the Snap icon path; the icon must be 256×256 for acceptance. |
resources/openapi2zig.rc |
Defines the embedded Windows icon resource. |
build.zig.zon |
Includes resources in package contents. |
build.zig |
Embeds the icon across executable build paths. |
Review details
Suppressed comments (1)
snapcraft.yaml:14
- Snap metadata requires a 256×256 PNG icon, but
docs/icon.pngis the 240×240 source used by this PR. Pointiconat a 256×256 PNG (or add a resized snap-specific copy) so the snap can be accepted and display its icon; the ICO's 256 px entry does not satisfy this field.
icon: docs/icon.png
- Files reviewed: 4/6 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #117 +/- ##
=======================================
Coverage 97.06% 97.06%
=======================================
Files 136 136
Lines 16941 16941
=======================================
Hits 16444 16444
Misses 497 497 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Uses
docs/icon.pngas the application icon wherever the platform supports it.What changed
resources/openapi2zig.ico(16–256 px, generated fromdocs/icon.png) andresources/openapi2zig.rcare embedded into the executable.build.zighas a newaddApplicationIconhelper called for every exe definition: the defaultzig build,build-allcross builds, and theinstall-release*steps.icon: resources/openapi2zig.pnginsnapcraft.yaml(a 256×256 copy ofdocs/icon.png, the size the Snap Store requires)..appbundles, not to a bare Mach-O CLI binary distributed as a tarball.resourcesis added to.pathsinbuild.zig.zonand to the package snapshot file list, so downstream packages still have the files.docs/icon.pngis updated to the latest 240×240 version frommain(identical content, so no conflict on merge).Notes for reviewers
Module.addWin32ResourceFileis a no-op for non-COFF targets, so the helper needs no per-target check.docs/icon.pngchanges again, the.icomust be regenerated (e.g. with Pillow).Verification
zig build: the embedded icon was extracted back out ofopenapi2zig.exeand matches.zig build build-all: all 5 targets build.zig build test-package: passes.Summary by CodeRabbit