parent
885ae2d863
commit
aef299be3d
10 changed files with 53 additions and 44 deletions
|
@ -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<Self> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn plist(&self) -> &InfoPlist {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn path(&self) -> &Path {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn launch(&self) -> anyhow::Result<(IpcSender<CliRequest>, IpcReceiver<CliResponse>)> {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub fn zed_version_string(&self) -> String {
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
mod mac_os {
|
||||
use anyhow::Context;
|
||||
|
|
|
@ -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::<SocketAddr>())
|
||||
.with_graceful_shutdown(async move {
|
||||
|
@ -127,6 +129,10 @@ async fn main() -> Result<()> {
|
|||
}
|
||||
})
|
||||
.await?;
|
||||
|
||||
// todo!("windows")
|
||||
#[cfg(windows)]
|
||||
unimplemented!();
|
||||
}
|
||||
_ => {
|
||||
Err(anyhow!(
|
||||
|
|
|
@ -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<dyn Platform> {
|
|||
pub(crate) fn current_platform() -> Rc<dyn Platform> {
|
||||
Rc::new(LinuxPlatform::new())
|
||||
}
|
||||
// todo!("windows")
|
||||
#[cfg(target_os = "windows")]
|
||||
pub(crate) fn current_platform() -> Rc<dyn Platform> {
|
||||
todo!("windows")
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
pub(crate) trait Platform: 'static {
|
||||
|
|
|
@ -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<dyn FnOnce()>) {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"] }
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue