From acbad4c7b791fd7bac8479a62d7ddc3b317d98ed Mon Sep 17 00:00:00 2001 From: Mikayla Date: Mon, 20 Nov 2023 10:34:22 -0800 Subject: [PATCH 1/5] WIP --- script/bundle | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/bundle b/script/bundle index 4561cec7c4..417e286ec8 100755 --- a/script/bundle +++ b/script/bundle @@ -10,6 +10,7 @@ local_only=false overwrite_local_app=false bundle_name="" zed_crate="zed" +binary_name="Zed" # This must match the team in the provsiioning profile. APPLE_NOTORIZATION_TEAM="MQ55VZLNZQ" @@ -50,7 +51,10 @@ do target_dir="debug" ;; f) overwrite_local_app=true;; - 2) zed_crate="zed2";; + 2) + zed_crate="zed2" + binary_name="Zed2" + ;; h) help_info exit 0 @@ -116,7 +120,7 @@ if [ "$local_arch" = false ]; then echo "Creating fat binaries" lipo \ -create \ - target/{x86_64-apple-darwin,aarch64-apple-darwin}/${target_dir}/Zed \ + target/{x86_64-apple-darwin,aarch64-apple-darwin}/${target_dir}/${binary_name} \ -output \ "${app_path}/Contents/MacOS/${zed_crate}" lipo \ From babd41916af4fff75b81044a9f8c68f53747da17 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 20 Nov 2023 10:46:16 -0800 Subject: [PATCH 2/5] Remove gpui (1) dependencies from zed2 Co-authored-by: Mikayla --- Cargo.lock | 6 ++---- crates/channel2/Cargo.toml | 2 +- crates/collab_ui2/Cargo.toml | 2 +- crates/project_panel2/Cargo.toml | 1 - crates/project_panel2/src/project_panel.rs | 1 - crates/zed2/Cargo.toml | 1 - 6 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4153e0c8c6..904d99edf3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1398,7 +1398,7 @@ dependencies = [ "smol", "sum_tree", "tempfile", - "text", + "text2", "thiserror", "time", "tiny_http", @@ -1867,7 +1867,7 @@ dependencies = [ "editor2", "feature_flags2", "futures 0.3.28", - "fuzzy", + "fuzzy2", "gpui2", "language2", "lazy_static", @@ -6761,7 +6761,6 @@ dependencies = [ "anyhow", "client2", "collections", - "context_menu", "db2", "editor2", "futures 0.3.28", @@ -11632,7 +11631,6 @@ dependencies = [ "fs2", "fsevent", "futures 0.3.28", - "fuzzy", "go_to_line2", "gpui2", "ignore", diff --git a/crates/channel2/Cargo.toml b/crates/channel2/Cargo.toml index c292d4e8dd..7af5aa1224 100644 --- a/crates/channel2/Cargo.toml +++ b/crates/channel2/Cargo.toml @@ -18,7 +18,7 @@ db = { package = "db2", path = "../db2" } gpui = { package = "gpui2", path = "../gpui2" } util = { path = "../util" } rpc = { package = "rpc2", path = "../rpc2" } -text = { path = "../text" } +text = { package = "text2", path = "../text2" } language = { package = "language2", path = "../language2" } settings = { package = "settings2", path = "../settings2" } feature_flags = { package = "feature_flags2", path = "../feature_flags2" } diff --git a/crates/collab_ui2/Cargo.toml b/crates/collab_ui2/Cargo.toml index 4660880ecd..c7c00d7696 100644 --- a/crates/collab_ui2/Cargo.toml +++ b/crates/collab_ui2/Cargo.toml @@ -33,7 +33,7 @@ collections = { path = "../collections" } # drag_and_drop = { path = "../drag_and_drop" } editor = { package="editor2", path = "../editor2" } #feedback = { path = "../feedback" } -fuzzy = { path = "../fuzzy" } +fuzzy = { package = "fuzzy2", path = "../fuzzy2" } gpui = { package = "gpui2", path = "../gpui2" } language = { package = "language2", path = "../language2" } menu = { package = "menu2", path = "../menu2" } diff --git a/crates/project_panel2/Cargo.toml b/crates/project_panel2/Cargo.toml index bd6bc59a65..48abfbe1de 100644 --- a/crates/project_panel2/Cargo.toml +++ b/crates/project_panel2/Cargo.toml @@ -9,7 +9,6 @@ path = "src/project_panel.rs" doctest = false [dependencies] -context_menu = { path = "../context_menu" } collections = { path = "../collections" } db = { path = "../db2", package = "db2" } editor = { path = "../editor2", package = "editor2" } diff --git a/crates/project_panel2/src/project_panel.rs b/crates/project_panel2/src/project_panel.rs index 57ede0c961..333d2c6242 100644 --- a/crates/project_panel2/src/project_panel.rs +++ b/crates/project_panel2/src/project_panel.rs @@ -247,7 +247,6 @@ impl ProjectPanel { let mut old_dock_position = this.position(cx); ProjectPanelSettings::register(cx); cx.observe_global::(move |this, cx| { - dbg!("OLA!"); let new_dock_position = this.position(cx); if new_dock_position != old_dock_position { old_dock_position = new_dock_position; diff --git a/crates/zed2/Cargo.toml b/crates/zed2/Cargo.toml index 6b9169e65a..e7fa3a7e34 100644 --- a/crates/zed2/Cargo.toml +++ b/crates/zed2/Cargo.toml @@ -39,7 +39,6 @@ file_finder = { package="file_finder2", path = "../file_finder2" } # search = { path = "../search" } fs = { package = "fs2", path = "../fs2" } fsevent = { path = "../fsevent" } -fuzzy = { path = "../fuzzy" } go_to_line = { package = "go_to_line2", path = "../go_to_line2" } gpui = { package = "gpui2", path = "../gpui2" } install_cli = { package = "install_cli2", path = "../install_cli2" } From c571273ab43f164f3ec52523ceeb4cdb5435a598 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 20 Nov 2023 11:00:12 -0800 Subject: [PATCH 3/5] Allow bundling in debug mode with both architectures Co-authored-by: Mikayla --- script/bundle | 1 - 1 file changed, 1 deletion(-) diff --git a/script/bundle b/script/bundle index 417e286ec8..95a789885f 100755 --- a/script/bundle +++ b/script/bundle @@ -39,7 +39,6 @@ do export CARGO_INCREMENTAL=true export CARGO_BUNDLE_SKIP_BUILD=true build_flag=""; - local_arch=true target_dir="debug" ;; l) From 6e84f740aa2c47367da93d71d9353705cb006db7 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 20 Nov 2023 11:01:37 -0800 Subject: [PATCH 4/5] Set -e in bump-nightly script Co-authored-by: Mikayla --- script/bump-nightly | 2 ++ 1 file changed, 2 insertions(+) diff --git a/script/bump-nightly b/script/bump-nightly index 92cdd191eb..2b126d9afc 100755 --- a/script/bump-nightly +++ b/script/bump-nightly @@ -1,5 +1,7 @@ #!/bin/bash +set -e + branch=$(git rev-parse --abbrev-ref HEAD) if [ "$branch" != "main" ]; then echo "You must be on main to run this script" From 27318554872275e5cd9d013e5f383e69759ae406 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 20 Nov 2023 12:10:35 -0800 Subject: [PATCH 5/5] Fix error when building live_kit_client2 for two architectures concurrently Co-authored-by: Julia --- crates/live_kit_client2/build.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/live_kit_client2/build.rs b/crates/live_kit_client2/build.rs index b346b3168b..a2b7ef866d 100644 --- a/crates/live_kit_client2/build.rs +++ b/crates/live_kit_client2/build.rs @@ -61,12 +61,14 @@ fn build_bridge(swift_target: &SwiftTarget) { let swift_package_root = swift_package_root(); let swift_target_folder = swift_target_folder(); + let swift_cache_folder = swift_cache_folder(); if !Command::new("swift") .arg("build") .arg("--disable-automatic-resolution") .args(["--configuration", &env::var("PROFILE").unwrap()]) .args(["--triple", &swift_target.target.triple]) .args(["--build-path".into(), swift_target_folder]) + .args(["--cache-path".into(), swift_cache_folder]) .current_dir(&swift_package_root) .status() .unwrap() @@ -133,9 +135,17 @@ fn swift_package_root() -> PathBuf { } fn swift_target_folder() -> PathBuf { + let target = env::var("TARGET").unwrap(); env::current_dir() .unwrap() - .join(format!("../../target/{SWIFT_PACKAGE_NAME}")) + .join(format!("../../target/{target}/{SWIFT_PACKAGE_NAME}_target")) +} + +fn swift_cache_folder() -> PathBuf { + let target = env::var("TARGET").unwrap(); + env::current_dir() + .unwrap() + .join(format!("../../target/{target}/{SWIFT_PACKAGE_NAME}_cache")) } fn copy_dir(source: &Path, destination: &Path) {