fix(desktop): compile rfd after nil-NSOpenPanel guard (E0069) - #21
Merged
Conversation
PR #20's rfd vendor patch used a bare `return;` in ModalFuture::new when +[NSOpenPanel openPanel] / save panel was nil. That constructor returns Self, so Apple Silicon `just desktop-release-build` failed with E0069. Complete the future as cancelled and return Self instead. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jmfcamp <jmfcamp@users.noreply.github.com>
Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: jmfcamp <jmfcamp@users.noreply.github.com>
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.
Summary
Follow-up to #20 (file-attach NSOpenPanel nil-guard). That patch vendored
rfd0.16.0 and added an early-out when+[NSOpenPanel openPanel]/+[NSSavePanel savePanel]is nil. The sync fallback inModalFuture::newused a barereturn;, but that function returnsSelf, so Apple Siliconjust desktop-release-buildfailed with:The async sheet path’s
return;is inside a()closure and was already valid. The sync path now clones the future state, completes it asNSModalResponseCancel(so callers getNone/ no path), and returnsSelf { state }— same cancel behavior as #20, just a type-correct constructor exit.Hula branding is unchanged (
productNameHula Buzz, bundle idcom.huladesk.buzz,hulabuzz://). No extra crates vendored; no Tauri/wry bump.Related issue
N/A. Follow-up to #20. None found for the E0069 compile break.
Testing
macos_file_panel.rsnow also includemodal_future.rsand assert the constructor returnsSelfon the nil-panel path (catches a regression toreturn;).just desktop-release-build. rfd must compile (E0069 gone). Vite/chunk warnings and wry unused-unsafe / deprecated warnings are not the failure.