diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 77d966c84b..1a35d77857 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,10 +150,10 @@ jobs: ~/.cargo/git/db/ target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/rust-toolchain.toml') }}-${{ hashFiles('**/Cargo.lock') }} - # todo!(windows): Actually run clippy - #- name: cargo clippy - # shell: bash -euxo pipefail {0} - # run: script/clippy + + - name: cargo clippy + shell: bash -euxo pipefail {0} + run: script/clippy - name: Build Zed run: cargo build -p zed diff --git a/Cargo.lock b/Cargo.lock index 092c6821f2..92a6406695 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1247,17 +1247,6 @@ dependencies = [ "rustc-demangle", ] -[[package]] -name = "backtrace-on-stack-overflow" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fd2d70527f3737a1ad17355e260706c1badebabd1fa06a7a053407380df841b" -dependencies = [ - "backtrace", - "libc", - "nix 0.23.2", -] - [[package]] name = "base16ct" version = "0.1.1" @@ -5552,15 +5541,6 @@ dependencies = [ "libc", ] -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - [[package]] name = "memoffset" version = "0.7.1" @@ -5899,19 +5879,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" -[[package]] -name = "nix" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3790c00a0150112de0f4cd161e3d7fc4b2d8a5542ffc35f099a2562aecb35c" -dependencies = [ - "bitflags 1.3.2", - "cc", - "cfg-if 1.0.0", - "libc", - "memoffset 0.6.5", -] - [[package]] name = "nix" version = "0.24.3" @@ -9249,7 +9216,6 @@ name = "storybook" version = "0.1.0" dependencies = [ "anyhow", - "backtrace-on-stack-overflow", "chrono", "clap 4.4.4", "collab_ui", diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index 47a824a04b..e4750eb352 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -156,6 +156,39 @@ mod linux { } } +// todo!("windows") +#[cfg(target_os = "windows")] +mod windows { + use std::path::Path; + + use cli::{CliRequest, CliResponse}; + use ipc_channel::ipc::{IpcReceiver, IpcSender}; + + use crate::{Bundle, InfoPlist}; + + impl Bundle { + pub fn detect(_args_bundle_path: Option<&Path>) -> anyhow::Result { + unimplemented!() + } + + pub fn plist(&self) -> &InfoPlist { + unimplemented!() + } + + pub fn path(&self) -> &Path { + unimplemented!() + } + + pub fn launch(&self) -> anyhow::Result<(IpcSender, IpcReceiver)> { + unimplemented!() + } + + pub fn zed_version_string(&self) -> String { + unimplemented!() + } + } +} + #[cfg(target_os = "macos")] mod mac_os { use anyhow::Context; diff --git a/crates/collab/src/main.rs b/crates/collab/src/main.rs index 6175c7fb32..e2b04bb8ac 100644 --- a/crates/collab/src/main.rs +++ b/crates/collab/src/main.rs @@ -12,6 +12,7 @@ use std::{ path::Path, sync::Arc, }; +#[cfg(unix)] use tokio::signal::unix::SignalKind; use tower_http::trace::{self, TraceLayer}; use tracing::Level; @@ -109,6 +110,7 @@ async fn main() -> Result<()> { .on_response(trace::DefaultOnResponse::new().level(Level::INFO)), ); + #[cfg(unix)] axum::Server::from_tcp(listener)? .serve(app.into_make_service_with_connect_info::()) .with_graceful_shutdown(async move { @@ -127,6 +129,10 @@ async fn main() -> Result<()> { } }) .await?; + + // todo!("windows") + #[cfg(windows)] + unimplemented!(); } _ => { Err(anyhow!( diff --git a/crates/gpui/src/platform.rs b/crates/gpui/src/platform.rs index bbd2e93b4f..62383df57c 100644 --- a/crates/gpui/src/platform.rs +++ b/crates/gpui/src/platform.rs @@ -1,5 +1,7 @@ // todo!(linux): remove #![cfg_attr(target_os = "linux", allow(dead_code))] +// todo!("windows"): remove +#![cfg_attr(windows, allow(dead_code))] mod app_menu; mod keystroke; @@ -61,9 +63,10 @@ pub(crate) fn current_platform() -> Rc { pub(crate) fn current_platform() -> Rc { Rc::new(LinuxPlatform::new()) } +// todo!("windows") #[cfg(target_os = "windows")] pub(crate) fn current_platform() -> Rc { - todo!("windows") + unimplemented!() } pub(crate) trait Platform: 'static { diff --git a/crates/gpui/src/platform/test/platform.rs b/crates/gpui/src/platform/test/platform.rs index dc4dc13fa1..0c86e0627e 100644 --- a/crates/gpui/src/platform/test/platform.rs +++ b/crates/gpui/src/platform/test/platform.rs @@ -126,8 +126,9 @@ impl Platform for TestPlatform { #[cfg(target_os = "macos")] return Arc::new(crate::platform::mac::MacTextSystem::new()); + // todo!("windows") #[cfg(target_os = "windows")] - todo!("windows") + unimplemented!() } fn run(&self, _on_finish_launching: Box) { diff --git a/crates/gpui/src/scene.rs b/crates/gpui/src/scene.rs index 17cb25a12f..9597be71b5 100644 --- a/crates/gpui/src/scene.rs +++ b/crates/gpui/src/scene.rs @@ -1,3 +1,6 @@ +// todo!("windows"): remove +#![cfg_attr(windows, allow(dead_code))] + use crate::{ point, AtlasTextureId, AtlasTile, Bounds, ContentMask, Corners, Edges, EntityId, Hsla, Pixels, Point, ScaledPixels, StackingOrder, diff --git a/crates/project/src/project_tests.rs b/crates/project/src/project_tests.rs index fcef76273d..b222913325 100644 --- a/crates/project/src/project_tests.rs +++ b/crates/project/src/project_tests.rs @@ -45,6 +45,7 @@ async fn test_block_via_smol(cx: &mut gpui::TestAppContext) { task.await; } +#[cfg(not(windows))] #[gpui::test] async fn test_symlinks(cx: &mut gpui::TestAppContext) { init_test(cx); diff --git a/crates/storybook/Cargo.toml b/crates/storybook/Cargo.toml index c95ca3c2e9..c4cd5e48bd 100644 --- a/crates/storybook/Cargo.toml +++ b/crates/storybook/Cargo.toml @@ -11,8 +11,6 @@ path = "src/storybook.rs" [dependencies] anyhow.workspace = true -# TODO: Remove after diagnosing stack overflow. -backtrace-on-stack-overflow = "0.3.0" chrono = "0.4" clap = { version = "4.4", features = ["derive", "string"] } collab_ui = { workspace = true, features = ["stories"] } diff --git a/crates/storybook/src/storybook.rs b/crates/storybook/src/storybook.rs index 74bca38209..33b91a5eaa 100644 --- a/crates/storybook/src/storybook.rs +++ b/crates/storybook/src/storybook.rs @@ -37,8 +37,6 @@ struct Args { } fn main() { - // unsafe { backtrace_on_stack_overflow::enable() }; - SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger"); menu::init();