Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

chore(macos): silence every warning in the macOS app build

Louis Beaumont508d4c165aa4
diff --git a/apps/screenpipe-app-tauri/src-tauri/build.rs b/apps/screenpipe-app-tauri/src-tauri/build.rs
index 1abbb2ac2..a042b15ce 100644
--- a/apps/screenpipe-app-tauri/src-tauri/build.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/build.rs
@@ -38,7 +38,7 @@ fn build_livetext_bridge() {
}
let has_vk = has_visionkit_sdk();
- println!("cargo:warning=VisionKit SDK check: {}", has_vk);
+ eprintln!("VisionKit SDK check: {}", has_vk);
if !has_vk {
println!("cargo:warning=VisionKit.framework not found in SDK, building Live Text stub");
build_livetext_stub(&out_dir, &lib_path);
@@ -803,7 +803,7 @@ fn stage_mlx_metallib() {
// Download mlx.metallib (pre-compiled MLX Metal shaders) for parakeet-mlx.
// MLX needs this file next to the binary at runtime. The release
// workflow exposes the target-suffixed externalBin copy to Tauri.
- println!("cargo:warning=mlx-metallib: downloading from GitHub releases...");
+ eprintln!("mlx-metallib: downloading from GitHub releases...");
let url =
"https://github.com/screenpipe/screenpipe/releases/download/mlx-metallib-v0.2.0/mlx.metallib";
let status = std::process::Command::new("curl")
@@ -812,10 +812,7 @@ fn stage_mlx_metallib() {
match status {
Ok(s) if s.success() => {
let size = std::fs::metadata(&metallib).map(|m| m.len()).unwrap_or(0);
- println!(
- "cargo:warning=mlx-metallib: downloaded ({} MB)",
- size / 1_000_000
- );
+ eprintln!("mlx-metallib: downloaded ({} MB)", size / 1_000_000);
}
_ => println!(
"cargo:warning=mlx-metallib: download failed — parakeet-mlx will crash at runtime"
@@ -823,10 +820,7 @@ fn stage_mlx_metallib() {
}
} else {
let size = std::fs::metadata(&metallib).map(|m| m.len()).unwrap_or(0);
- println!(
- "cargo:warning=mlx-metallib: already present ({} MB)",
- size / 1_000_000
- );
+ eprintln!("mlx-metallib: already present ({} MB)", size / 1_000_000);
}
sign_macos_sidecar_if_needed(&metallib);
@@ -853,8 +847,8 @@ fn stage_libonnxruntime_dylib() {
if let Err(e) = std::fs::copy(&src, &dylib) {
println!("cargo:warning=libonnxruntime: ORT_DYLIB_PATH copy failed: {e}");
} else {
- println!(
- "cargo:warning=libonnxruntime: copied from ORT_DYLIB_PATH ({})",
+ eprintln!(
+ "libonnxruntime: copied from ORT_DYLIB_PATH ({})",
src.display()
);
}
@@ -866,14 +860,9 @@ fn stage_libonnxruntime_dylib() {
!dylib.exists() || std::fs::metadata(&dylib).map(|m| m.len()).unwrap_or(0) < min_size;
if still_needs_fetch {
- println!(
- "cargo:warning=libonnxruntime: downloading x86_64 dylib from Homebrew bottle..."
- );
+ eprintln!("libonnxruntime: downloading x86_64 dylib from Homebrew bottle...");
match download_homebrew_onnxruntime_dylib(&dylib) {
- Ok(size) => println!(
- "cargo:warning=libonnxruntime: downloaded ({} MB)",
- size / 1_000_000
- ),
+ Ok(size) => eprintln!("libonnxruntime: downloaded ({} MB)", size / 1_000_000),
Err(e) => {
let msg = format!("libonnxruntime dylib fetch failed: {e}");
if is_release {
@@ -928,8 +917,8 @@ fn sign_macos_sidecar_if_needed(path: &std::path::Path) {
match status {
Ok(status) if status.success() => {
- println!(
- "cargo:warning=macos-sidecar-sign: signed {}",
+ eprintln!(
+ "macos-sidecar-sign: signed {}",
path.file_name()
.and_then(|n| n.to_str())
.unwrap_or("sidecar")
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/native_shortcut_reminder.rs b/apps/screenpipe-app-tauri/src-tauri/src/native_shortcut_reminder.rs
index c5363b994..bdb95d9ab 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/native_shortcut_reminder.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/native_shortcut_reminder.rs
@@ -70,13 +70,17 @@ mod ffi {
w: *mut f64,
h: *mut f64,
) -> c_int;
+ // Reached only through the e2e command surface below.
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn shortcut_get_meeting_overlay_state(
transcript_visible: *mut c_int,
pinned: *mut c_int,
hovering: *mut c_int,
meeting_active: *mut c_int,
) -> c_int;
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn shortcut_set_pill_hovering(hovering: c_int) -> c_int;
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn shortcut_toggle_meeting_pin() -> c_int;
pub fn shortcut_set_action_callback(cb: Option<extern "C" fn(*const c_char)>);
}
@@ -156,6 +160,7 @@ mod ffi {
/// Observed state of the live-meeting transcript card, or None when the
/// native panel is unavailable.
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn meeting_overlay_state() -> Option<super::MeetingOverlayPanelState> {
let (mut visible, mut pinned, mut hovering, mut active) = (0, 0, 0, 0);
let ok = unsafe {
@@ -176,11 +181,13 @@ mod ffi {
/// Test seam: drive the chip's hover entry point directly, because AppKit
/// will not deliver a synthetic hover to a nonactivating panel.
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn set_pill_hovering(hovering: bool) -> bool {
unsafe { shortcut_set_pill_hovering(if hovering { 1 } else { 0 }) == 0 }
}
/// Test seam: the same toggle the card's pin button invokes.
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn toggle_meeting_pin() -> bool {
unsafe { shortcut_toggle_meeting_pin() == 0 }
}
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/updates.rs b/apps/screenpipe-app-tauri/src-tauri/src/updates.rs
index 6f3513cba..9ab4f5df6 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/updates.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/updates.rs
@@ -386,6 +386,7 @@ pub async fn restart_for_update(
/// True once any surface committed to an update restart. Diagnostics only
/// (e2e driver / tray state) — the authoritative guard is the swap above.
+#[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn update_restart_started() -> bool {
UPDATE_RESTART_STARTED.load(Ordering::SeqCst)
}
@@ -1443,6 +1444,7 @@ impl UpdatesManager {
/// Content-free snapshot of the update menu item for diagnostics and the
/// e2e driver: (label, enabled).
+ #[cfg_attr(not(feature = "e2e"), allow(dead_code))]
pub fn menu_item_snapshot(&self) -> Option<(String, bool)> {
let item = self.update_menu_item.as_ref()?;
let text = item.text().ok()?;