From c0df1e1846b380fe67f87d42dc1c79a6fb0818af Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 26 Jul 2024 21:38:34 -0400 Subject: [PATCH] Run clippy for Windows (#15318) This PR fixes running clippy on Windows, as it broke in #13223. We can't run shell scripts on Windows, so we need to use something else. Release Notes: - N/A --- .github/workflows/ci.yml | 3 ++- crates/remote_server/src/main.rs | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9928782fd5..889b9a053c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,7 +147,8 @@ jobs: save-if: ${{ github.ref == 'refs/heads/main' }} - name: cargo clippy - run: ./script/clippy + # Windows can't run shell scripts, so we need to use `cargo xtask`. + run: cargo xtask clippy - name: Build Zed run: cargo build -p zed diff --git a/crates/remote_server/src/main.rs b/crates/remote_server/src/main.rs index 6b6585624f..112e7cbeaf 100644 --- a/crates/remote_server/src/main.rs +++ b/crates/remote_server/src/main.rs @@ -1,3 +1,5 @@ +#![cfg_attr(target_os = "windows", allow(unused, dead_code))] + use fs::RealFs; use futures::channel::mpsc; use gpui::Context as _; @@ -15,6 +17,12 @@ use std::{ sync::Arc, }; +#[cfg(windows)] +fn main() { + unimplemented!() +} + +#[cfg(not(windows))] fn main() { env::set_var("RUST_BACKTRACE", "1"); env_logger::builder()