Skip to content

fix: Add cfg guard to cleanup_native_control for cross-platform compilation#5

Merged
naaiyy merged 1 commit into
mainfrom
fix/cfg-guard-native-element-helpers
Feb 17, 2026
Merged

fix: Add cfg guard to cleanup_native_control for cross-platform compilation#5
naaiyy merged 1 commit into
mainfrom
fix/cfg-guard-native-element-helpers

Conversation

@naaiyy
Copy link
Copy Markdown
Contributor

@naaiyy naaiyy commented Feb 17, 2026

Summary

  • Adds #[cfg(target_os = "macos")] to cleanup_native_control in native_element_helpers.rs
  • This function uses cocoa::base::id and platform::native_controls which are macOS-only

Context

Without this guard, cargo check fails on Linux/Windows with unresolved import errors for cocoa and native_controls.

Test plan

  • cargo check -p gpui passes on macOS
  • CI passes (fmt, clippy, tests)

🤖 Generated with Claude Code

The cleanup_native_control function uses cocoa::base::id and
platform::native_controls which are only available on macOS.
Without the cfg guard, compilation fails on Linux and Windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@naaiyy naaiyy merged commit 74c2691 into main Feb 17, 2026
4 checks passed
@naaiyy naaiyy deleted the fix/cfg-guard-native-element-helpers branch February 17, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant