From 868d97e60c1c3b693675964aa08ad78796503d8e Mon Sep 17 00:00:00 2001 From: Mike Solar Date: Wed, 2 Sep 2026 16:17:35 +0800 Subject: [PATCH] macos: disable the file-type filter (no mac runner to verify the objc2 API) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The setAllowedFileTypes block is commented out until a macOS CI runner exists — an unverified objc2 API shape (NSMutableArray / addObject / the deprecated selector) would break the pack; the open panel accepts any file and the caller validates the extension. --- crates/gpui_macos/src/platform.rs | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/crates/gpui_macos/src/platform.rs b/crates/gpui_macos/src/platform.rs index 16b5a859ab..4a39990d90 100644 --- a/crates/gpui_macos/src/platform.rs +++ b/crates/gpui_macos/src/platform.rs @@ -13,8 +13,7 @@ use cocoa::{ }, base::{BOOL, NO, YES, id, nil, selector}, foundation::{ - NSArray, NSAutoreleasePool, NSBundle, NSInteger, NSMutableArray, NSProcessInfo, NSString, - NSUInteger, NSURL, + NSArray, NSAutoreleasePool, NSBundle, NSInteger, NSProcessInfo, NSString, NSUInteger, NSURL, }, }; use core_foundation::{ @@ -768,19 +767,14 @@ impl Platform for MacPlatform { let _: () = msg_send![panel, setPrompt: ns_string(&prompt)]; } - // Extension filter (the host's allowed_extensions): the - // open panel's allowedFileTypes. Empty = any. - if !options.allowed_extensions.is_empty() { - let ns_array = { - let arr = NSMutableArray::::new(); - for ext in &options.allowed_extensions { - let s = ns_string(ext.as_str()); - arr.addObject(&*s); - } - arr - }; - let _: () = msg_send![panel, setAllowedFileTypes: &*ns_array]; - } + // TODO(macos): the extension filter (setAllowedFileTypes: + // from options.allowed_extensions) is DISABLED — no macOS + // CI runner to verify the objc2 API shape + // (NSMutableArray / addObject / the deprecated + // selector), and an unverified compile would break the + // pack. The open panel accepts any file until a mac + // machine/runner exists; the incoming path is validated + // by the caller (extension dispatch) either way. let _: () = msg_send![panel, beginWithCompletionHandler: block]; }