From eadffde6e96b08b7016f44cdaba81d62a91198f2 Mon Sep 17 00:00:00 2001 From: Parker Loflin Date: Mon, 30 Nov 2026 21:06:49 +0000 Subject: [PATCH] Remove dead code, orphaned files, and unused config entries (#67664) ## Summary Removes code, files and config entries that nothing in the repository uses. Follow-up to the cleanups in #67126 through #67219. No behavior changes. - `project`: removes `SshLspAdapter`, which nothing has constructed since language server adapters moved to the remote server. Also removes `RepositorySnapshot::diff_stat_for_path` and its `Repository` wrapper, `BufferStore::loading_buffers` and `LocalLspStore::running_language_server_for_id`. - `git_ui`: removes `move_to_project_path` from `ProjectDiff` and `DiffMultibuffer`. #67149 removed their last caller. - `editor`: removes `DisplaySnapshot::reverse_text_chunks` and `DisplaySnapshot::excerpt_header_height`, and `BlockSnapshot`'s copy of the excerpt header height, which only the latter read. - `copilot`: removes the `setEditorInfo`, `notifyAccepted` and `notifyRejected` request types, which Zed no longer sends. - Removes unused helpers in `acp_thread`, `agent`, `client`, `collab`, `fs`, `git`, `markdown`, `settings_ui`, `text`, `ui`, `util` and `workspace`. `util` drops its `serde_json_lenient` dependency. - `edit_prediction_cli` drops its library target, which only held a private module. `cli` drops an uncalled `wait_for_socket` on Linux. - Deletes orphaned files: - 12 vim Neovim recordings for tests that were removed or don't use `NeovimBackedTestContext` - `script/seed-db`, which runs a removed `collab` subcommand, and `crates/collab/seed/github_users.json`, which only seeding read - `script/squawk` and its config, `script/upload-nightly.ps1` and its helper, and the dev drive scripts, which no workflow or script calls - `Dockerfile-cross.dockerignore`, `crates/db/README.md` and `assets/themes/.gitkeep` - Removes config entries for things that no longer exist: typos excludes and an ignore pattern, a clippy entry for the removed `cocoa` crate, license clarifications for crates no longer in `Cargo.lock`, `ci.yml` references in actionlint and `check-todos`, AGENTS.md links to deleted crash tooling, a dependency line in the `new-crate` template for a crate that no longer exists, and the unread `repl.output_max_width_columns` default with its docs. ### Suggested AGENTS.md additions > For `crates/vim`: `NeovimBackedTestContext` reads `test_data/.json`. When you remove or rename a Neovim-backed test, delete or rename its recording too; nothing flags orphaned recordings. ## Testing - No references to the removed items, files or settings key remain in the tree, including in other platforms' cfg-gated code, docs and scripts. - `./script/clippy` - `cargo check --workspace --all-targets` with `-D warnings`, with default features and with `--all-features` - `cargo fmt --all -- --check` - `cargo test -p xtask -- workspace::` - `cargo test -p vim -p util -p git -p text -p markdown -p fs` ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. Release Notes: - N/A --- .config/typos.toml | 9 - .github/actionlint.yml | 2 +- AGENTS.md | 3 - Cargo.lock | 1 - Dockerfile-cross.dockerignore | 16 - assets/settings/default.json | 3 - assets/themes/.gitkeep | 0 clippy.toml | 1 - crates/acp_thread/src/connection.rs | 10 - crates/agent/src/thread.rs | 7 - crates/cli/src/main.rs | 18 +- crates/client/src/client.rs | 4 - crates/collab/seed/github_users.json | 602 ------------------ crates/collab/src/db/tables/channel_member.rs | 18 +- crates/copilot/src/request.rs | 36 -- crates/db/README.md | 5 - crates/edit_prediction_cli/Cargo.toml | 3 - crates/edit_prediction_cli/src/lib.rs | 2 - crates/editor/src/display_map.rs | 25 - crates/editor/src/display_map/block_map.rs | 2 - crates/fs/src/fs.rs | 13 - crates/git/clippy.toml | 1 - crates/git/src/repository.rs | 20 - crates/git_ui/src/diff_multibuffer.rs | 24 - crates/git_ui/src/project_diff.rs | 11 - crates/markdown/src/markdown.rs | 4 - crates/project/src/buffer_store.rs | 19 +- crates/project/src/git_store.rs | 10 - crates/project/src/lsp_store.rs | 106 +-- crates/settings_ui/src/settings_ui.rs | 42 -- crates/text/src/text.rs | 6 - .../ui/src/components/button/toggle_button.rs | 15 - crates/util/Cargo.toml | 1 - crates/util/src/util.rs | 25 - crates/vim/test_data/test_builtin_marks.json | 36 -- .../test_change_sentence_object.json | 270 -------- .../vim/test_data/test_delete_paragraph.json | 14 - .../test_delete_sentence_object.json | 270 -------- .../test_digraph_insert_multicursor.json | 0 .../test_data/test_dot_repeat_registers.json | 125 ---- .../test_increment_zero_leading_zeros.json | 4 - crates/vim/test_data/test_marks.json | 15 - ...ng_positions_not_at_beginning_of_line.json | 0 crates/vim/test_data/test_period_mark.json | 14 - .../test_data/test_space_only_ascii_eol.json | 4 - .../test_visual_sentence_object.json | 0 crates/workspace/src/toast_layer.rs | 8 - docs/src/reference/all-settings.md | 1 - script/check-todos | 1 - script/exit-ci-if-dev-drive-is-full.ps1 | 22 - script/lib/blob-store.ps1 | 68 -- script/lib/squawk.toml | 11 - script/licenses/zed-licenses.toml | 12 - script/new-crate | 1 - script/seed-db | 4 - script/setup-dev-driver.ps1 | 39 -- script/squawk | 32 - script/upload-nightly.ps1 | 33 - 58 files changed, 7 insertions(+), 2041 deletions(-) delete mode 100644 Dockerfile-cross.dockerignore delete mode 100644 assets/themes/.gitkeep delete mode 100644 crates/collab/seed/github_users.json delete mode 100644 crates/db/README.md delete mode 100644 crates/edit_prediction_cli/src/lib.rs delete mode 100644 crates/vim/test_data/test_builtin_marks.json delete mode 100644 crates/vim/test_data/test_change_sentence_object.json delete mode 100644 crates/vim/test_data/test_delete_paragraph.json delete mode 100644 crates/vim/test_data/test_delete_sentence_object.json delete mode 100644 crates/vim/test_data/test_digraph_insert_multicursor.json delete mode 100644 crates/vim/test_data/test_dot_repeat_registers.json delete mode 100644 crates/vim/test_data/test_increment_zero_leading_zeros.json delete mode 100644 crates/vim/test_data/test_marks.json delete mode 100644 crates/vim/test_data/test_paragraph_object_with_landing_positions_not_at_beginning_of_line.json delete mode 100644 crates/vim/test_data/test_period_mark.json delete mode 100644 crates/vim/test_data/test_space_only_ascii_eol.json delete mode 100644 crates/vim/test_data/test_visual_sentence_object.json delete mode 100644 script/exit-ci-if-dev-drive-is-full.ps1 delete mode 100644 script/lib/blob-store.ps1 delete mode 100644 script/lib/squawk.toml delete mode 100755 script/seed-db delete mode 100644 script/setup-dev-driver.ps1 delete mode 100755 script/squawk delete mode 100644 script/upload-nightly.ps1 diff --git a/.config/typos.toml b/.config/typos.toml index 585080af2df..c7b230a5571 100644 --- a/.config/typos.toml +++ b/.config/typos.toml @@ -4,9 +4,6 @@ ignore-hidden = false extend-exclude = [ ".git/", - # Typewriter model names used for agent branch names aren't typos. - "crates/agent_ui/src/branch_names.rs", - # Contributor names aren't typos. ".mailmap", @@ -14,9 +11,6 @@ extend-exclude = [ "crates/extension_suggest/src/extension_suggest.rs", "crates/theme/src/icon_theme.rs", - # Some mock data is flagged as typos. - "crates/assistant_tools/src/web_search_tool.rs", - # Suppress false positives in database schema. "crates/collab/migrations/20251208000000_test_schema.sql", @@ -61,8 +55,6 @@ extend-exclude = [ "crates/project_panel/benches/linux_repo_snapshot.txt", # Some multibuffer test cases have word fragments that register as typos "crates/multi_buffer/src/multi_buffer_tests.rs", - # Macos apis - "crates/gpui_macos/src/dispatcher.rs", # Tests contain partially incomplete words (by design) "crates/edit_prediction_cli/src/split_commit.rs", "crates/edit_prediction_metrics/src/kept_rate.rs", @@ -77,7 +69,6 @@ extend-ignore-re = [ # PNG is a file format, not a typo "PNG", 'cl\[ist]', - '\[lan\]guage', '"ba"', "doas", # ProtoLS crate with tree-sitter Protobuf grammar. diff --git a/.github/actionlint.yml b/.github/actionlint.yml index 649c0f67cdb..a6ba6c0b8fb 100644 --- a/.github/actionlint.yml +++ b/.github/actionlint.yml @@ -46,6 +46,6 @@ self-hosted-runner: # unknown bug in actionlint where parsing of `runs-on: [ ]` # breaks something else. (yuck) paths: - .github/workflows/{ci,release_nightly}.yml: + .github/workflows/release_nightly.yml: ignore: - "shellcheck" diff --git a/AGENTS.md b/AGENTS.md index 6b21b01972a..d1718451934 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -160,10 +160,7 @@ Release Notes: # Crash Investigation ## Sentry Integration -- Crash investigation prompts: `.factory/prompts/crash/investigate.md` -- Crash fix prompts: `.factory/prompts/crash/fix.md` - Fetch crash reports: `script/sentry-fetch ` -- Generate investigation prompt from crash: `script/crash-to-prompt ` # Rules Hygiene diff --git a/Cargo.lock b/Cargo.lock index 1489bc3041d..ffb92e4c58f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19782,7 +19782,6 @@ dependencies = [ "schemars 1.0.4", "serde", "serde_json", - "serde_json_lenient", "shlex 2.0.1", "smol", "tempfile", diff --git a/Dockerfile-cross.dockerignore b/Dockerfile-cross.dockerignore deleted file mode 100644 index 337b4d42623..00000000000 --- a/Dockerfile-cross.dockerignore +++ /dev/null @@ -1,16 +0,0 @@ -.git -.github -**/.gitignore -**/.gitkeep -.gitattributes -.mailmap -**/target -zed.xcworkspace -.DS_Store -compose.yml -plugins/bin -script/node_modules -styles/node_modules -crates/collab/static/styles.css -vendor/bin -assets/themes/ diff --git a/assets/settings/default.json b/assets/settings/default.json index 8647c345f75..e639389ff9f 100644 --- a/assets/settings/default.json +++ b/assets/settings/default.json @@ -2893,9 +2893,6 @@ // Maximum number of lines of output to display before scrolling. // Set to 0 to disable output height limits. "output_max_height_lines": 0, - // Maximum number of columns of output to display before scaling images. - // Set to 0 to disable output width limits. - "output_max_width_columns": 0, }, // Vim settings "vim": { diff --git a/assets/themes/.gitkeep b/assets/themes/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/clippy.toml b/clippy.toml index 8e5ed6fd7f4..79220d5b907 100644 --- a/clippy.toml +++ b/clippy.toml @@ -15,7 +15,6 @@ disallowed-methods = [ { path = "smol::Timer::after", reason = "smol::Timer introduces non-determinism in tests", replacement = "gpui::BackgroundExecutor::timer" }, { path = "serde_json::from_reader", reason = "Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892. Use `serde_json::from_slice` instead." }, { path = "serde_json_lenient::from_reader", reason = "Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892, Use `serde_json_lenient::from_slice` instead." }, - { path = "cocoa::foundation::NSString::alloc", reason = "NSString must be autoreleased to avoid memory leaks. Use `ns_string()` helper instead." }, ] disallowed-types = [ # { path = "std::collections::HashMap", replacement = "collections::HashMap" }, diff --git a/crates/acp_thread/src/connection.rs b/crates/acp_thread/src/connection.rs index bfab1975a72..70eb7718689 100644 --- a/crates/acp_thread/src/connection.rs +++ b/crates/acp_thread/src/connection.rs @@ -906,16 +906,6 @@ impl PermissionOptions { } } - pub fn allow_once_option_id(&self) -> Option { - self.first_option_of_kind(acp_v2::PermissionOptionKind::AllowOnce) - .map(|option| option.option_id.clone()) - } - - pub fn deny_once_option_id(&self) -> Option { - self.first_option_of_kind(acp_v2::PermissionOptionKind::RejectOnce) - .map(|option| option.option_id.clone()) - } - /// Build a `SelectedPermissionOutcome` for the `DropdownWithPatterns` /// variant when the user has checked specific pattern indices. /// diff --git a/crates/agent/src/thread.rs b/crates/agent/src/thread.rs index 446e4d31400..5661737e08d 100644 --- a/crates/agent/src/thread.rs +++ b/crates/agent/src/thread.rs @@ -1978,13 +1978,6 @@ impl Thread { sandboxing_available_for_project(self.project.read(cx), cx) } - /// The directory subtrees the sandbox always grants write access to for this - /// thread's project (its worktree roots), derived from the same source the - /// terminal tool uses when it actually builds the sandbox. - pub fn sandbox_baseline_writable_paths(&self, cx: &App) -> Vec { - crate::sandboxing::sandbox_worktree_writable_paths(self.project.read(cx), cx) - } - /// A field added here must also go in `StreamingSaveKey`, unless saving it /// can wait until the response finishes streaming. pub fn to_db(&self, cx: &App) -> Task { diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index b986d5fed30..1601e4258be 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -847,11 +847,9 @@ mod linux { env, ffi::OsString, io, - os::unix::net::{SocketAddr, UnixDatagram}, + os::unix::net::UnixDatagram, path::{Path, PathBuf}, process::{self, ExitStatus}, - thread, - time::Duration, }; use anyhow::{Context as _, anyhow}; @@ -973,20 +971,6 @@ mod linux { Err(_) => Err(anyhow!(io::Error::last_os_error())), } } - - fn wait_for_socket( - &self, - sock_addr: &SocketAddr, - sock: &mut UnixDatagram, - ) -> Result<(), std::io::Error> { - for _ in 0..100 { - thread::sleep(Duration::from_millis(10)); - if sock.connect_addr(sock_addr).is_ok() { - return Ok(()); - } - } - sock.connect_addr(sock_addr) - } } } diff --git a/crates/client/src/client.rs b/crates/client/src/client.rs index 25aea02d18e..e232d502521 100644 --- a/crates/client/src/client.rs +++ b/crates/client/src/client.rs @@ -41,7 +41,6 @@ use std::{ convert::TryFrom, future::Future, marker::PhantomData, - path::PathBuf, sync::{ Arc, LazyLock, Weak, atomic::{AtomicU64, Ordering}, @@ -78,9 +77,6 @@ pub static ADMIN_API_TOKEN: LazyLock> = LazyLock::new(|| { .filter(|s| !s.is_empty()) }); -pub static ZED_APP_PATH: LazyLock> = - LazyLock::new(|| std::env::var("ZED_APP_PATH").ok().map(PathBuf::from)); - pub static ZED_ALWAYS_ACTIVE: LazyLock = LazyLock::new(|| std::env::var("ZED_ALWAYS_ACTIVE").is_ok_and(|e| !e.is_empty())); diff --git a/crates/collab/seed/github_users.json b/crates/collab/seed/github_users.json deleted file mode 100644 index 88acd6aa54a..00000000000 --- a/crates/collab/seed/github_users.json +++ /dev/null @@ -1,602 +0,0 @@ -[ - { - "id": 1, - "login": "mojombo", - "email": "tom@mojombo.com", - "created_at": "2007-10-20T05:24:19Z" - }, - { - "id": 2, - "login": "defunkt", - "email": null, - "created_at": "2007-10-20T05:24:19Z" - }, - { - "id": 3, - "login": "pjhyett", - "email": "pj@hyett.com", - "created_at": "2008-01-07T17:54:22Z" - }, - { - "id": 4, - "login": "wycats", - "email": "wycats@gmail.com", - "created_at": "2008-01-12T05:38:33Z" - }, - { - "id": 5, - "login": "ezmobius", - "email": null, - "created_at": "2008-01-12T07:51:46Z" - }, - { - "id": 6, - "login": "ivey", - "email": "ivey@gweezlebur.com", - "created_at": "2008-01-12T15:15:00Z" - }, - { - "id": 7, - "login": "evanphx", - "email": "evan@phx.io", - "created_at": "2008-01-12T16:46:24Z" - }, - { - "id": 17, - "login": "vanpelt", - "email": "vanpelt@wandb.com", - "created_at": "2008-01-13T05:57:18Z" - }, - { - "id": 18, - "login": "wayneeseguin", - "email": "wayneeseguin@gmail.com", - "created_at": "2008-01-13T06:02:21Z" - }, - { - "id": 19, - "login": "brynary", - "email": null, - "created_at": "2008-01-13T10:19:47Z" - }, - { - "id": 20, - "login": "kevinclark", - "email": "kevin.clark@gmail.com", - "created_at": "2008-01-13T18:33:26Z" - }, - { - "id": 21, - "login": "technoweenie", - "email": "technoweenie@hey.com", - "created_at": "2008-01-14T04:33:35Z" - }, - { - "id": 22, - "login": "macournoyer", - "email": "macournoyer@gmail.com", - "created_at": "2008-01-14T10:49:35Z" - }, - { - "id": 23, - "login": "takeo", - "email": "toby@takeo.email", - "created_at": "2008-01-14T11:25:49Z" - }, - { - "id": 25, - "login": "caged", - "email": "encytemedia@gmail.com", - "created_at": "2008-01-15T04:47:24Z" - }, - { - "id": 26, - "login": "topfunky", - "email": null, - "created_at": "2008-01-15T05:40:05Z" - }, - { - "id": 27, - "login": "anotherjesse", - "email": "anotherjesse@gmail.com", - "created_at": "2008-01-15T07:49:30Z" - }, - { - "id": 28, - "login": "roland", - "email": null, - "created_at": "2008-01-15T08:12:51Z" - }, - { - "id": 29, - "login": "lukas", - "email": "lukas@wandb.com", - "created_at": "2008-01-15T12:50:02Z" - }, - { - "id": 30, - "login": "fanvsfan", - "email": null, - "created_at": "2008-01-15T14:15:23Z" - }, - { - "id": 31, - "login": "tomtt", - "email": null, - "created_at": "2008-01-15T15:44:31Z" - }, - { - "id": 32, - "login": "railsjitsu", - "email": null, - "created_at": "2008-01-16T04:57:23Z" - }, - { - "id": 34, - "login": "nitay", - "email": null, - "created_at": "2008-01-18T14:09:11Z" - }, - { - "id": 35, - "login": "kevwil", - "email": null, - "created_at": "2008-01-19T05:50:12Z" - }, - { - "id": 36, - "login": "KirinDave", - "email": null, - "created_at": "2008-01-19T08:01:02Z" - }, - { - "id": 37, - "login": "jamesgolick", - "email": "jamesgolick@gmail.com", - "created_at": "2008-01-19T22:52:30Z" - }, - { - "id": 38, - "login": "atmos", - "email": "atmos@atmos.org", - "created_at": "2008-01-22T09:14:11Z" - }, - { - "id": 44, - "login": "errfree", - "email": null, - "created_at": "2008-01-24T02:08:37Z" - }, - { - "id": 45, - "login": "mojodna", - "email": null, - "created_at": "2008-01-24T04:40:22Z" - }, - { - "id": 46, - "login": "bmizerany", - "email": "blake.mizerany@gmail.com", - "created_at": "2008-01-24T04:44:30Z" - }, - { - "id": 47, - "login": "jnewland", - "email": "jesse@jnewland.com", - "created_at": "2008-01-25T02:28:12Z" - }, - { - "id": 48, - "login": "joshknowles", - "email": "joshknowles@gmail.com", - "created_at": "2008-01-25T21:30:42Z" - }, - { - "id": 49, - "login": "hornbeck", - "email": "hornbeck@gmail.com", - "created_at": "2008-01-25T21:49:23Z" - }, - { - "id": 50, - "login": "jwhitmire", - "email": "jeff@jwhitmire.com", - "created_at": "2008-01-25T22:07:48Z" - }, - { - "id": 51, - "login": "elbowdonkey", - "email": null, - "created_at": "2008-01-25T22:08:20Z" - }, - { - "id": 52, - "login": "reinh", - "email": null, - "created_at": "2008-01-25T22:16:29Z" - }, - { - "id": 53, - "login": "knzai", - "email": "git@knz.ai", - "created_at": "2008-01-25T22:33:10Z" - }, - { - "id": 68, - "login": "bs", - "email": "yap@bri.tt", - "created_at": "2008-01-27T01:46:29Z" - }, - { - "id": 69, - "login": "rsanheim", - "email": null, - "created_at": "2008-01-27T07:09:47Z" - }, - { - "id": 70, - "login": "schacon", - "email": "schacon@gmail.com", - "created_at": "2008-01-27T17:19:28Z" - }, - { - "id": 71, - "login": "uggedal", - "email": null, - "created_at": "2008-01-27T22:18:57Z" - }, - { - "id": 72, - "login": "bruce", - "email": "brwcodes@gmail.com", - "created_at": "2008-01-28T07:16:45Z" - }, - { - "id": 73, - "login": "sam", - "email": "ssmoot@gmail.com", - "created_at": "2008-01-28T19:01:26Z" - }, - { - "id": 74, - "login": "mmower", - "email": "self@mattmower.com", - "created_at": "2008-01-28T19:47:50Z" - }, - { - "id": 75, - "login": "abhay", - "email": null, - "created_at": "2008-01-28T21:08:23Z" - }, - { - "id": 76, - "login": "rabble", - "email": "evan@protest.net", - "created_at": "2008-01-28T23:27:02Z" - }, - { - "id": 77, - "login": "benburkert", - "email": "ben@benburkert.com", - "created_at": "2008-01-28T23:44:14Z" - }, - { - "id": 78, - "login": "indirect", - "email": "andre@arko.net", - "created_at": "2008-01-29T07:59:27Z" - }, - { - "id": 79, - "login": "fearoffish", - "email": "me@fearof.fish", - "created_at": "2008-01-29T08:43:10Z" - }, - { - "id": 80, - "login": "ry", - "email": "ry@tinyclouds.org", - "created_at": "2008-01-29T08:50:34Z" - }, - { - "id": 81, - "login": "engineyard", - "email": null, - "created_at": "2008-01-29T09:51:30Z" - }, - { - "id": 82, - "login": "jsierles", - "email": null, - "created_at": "2008-01-29T11:10:25Z" - }, - { - "id": 83, - "login": "tweibley", - "email": null, - "created_at": "2008-01-29T13:52:07Z" - }, - { - "id": 84, - "login": "peimei", - "email": "james@railsjitsu.com", - "created_at": "2008-01-29T15:44:11Z" - }, - { - "id": 85, - "login": "brixen", - "email": "brixen@gmail.com", - "created_at": "2008-01-29T16:47:55Z" - }, - { - "id": 87, - "login": "tmornini", - "email": null, - "created_at": "2008-01-29T18:43:39Z" - }, - { - "id": 88, - "login": "outerim", - "email": "lee@outerim.com", - "created_at": "2008-01-29T18:48:32Z" - }, - { - "id": 89, - "login": "daksis", - "email": null, - "created_at": "2008-01-29T19:18:16Z" - }, - { - "id": 90, - "login": "sr", - "email": "me@simonrozet.com", - "created_at": "2008-01-29T20:37:53Z" - }, - { - "id": 91, - "login": "lifo", - "email": null, - "created_at": "2008-01-29T23:09:30Z" - }, - { - "id": 92, - "login": "rsl", - "email": "sconds@gmail.com", - "created_at": "2008-01-29T23:13:36Z" - }, - { - "id": 93, - "login": "imownbey", - "email": null, - "created_at": "2008-01-29T23:13:44Z" - }, - { - "id": 94, - "login": "dylanegan", - "email": null, - "created_at": "2008-01-29T23:15:18Z" - }, - { - "id": 95, - "login": "jm", - "email": "jeremymcanally@gmail.com", - "created_at": "2008-01-29T23:15:32Z" - }, - { - "id": 100, - "login": "kmarsh", - "email": "kevin.marsh@gmail.com", - "created_at": "2008-01-29T23:48:24Z" - }, - { - "id": 101, - "login": "jvantuyl", - "email": "jayson@aggressive.ly", - "created_at": "2008-01-30T01:11:50Z" - }, - { - "id": 102, - "login": "BrianTheCoder", - "email": "wbsmith83@gmail.com", - "created_at": "2008-01-30T02:22:32Z" - }, - { - "id": 103, - "login": "freeformz", - "email": "freeformz@gmail.com", - "created_at": "2008-01-30T06:19:57Z" - }, - { - "id": 104, - "login": "hassox", - "email": "dneighman@gmail.com", - "created_at": "2008-01-30T06:31:06Z" - }, - { - "id": 105, - "login": "automatthew", - "email": "automatthew@gmail.com", - "created_at": "2008-01-30T19:00:58Z" - }, - { - "id": 106, - "login": "queso", - "email": "Joshua.owens@gmail.com", - "created_at": "2008-01-30T19:48:45Z" - }, - { - "id": 107, - "login": "lancecarlson", - "email": null, - "created_at": "2008-01-30T19:53:29Z" - }, - { - "id": 108, - "login": "drnic", - "email": "drnicwilliams@gmail.com", - "created_at": "2008-01-30T23:19:18Z" - }, - { - "id": 109, - "login": "lukesutton", - "email": null, - "created_at": "2008-01-31T04:01:02Z" - }, - { - "id": 110, - "login": "danwrong", - "email": null, - "created_at": "2008-01-31T08:51:31Z" - }, - { - "id": 111, - "login": "HamptonMakes", - "email": "hampton@hamptoncatlin.com", - "created_at": "2008-01-31T17:03:51Z" - }, - { - "id": 112, - "login": "jfrost", - "email": null, - "created_at": "2008-01-31T22:14:27Z" - }, - { - "id": 113, - "login": "mattetti", - "email": null, - "created_at": "2008-01-31T22:56:31Z" - }, - { - "id": 114, - "login": "ctennis", - "email": "c@leb.tennis", - "created_at": "2008-01-31T23:43:14Z" - }, - { - "id": 115, - "login": "lawrencepit", - "email": "lawrence.pit@gmail.com", - "created_at": "2008-01-31T23:57:16Z" - }, - { - "id": 116, - "login": "marcjeanson", - "email": "github@marcjeanson.com", - "created_at": "2008-02-01T01:27:19Z" - }, - { - "id": 117, - "login": "grempe", - "email": null, - "created_at": "2008-02-01T04:12:42Z" - }, - { - "id": 118, - "login": "peterc", - "email": "git@peterc.org", - "created_at": "2008-02-02T01:00:36Z" - }, - { - "id": 119, - "login": "ministrycentered", - "email": null, - "created_at": "2008-02-02T03:50:26Z" - }, - { - "id": 120, - "login": "afarnham", - "email": null, - "created_at": "2008-02-02T05:11:03Z" - }, - { - "id": 121, - "login": "up_the_irons", - "email": null, - "created_at": "2008-02-02T10:59:51Z" - }, - { - "id": 122, - "login": "cristibalan", - "email": "cristibalan@gmail.com", - "created_at": "2008-02-02T11:29:45Z" - }, - { - "id": 123, - "login": "heavysixer", - "email": null, - "created_at": "2008-02-02T15:06:53Z" - }, - { - "id": 124, - "login": "brosner", - "email": "brosner@gmail.com", - "created_at": "2008-02-02T19:03:54Z" - }, - { - "id": 125, - "login": "danielmorrison", - "email": "daniel@collectiveidea.com", - "created_at": "2008-02-02T19:46:35Z" - }, - { - "id": 126, - "login": "danielharan", - "email": "chebuctonian@gmail.com", - "created_at": "2008-02-02T21:42:21Z" - }, - { - "id": 127, - "login": "kvnsmth", - "email": null, - "created_at": "2008-02-02T22:00:03Z" - }, - { - "id": 128, - "login": "collectiveidea", - "email": "info@collectiveidea.com", - "created_at": "2008-02-02T22:34:46Z" - }, - { - "id": 129, - "login": "canadaduane", - "email": "duane.johnson@gmail.com", - "created_at": "2008-02-02T23:25:39Z" - }, - { - "id": 130, - "login": "corasaurus-hex", - "email": "cora@sutton.me", - "created_at": "2008-02-03T04:20:22Z" - }, - { - "id": 131, - "login": "dstrelau", - "email": null, - "created_at": "2008-02-03T14:59:12Z" - }, - { - "id": 132, - "login": "sunny", - "email": "sunny@sunfox.org", - "created_at": "2008-02-03T15:43:43Z" - }, - { - "id": 133, - "login": "dkubb", - "email": "github@dan.kubb.ca", - "created_at": "2008-02-03T20:40:13Z" - }, - { - "id": 134, - "login": "jnicklas", - "email": "jonas@jnicklas.com", - "created_at": "2008-02-03T20:43:50Z" - }, - { - "id": 135, - "login": "richcollins", - "email": "richcollins@gmail.com", - "created_at": "2008-02-03T21:11:25Z" - } -] diff --git a/crates/collab/src/db/tables/channel_member.rs b/crates/collab/src/db/tables/channel_member.rs index 7116b92ab63..0d86087672c 100644 --- a/crates/collab/src/db/tables/channel_member.rs +++ b/crates/collab/src/db/tables/channel_member.rs @@ -1,4 +1,4 @@ -use crate::db::{ChannelId, ChannelMemberId, ChannelRole, UserId, channel_member}; +use crate::db::{ChannelId, ChannelMemberId, ChannelRole, UserId}; use rpc::proto; use sea_orm::entity::prelude::*; @@ -57,19 +57,3 @@ impl Related for Entity { Relation::User.def() } } - -#[derive(Debug)] -pub struct UserToChannel; - -impl Linked for UserToChannel { - type FromEntity = super::user::Entity; - - type ToEntity = super::channel::Entity; - - fn link(&self) -> Vec { - vec![ - channel_member::Relation::User.def().rev(), - channel_member::Relation::Channel.def(), - ] - } -} diff --git a/crates/copilot/src/request.rs b/crates/copilot/src/request.rs index a8739438f37..1dbb26a74ab 100644 --- a/crates/copilot/src/request.rs +++ b/crates/copilot/src/request.rs @@ -90,8 +90,6 @@ impl lsp::notification::Notification for DidChangeStatus { const METHOD: &'static str = "didChangeStatus"; } -pub enum SetEditorInfo {} - #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct SetEditorInfoParams { @@ -99,12 +97,6 @@ pub struct SetEditorInfoParams { pub editor_plugin_info: EditorPluginInfo, } -impl lsp::request::Request for SetEditorInfo { - type Params = SetEditorInfoParams; - type Result = String; - const METHOD: &'static str = "setEditorInfo"; -} - #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct EditorInfo { @@ -119,34 +111,6 @@ pub struct EditorPluginInfo { pub version: String, } -pub enum NotifyAccepted {} - -#[derive(Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct NotifyAcceptedParams { - pub uuid: String, -} - -impl lsp::request::Request for NotifyAccepted { - type Params = NotifyAcceptedParams; - type Result = String; - const METHOD: &'static str = "notifyAccepted"; -} - -pub enum NotifyRejected {} - -#[derive(Debug, Serialize, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct NotifyRejectedParams { - pub uuids: Vec, -} - -impl lsp::request::Request for NotifyRejected { - type Params = NotifyRejectedParams; - type Result = String; - const METHOD: &'static str = "notifyRejected"; -} - #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NextEditSuggestions; diff --git a/crates/db/README.md b/crates/db/README.md deleted file mode 100644 index b734a2e3a33..00000000000 --- a/crates/db/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Building Queries - -First, craft your test data. The examples folder shows a template for building a test-db, and can be ran with `cargo run --example [your-example]`. - -To actually use and test your queries, import the generated DB file into https://sqliteonline.com/ diff --git a/crates/edit_prediction_cli/Cargo.toml b/crates/edit_prediction_cli/Cargo.toml index f01e87ac0eb..59b5ffa00f5 100644 --- a/crates/edit_prediction_cli/Cargo.toml +++ b/crates/edit_prediction_cli/Cargo.toml @@ -8,9 +8,6 @@ license = "GPL-3.0-or-later" [lints] workspace = true -[lib] -path = "src/lib.rs" - [[bin]] name = "ep" path = "src/main.rs" diff --git a/crates/edit_prediction_cli/src/lib.rs b/crates/edit_prediction_cli/src/lib.rs deleted file mode 100644 index c47a3e53f35..00000000000 --- a/crates/edit_prediction_cli/src/lib.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[allow(dead_code)] -mod word_diff; diff --git a/crates/editor/src/display_map.rs b/crates/editor/src/display_map.rs index 53ca35f3ea4..4d16031e350 100644 --- a/crates/editor/src/display_map.rs +++ b/crates/editor/src/display_map.rs @@ -1855,27 +1855,6 @@ impl DisplaySnapshot { .map(|h| h.text) } - /// Returns text chunks starting at the end of the given display row in reverse until the start of the file - #[instrument(skip_all)] - pub fn reverse_text_chunks(&self, display_row: DisplayRow) -> impl Iterator { - (0..=display_row.0).rev().flat_map(move |row| { - self.block_snapshot - .chunks( - BlockRow(row)..BlockRow(row + 1), - LanguageAwareStyling { - tree_sitter: false, - diagnostics: false, - }, - self.masked, - Highlights::default(), - ) - .map(|h| h.text) - .collect::>() - .into_iter() - .rev() - }) - } - #[instrument(skip_all)] pub fn chunks( &self, @@ -2502,10 +2481,6 @@ impl DisplaySnapshot { self.block_snapshot.buffer_header_height } - pub fn excerpt_header_height(&self) -> u32 { - self.block_snapshot.excerpt_header_height - } - /// Given a `DisplayPoint`, returns another `DisplayPoint` corresponding to /// the start of the buffer row that is a given number of buffer rows away /// from the provided point. diff --git a/crates/editor/src/display_map/block_map.rs b/crates/editor/src/display_map/block_map.rs index a6a9a323fdc..6bbc2f346d5 100644 --- a/crates/editor/src/display_map/block_map.rs +++ b/crates/editor/src/display_map/block_map.rs @@ -77,7 +77,6 @@ pub struct BlockSnapshot { transforms: SumTree, custom_blocks_by_id: TreeMap>, pub(super) buffer_header_height: u32, - pub(super) excerpt_header_height: u32, pub(super) buffers_with_disabled_headers: HashSet, } @@ -697,7 +696,6 @@ impl BlockMap { transforms: self.transforms.borrow().clone(), custom_blocks_by_id: self.custom_blocks_by_id.clone(), buffer_header_height: self.buffer_header_height, - excerpt_header_height: self.excerpt_header_height, buffers_with_disabled_headers: self.buffers_with_disabled_headers.clone(), }, } diff --git a/crates/fs/src/fs.rs b/crates/fs/src/fs.rs index 22c2280008a..a9b8eb42974 100644 --- a/crates/fs/src/fs.rs +++ b/crates/fs/src/fs.rs @@ -615,8 +615,6 @@ impl FileHandle for std::fs::File { } } -pub struct RealWatcher {} - const FILE_LOCK_INITIAL_RETRY_DELAY: Duration = Duration::from_millis(5); const FILE_LOCK_MAX_RETRY_DELAY: Duration = Duration::from_millis(250); @@ -1591,17 +1589,6 @@ impl Fs for RealFs { } } -#[cfg(not(any(target_os = "linux", target_os = "freebsd")))] -impl Watcher for RealWatcher { - fn add(&self, _: &Path) -> Result<()> { - Ok(()) - } - - fn remove(&self, _: &Path) -> Result<()> { - Ok(()) - } -} - #[cfg(feature = "test-support")] pub struct FakeFs { this: std::sync::Weak, diff --git a/crates/git/clippy.toml b/crates/git/clippy.toml index fb392684049..c7fa5ed7fcd 100644 --- a/crates/git/clippy.toml +++ b/crates/git/clippy.toml @@ -15,7 +15,6 @@ disallowed-methods = [ { path = "smol::Timer::after", reason = "smol::Timer introduces non-determinism in tests", replacement = "gpui::BackgroundExecutor::timer" }, { path = "serde_json::from_reader", reason = "Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892. Use `serde_json::from_slice` instead." }, { path = "serde_json_lenient::from_reader", reason = "Parsing from a buffer is much slower than first reading the buffer into a Vec/String, see https://github.com/serde-rs/json/issues/160#issuecomment-253446892, Use `serde_json_lenient::from_slice` instead." }, - { path = "cocoa::foundation::NSString::alloc", reason = "NSString must be autoreleased to avoid memory leaks. Use `ns_string()` helper instead." }, { path = "smol::process::Command::new", reason = "Git commands must go through `GitBinary::build_command` to ensure security flags like `-c core.fsmonitor=false` are always applied.", replacement = "GitBinary::build_command" }, { path = "util::command::new_command", reason = "Git commands must go through `GitBinary::build_command` to ensure security flags like `-c core.fsmonitor=false` are always applied.", replacement = "GitBinary::build_command" }, { path = "util::command::Command::new", reason = "Git commands must go through `GitBinary::build_command` to ensure security flags like `-c core.fsmonitor=false` are always applied.", replacement = "GitBinary::build_command" }, diff --git a/crates/git/src/repository.rs b/crates/git/src/repository.rs index 14ee178700a..a6ccbaf326b 100644 --- a/crates/git/src/repository.rs +++ b/crates/git/src/repository.rs @@ -30,11 +30,9 @@ use std::process::{ExitStatus, Output}; use std::str::FromStr; use std::time::SystemTime; use std::{ - cmp::Ordering, path::{Path, PathBuf}, sync::Arc, }; -use sum_tree::MapSeekTarget; use thiserror::Error; use util::command::{Stdio, new_command}; use util::paths::PathStyle; @@ -4111,11 +4109,6 @@ impl RepoPath { Ok(Self::from_rel_path(rel_path)) } - pub fn from_std_path(path: &Path, path_style: PathStyle) -> Result { - let rel_path = RelPath::new(path, path_style)?; - Ok(Self::from_rel_path(&rel_path)) - } - pub fn from_proto(proto: &str) -> Result { let rel_path = RelPath::from_unix_str(proto)?.into(); Ok(Self(rel_path)) @@ -4153,19 +4146,6 @@ impl std::ops::Deref for RepoPath { } } -#[derive(Debug)] -pub struct RepoPathDescendants<'a>(pub &'a RepoPath); - -impl MapSeekTarget for RepoPathDescendants<'_> { - fn cmp_cursor(&self, key: &RepoPath) -> Ordering { - if key.starts_with(self.0) { - Ordering::Greater - } else { - self.0.cmp(key) - } - } -} - fn parse_remote_default_branch(input: &str) -> Option { let symrefs = input .split('\n') diff --git a/crates/git_ui/src/diff_multibuffer.rs b/crates/git_ui/src/diff_multibuffer.rs index 02d73bba295..c4d263998d8 100644 --- a/crates/git_ui/src/diff_multibuffer.rs +++ b/crates/git_ui/src/diff_multibuffer.rs @@ -224,30 +224,6 @@ impl DiffMultibuffer { self.move_to_path(path_key, window, cx) } - pub(crate) fn move_to_project_path( - &mut self, - project_path: &ProjectPath, - window: &mut Window, - cx: &mut Context, - ) { - let Some(git_repo) = self.branch_diff.read(cx).repo() else { - return; - }; - let Some(repo_path) = git_repo - .read(cx) - .project_path_to_repo_path(project_path, cx) - else { - return; - }; - let status = git_repo - .read(cx) - .status_for_path(&repo_path) - .map(|entry| entry.status) - .unwrap_or(FileStatus::Untracked); - let path_key = project_diff_path_key(&git_repo.read(cx), &repo_path, status, cx); - self.move_to_path(path_key, window, cx) - } - pub(crate) fn move_to_beginning(&mut self, window: &mut Window, cx: &mut Context) { self.editor.update(cx, |editor, cx| { editor.rhs_editor().update(cx, |editor, cx| { diff --git a/crates/git_ui/src/project_diff.rs b/crates/git_ui/src/project_diff.rs index 01d5aee125e..595fa01f065 100644 --- a/crates/git_ui/src/project_diff.rs +++ b/crates/git_ui/src/project_diff.rs @@ -276,17 +276,6 @@ impl ProjectDiff { .update(cx, |diff, cx| diff.move_to_entry(entry, window, cx)); } - pub fn move_to_project_path( - &mut self, - project_path: &ProjectPath, - window: &mut Window, - cx: &mut Context, - ) { - self.diff.update(cx, |diff, cx| { - diff.move_to_project_path(project_path, window, cx) - }); - } - fn move_to_beginning(&mut self, window: &mut Window, cx: &mut Context) { self.diff .update(cx, |diff, cx| diff.move_to_beginning(window, cx)); diff --git a/crates/markdown/src/markdown.rs b/crates/markdown/src/markdown.rs index 0fbaf37f1e2..71e52963af5 100644 --- a/crates/markdown/src/markdown.rs +++ b/crates/markdown/src/markdown.rs @@ -1572,10 +1572,6 @@ impl ParsedMarkdown { &self.events } - pub fn root_block_starts(&self) -> &Arc<[usize]> { - &self.root_block_starts - } - /// The source offset of the first block that renders anything. Leading blank lines and /// HTML blocks that render nothing (such as a comment) come before it, so this is the /// block that sits at the top of the rendered markdown. diff --git a/crates/project/src/buffer_store.rs b/crates/project/src/buffer_store.rs index b8a5e277d91..5d9bafa3c7e 100644 --- a/crates/project/src/buffer_store.rs +++ b/crates/project/src/buffer_store.rs @@ -6,7 +6,7 @@ use crate::{ use anyhow::{Context as _, Result, anyhow}; use client::Client; use collections::{HashMap, HashSet, hash_map}; -use futures::{Future, FutureExt as _, StreamExt as _, channel::oneshot, future::Shared}; +use futures::{FutureExt as _, StreamExt as _, channel::oneshot, future::Shared}; use gpui::{ App, AppContext as _, AsyncApp, Context, Entity, EventEmitter, Subscription, Task, TaskExt, WeakEntity, @@ -1095,23 +1095,6 @@ impl BufferStore { !self.non_searchable_buffers.contains(&id) } - pub fn loading_buffers( - &self, - ) -> impl Iterator>>)> { - self.loading_buffers.iter().map(|(path, task)| { - let task = task.clone(); - (path, async move { - task.await.map_err(|e| { - if e.error_code() != ErrorCode::Internal { - anyhow!(e.error_code()) - } else { - anyhow!("{e}") - } - }) - }) - }) - } - pub fn buffer_id_for_project_path(&self, project_path: &ProjectPath) -> Option<&BufferId> { self.path_to_buffer_id.get(project_path) } diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index 7cdd8829da0..e586997661c 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -6426,12 +6426,6 @@ impl RepositorySnapshot { .cloned() } - pub fn diff_stat_for_path(&self, path: &RepoPath) -> Option { - self.statuses_by_path - .get(&PathKey(path.as_ref().clone()), ()) - .and_then(|entry| entry.diff_stat) - } - pub fn abs_path_to_repo_path(&self, abs_path: &Path) -> Option { Self::abs_path_to_repo_path_inner(&self.work_directory_abs_path, abs_path, self.path_style) } @@ -7136,10 +7130,6 @@ impl Repository { self.snapshot.status() } - pub fn diff_stat_for_path(&self, path: &RepoPath) -> Option { - self.snapshot.diff_stat_for_path(path) - } - pub fn cached_stash(&self) -> GitStash { self.snapshot.stash_entries.clone() } diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index a78c8d98cbf..88d9f673179 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -79,10 +79,9 @@ use language::{ Bias, BinaryStatus, Buffer, BufferRow, BufferSnapshot, CachedLspAdapter, Capability, CodeLabel, CodeLabelExt, Diagnostic, DiagnosticEntry, DiagnosticMessage, DiagnosticSet, DiagnosticSourceKind, Diff, File as _, Language, LanguageAwareStyling, LanguageName, - LanguageRegistry, LocalFile, LspAdapter, LspAdapterDelegate, LspInstaller, ManifestDelegate, - ManifestName, ModelineSettings, OffsetUtf16, Patch, PointUtf16, RelatedInformation, - RelatedLocation, TextBufferSnapshot, ToOffset, ToOffsetUtf16, ToPointUtf16, Toolchain, - Transaction, Unclipped, + LanguageRegistry, LocalFile, LspAdapter, LspAdapterDelegate, ManifestDelegate, ManifestName, + ModelineSettings, OffsetUtf16, Patch, PointUtf16, RelatedInformation, RelatedLocation, + TextBufferSnapshot, ToOffset, ToOffsetUtf16, ToPointUtf16, Toolchain, Transaction, Unclipped, language_settings::{ AllLanguageSettings, FormatOnSave, Formatter, LanguageSettings, LineEndingSetting, all_language_settings, @@ -425,19 +424,6 @@ enum LanguageServerStartMode { } impl LocalLspStore { - /// Returns the running language server for the given ID. Note if the language server is starting, it will not be returned. - pub fn running_language_server_for_id( - &self, - id: LanguageServerId, - ) -> Option<&Arc> { - let language_server_state = self.language_servers.get(&id)?; - - match language_server_state { - LanguageServerState::Running { server, .. } => Some(server), - LanguageServerState::Starting { .. } => None, - } - } - fn can_start_language_server(&self, name: &LanguageServerName) -> bool { self.language_server_start_overrides .get(name) @@ -16950,92 +16936,6 @@ pub fn glob_literal_prefix(glob: &Path) -> PathBuf { .collect() } -pub struct SshLspAdapter { - name: LanguageServerName, - binary: LanguageServerBinary, - initialization_options: Option, - code_action_kinds: Option>, -} - -impl SshLspAdapter { - pub fn new( - name: LanguageServerName, - binary: LanguageServerBinary, - initialization_options: Option, - code_action_kinds: Option, - ) -> Self { - Self { - name, - binary, - initialization_options, - code_action_kinds: code_action_kinds - .as_ref() - .and_then(|c| serde_json::from_str(c).ok()), - } - } -} - -impl LspInstaller for SshLspAdapter { - type BinaryVersion = (); - async fn check_if_user_installed( - &self, - _: &Arc, - _: Option, - _: &AsyncApp, - ) -> Option { - Some(self.binary.clone()) - } - - async fn cached_server_binary( - &self, - _: PathBuf, - _: &dyn LspAdapterDelegate, - ) -> Option { - None - } - - async fn fetch_latest_server_version( - &self, - _: &Arc, - _: bool, - _: &mut AsyncApp, - ) -> Result<()> { - anyhow::bail!("SshLspAdapter does not support fetch_latest_server_version") - } - - fn fetch_server_binary( - &self, - _: (), - _: PathBuf, - _: &Arc, - ) -> impl Send + Future> + use<> { - async { anyhow::bail!("SshLspAdapter does not support fetch_server_binary") } - } -} - -#[async_trait(?Send)] -impl LspAdapter for SshLspAdapter { - fn name(&self) -> LanguageServerName { - self.name.clone() - } - - async fn initialization_options( - self: Arc, - _: &Arc, - _: &mut AsyncApp, - ) -> Result> { - let Some(options) = &self.initialization_options else { - return Ok(None); - }; - let result = serde_json::from_str(options)?; - Ok(result) - } - - fn code_action_kinds(&self) -> Option> { - self.code_action_kinds.clone() - } -} - pub fn language_server_settings<'a>( delegate: &'a dyn LspAdapterDelegate, language: &LanguageServerName, diff --git a/crates/settings_ui/src/settings_ui.rs b/crates/settings_ui/src/settings_ui.rs index b59b03276e9..483a9fe13d8 100644 --- a/crates/settings_ui/src/settings_ui.rs +++ b/crates/settings_ui/src/settings_ui.rs @@ -4520,48 +4520,6 @@ impl SettingsWindow { false } - /// Navigate to a setting by its json_path. - /// Clears the sub-page stack and scrolls to the setting item. - /// Returns true if the setting was found, false otherwise. - pub fn navigate_to_setting( - &mut self, - json_path: &str, - window: &mut Window, - cx: &mut Context, - ) -> bool { - self.sub_page_stack.clear(); - - for (page_index, page) in self.pages.iter().enumerate() { - for (item_index, item) in page.items.iter().enumerate() { - let item_json_path = match item { - SettingsPageItem::SettingItem(setting_item) => setting_item.field.json_path(), - SettingsPageItem::DynamicItem(dynamic_item) => { - dynamic_item.discriminant.field.json_path() - } - _ => None, - }; - if item_json_path == Some(json_path) { - if let Some(navbar_entry_index) = self - .navbar_entries - .iter() - .position(|e| e.page_index == page_index && e.is_root) - { - self.open_and_scroll_to_navbar_entry( - navbar_entry_index, - None, - false, - window, - cx, - ); - self.scroll_to_content_item(item_index, window, cx); - return true; - } - } - } - } - false - } - pub(crate) fn pop_sub_page(&mut self, window: &mut Window, cx: &mut Context) { self.regex_validation_error = None; self.sandbox_host_validation_error = None; diff --git a/crates/text/src/text.rs b/crates/text/src/text.rs index 6718afdecb5..ffe1c96199c 100644 --- a/crates/text/src/text.rs +++ b/crates/text/src/text.rs @@ -138,12 +138,6 @@ pub struct Transaction { pub start: clock::Global, } -impl Transaction { - pub fn merge_in(&mut self, other: Transaction) { - self.edit_ids.extend(other.edit_ids); - } -} - impl HistoryEntry { pub fn transaction_id(&self) -> TransactionId { self.transaction.id diff --git a/crates/ui/src/components/button/toggle_button.rs b/crates/ui/src/components/button/toggle_button.rs index 9424ddc28fe..1dba22d9f9f 100644 --- a/crates/ui/src/components/button/toggle_button.rs +++ b/crates/ui/src/components/button/toggle_button.rs @@ -18,21 +18,6 @@ pub struct ToggleButtonPosition { } impl ToggleButtonPosition { - pub const HORIZONTAL_FIRST: Self = Self { - leftmost: true, - ..Self::HORIZONTAL_MIDDLE - }; - pub const HORIZONTAL_MIDDLE: Self = Self { - leftmost: false, - rightmost: false, - topmost: true, - bottommost: true, - }; - pub const HORIZONTAL_LAST: Self = Self { - rightmost: true, - ..Self::HORIZONTAL_MIDDLE - }; - pub(crate) fn to_rounding(self) -> ButtonLikeRounding { ButtonLikeRounding { top_left: self.topmost && self.leftmost, diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.toml index 571f21a4d86..da0913ac9e1 100644 --- a/crates/util/Cargo.toml +++ b/crates/util/Cargo.toml @@ -31,7 +31,6 @@ rust-embed.workspace = true schemars = { workspace = true, features = ["derive"] } serde = { workspace = true, features = ["derive"] } serde_json.workspace = true -serde_json_lenient.workspace = true tempfile = { workspace = true, optional = true } unicase.workspace = true url.workspace = true diff --git a/crates/util/src/util.rs b/crates/util/src/util.rs index a06f850eded..48e224c08c1 100644 --- a/crates/util/src/util.rs +++ b/crates/util/src/util.rs @@ -445,31 +445,6 @@ pub fn set_pre_exec_to_start_new_session( command } -pub fn merge_json_lenient_value_into( - source: serde_json_lenient::Value, - target: &mut serde_json_lenient::Value, -) { - match (source, target) { - (serde_json_lenient::Value::Object(source), serde_json_lenient::Value::Object(target)) => { - for (key, value) in source { - if let Some(target) = target.get_mut(&key) { - merge_json_lenient_value_into(value, target); - } else { - target.insert(key, value); - } - } - } - - (serde_json_lenient::Value::Array(source), serde_json_lenient::Value::Array(target)) => { - for value in source { - target.push(value); - } - } - - (source, target) => *target = source, - } -} - /// Merges `source` into `target`: objects are merged recursively, key by key; /// any other colliding value in `target` — including arrays — is replaced by /// `source`'s value wholesale. diff --git a/crates/vim/test_data/test_builtin_marks.json b/crates/vim/test_data/test_builtin_marks.json deleted file mode 100644 index 0d05385960a..00000000000 --- a/crates/vim/test_data/test_builtin_marks.json +++ /dev/null @@ -1,36 +0,0 @@ -{"Put":{"state":"Line one\nLine two\nLine ˇthree\nLine four\nLine five\n"}} -{"Key":"v"} -{"Key":"j"} -{"Key":"escape"} -{"Key":"k"} -{"Key":"k"} -{"Key":"'"} -{"Key":"<"} -{"Get":{"state":"Line one\nLine two\nˇLine three\nLine four\nLine five\n","mode":"Normal"}} -{"Key":"`"} -{"Key":"<"} -{"Get":{"state":"Line one\nLine two\nLine ˇthree\nLine four\nLine five\n","mode":"Normal"}} -{"Key":"'"} -{"Key":">"} -{"Get":{"state":"Line one\nLine two\nLine three\nˇLine four\nLine five\n","mode":"Normal"}} -{"Key":"`"} -{"Key":">"} -{"Get":{"state":"Line one\nLine two\nLine three\nLine ˇfour\nLine five\n","mode":"Normal"}} -{"Key":"g"} -{"Key":"g"} -{"Key":"^"} -{"Key":"j"} -{"Key":"j"} -{"Key":"l"} -{"Key":"l"} -{"Key":"c"} -{"Key":"e"} -{"Key":"k"} -{"Key":"e"} -{"Key":"escape"} -{"Key":"'"} -{"Key":"."} -{"Get":{"state":"Line one\nLine two\nˇLike three\nLine four\nLine five\n","mode":"Normal"}} -{"Key":"`"} -{"Key":"."} -{"Get":{"state":"Line one\nLine two\nLiˇke three\nLine four\nLine five\n","mode":"Normal"}} diff --git a/crates/vim/test_data/test_change_sentence_object.json b/crates/vim/test_data/test_change_sentence_object.json deleted file mode 100644 index 4afbae2713e..00000000000 --- a/crates/vim/test_data/test_change_sentence_object.json +++ /dev/null @@ -1,270 +0,0 @@ -{"Put":{"state":"ˇThe quick brown? Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Fox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick ˇbrown? Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Fox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brownˇ? Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Fox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown?ˇ Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown?ˇFox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? ˇFox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇ Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jˇumps! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇ Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumpsˇ! Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇ Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps!ˇ Over the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇOver the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps! Ovˇer the lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps! ˇ","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over theˇ lazy."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps! ˇ","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over the lazyˇ."}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps! ˇ","mode":"Insert"}} -{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick ˇbrown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brownˇ\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy doˇg. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇThe quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. ˇThe quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog. ˇ\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. The quick ˇ\nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog. ˇ\n","mode":"Insert"}} -{"Put":{"state":"ˇThe quick brown.)]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The ˇquick brown.)]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brownˇ.)]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)ˇ]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]ˇ'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'ˇ\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'\" Brown ˇfox jumps. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" ˇ ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'\" Brown fox jumpsˇ. "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" ˇ ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'\" Brown fox jumps.ˇ "}} -{"Key":"c"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" Brown fox jumps.ˇ","mode":"Insert"}} -{"Put":{"state":"ˇThe quick brown? Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇFox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick ˇbrown? Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇFox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brownˇ? Fox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇFox Jumps! Over the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? ˇFox Jumps! Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇOver the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jˇumps! Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇOver the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumpsˇ! Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇOver the lazy.","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps!ˇ Over the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps! Ovˇer the lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over theˇ lazy."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ","mode":"Insert"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over the lazyˇ."}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ","mode":"Insert"}} -{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick ˇbrown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brownˇ\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy doˇg. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ. The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ The quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. ˇThe quick \nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ\n","mode":"Insert"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. The quick ˇ\nbrown fox jumps over\n"}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ\n","mode":"Insert"}} -{"Put":{"state":"ˇThe quick brown.)]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The ˇquick brown.)]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brownˇ.)]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)ˇ]'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]ˇ'\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'ˇ\" Brown fox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'\" Brown ˇfox jumps. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" ˇ","mode":"Insert"}} -{"Put":{"state":"The quick brown.)]'\" Brown fox jumpsˇ. "}} -{"Key":"c"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" ˇ","mode":"Insert"}} diff --git a/crates/vim/test_data/test_delete_paragraph.json b/crates/vim/test_data/test_delete_paragraph.json deleted file mode 100644 index 3b09749bab9..00000000000 --- a/crates/vim/test_data/test_delete_paragraph.json +++ /dev/null @@ -1,14 +0,0 @@ -{"Put":{"state":"helˇlo world.\n\nhello world.\n"}} -{"Key":"y"} -{"Key":"}"} -{"Key":"d"} -{"Key":"}"} -{"Get":{"state":"heˇl\n\nhello world.\n","mode":"Normal"}} -{"ReadRegister":{"name":"\"","value":"lo world."}} -{"Get":{"state":"heˇl\n\nhello world.\n","mode":"Normal"}} -{"Put":{"state":"ˇhello world.\n\nhello world.\n"}} -{"Key":"y"} -{"Key":"}"} -{"Key":"d"} -{"Key":"}"} -{"Get":{"state":"ˇ\nhello world.\n","mode":"Normal"}} diff --git a/crates/vim/test_data/test_delete_sentence_object.json b/crates/vim/test_data/test_delete_sentence_object.json deleted file mode 100644 index e45ebd5c4e9..00000000000 --- a/crates/vim/test_data/test_delete_sentence_object.json +++ /dev/null @@ -1,270 +0,0 @@ -{"Put":{"state":"ˇThe quick brown? Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Fox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick ˇbrown? Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Fox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brownˇ? Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Fox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown?ˇ Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown?ˇFox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? ˇFox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇ Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jˇumps! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇ Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumpsˇ! Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇ Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps!ˇ Over the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇOver the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps! Ovˇer the lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ ","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over theˇ lazy."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ ","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over the lazyˇ."}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumps!ˇ ","mode":"Normal"}} -{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick ˇbrown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brownˇ\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy doˇg. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ The quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇThe quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. ˇThe quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ \n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. The quick ˇ\nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ \n","mode":"Normal"}} -{"Put":{"state":"ˇThe quick brown.)]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The ˇquick brown.)]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brownˇ.)]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)ˇ]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]ˇ'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'ˇ\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"ˇ Brown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'\" Brown ˇfox jumps. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" ˇ ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'\" Brown fox jumpsˇ. "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" ˇ ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'\" Brown fox jumps.ˇ "}} -{"Key":"d"} -{"Key":"i"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\" Brown fox jumpsˇ.","mode":"Normal"}} -{"Put":{"state":"ˇThe quick brown? Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇFox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick ˇbrown? Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇFox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brownˇ? Fox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇFox Jumps! Over the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? ˇFox Jumps! Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇOver the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jˇumps! Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇOver the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumpsˇ! Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? ˇOver the lazy.","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps!ˇ Over the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumpsˇ!","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps! Ovˇer the lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumpsˇ!","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over theˇ lazy."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumpsˇ!","mode":"Normal"}} -{"Put":{"state":"The quick brown? Fox Jumps! Over the lazyˇ."}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown? Fox Jumpsˇ!","mode":"Normal"}} -{"Put":{"state":"ˇThe quick brown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick ˇbrown\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brownˇ\nfox jumps over\nthe lazy dog. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy doˇg. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ. The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇThe quick \nbrown fox jumps over\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog.ˇ The quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ.\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. ˇThe quick \nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ.\n","mode":"Normal"}} -{"Put":{"state":"The quick brown\nfox jumps over\nthe lazy dog. The quick ˇ\nbrown fox jumps over\n"}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown\nfox jumps over\nthe lazy dogˇ.\n","mode":"Normal"}} -{"Put":{"state":"ˇThe quick brown.)]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The ˇquick brown.)]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brownˇ.)]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)ˇ]'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]ˇ'\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'ˇ\" Brown fox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"ˇBrown fox jumps. ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'\" Brown ˇfox jumps. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\"ˇ ","mode":"Normal"}} -{"Put":{"state":"The quick brown.)]'\" Brown fox jumpsˇ. "}} -{"Key":"d"} -{"Key":"a"} -{"Key":"s"} -{"Get":{"state":"The quick brown.)]'\"ˇ ","mode":"Normal"}} diff --git a/crates/vim/test_data/test_digraph_insert_multicursor.json b/crates/vim/test_data/test_digraph_insert_multicursor.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/vim/test_data/test_dot_repeat_registers.json b/crates/vim/test_data/test_dot_repeat_registers.json deleted file mode 100644 index 76ca1af20fe..00000000000 --- a/crates/vim/test_data/test_dot_repeat_registers.json +++ /dev/null @@ -1,125 +0,0 @@ -{"Put":{"state":"ˇhello\n"}} -{"Key":"y"} -{"Key":"y"} -{"Key":"p"} -{"Get":{"state":"hello\nˇhello\n","mode":"Normal"}} -{"Key":"."} -{"Get":{"state":"hello\nhello\nˇhello\n","mode":"Normal"}} -{"Put":{"state":"ˇtocopytext\n1\n2\n3\n"}} -{"Key":"y"} -{"Key":"y"} -{"Key":"j"} -{"Key":"\""} -{"Key":"_"} -{"Key":"d"} -{"Key":"d"} -{"Key":"."} -{"Key":"p"} -{"Get":{"state":"tocopytext\n3\nˇtocopytext\n","mode":"Normal"}} -{"Put":{"state":"ˇtocopytext\n1\n2\n3\n"}} -{"Key":"y"} -{"Key":"y"} -{"Key":"j"} -{"Key":"\""} -{"Key":"1"} -{"Key":"y"} -{"Key":"y"} -{"Key":"j"} -{"Key":"j"} -{"Key":"\""} -{"Key":"1"} -{"Key":"p"} -{"Key":"."} -{"Get":{"state":"tocopytext\n1\n2\n3\nˇ1\n","mode":"Normal"}} -{"Put":{"state":"ˇone\ntwo\nthree\n"}} -{"Key":"\""} -{"Key":"a"} -{"Key":"d"} -{"Key":"d"} -{"Key":"\""} -{"Key":"b"} -{"Key":"."} -{"Get":{"state":"ˇthree\n","mode":"Normal"}} -{"Key":"\""} -{"Key":"a"} -{"Key":"p"} -{"Key":"\""} -{"Key":"b"} -{"Key":"p"} -{"Get":{"state":"three\nˇtwo\n","mode":"Normal"}} -{"Put":{"state":"ˇline one\nline two\n"}} -{"Key":"\""} -{"Key":"a"} -{"Key":"y"} -{"Key":"y"} -{"Key":"j"} -{"Key":"\""} -{"Key":"a"} -{"Key":"p"} -{"Key":"."} -{"Key":"\""} -{"Key":"b"} -{"Key":"."} -{"Get":{"state":"line one\nline two\nline one\nline one\nˇline one\n","mode":"Normal"}} -{"Put":{"state":"ˇ1\n2\n3\n4\n5\n6\n7\n8\n9\n"}} -{"Key":"d"} -{"Key":"d"} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Get":{"state":"ˇ","mode":"Normal"}} -{"Key":"\""} -{"Key":"1"} -{"Key":"p"} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Key":"."} -{"Get":{"state":"\n9\n8\n7\n6\n5\n4\n3\n2\n1\nˇ1","mode":"Normal"}} -{"Put":{"state":"ˇa\nb\nc\n"}} -{"Key":"\""} -{"Key":"9"} -{"Key":"y"} -{"Key":"y"} -{"Key":"\""} -{"Key":"9"} -{"Key":"p"} -{"Key":"."} -{"Key":"."} -{"Get":{"state":"a\na\na\nˇa\nb\nc\n","mode":"Normal"}} -{"Put":{"state":"ˇone\ntwo\nthree\n"}} -{"Key":"d"} -{"Key":"d"} -{"Key":"p"} -{"Key":"."} -{"Get":{"state":"two\none\nˇone\nthree\n","mode":"Normal"}} -{"Put":{"state":"ˇone\ntwo\nthree\n"}} -{"Key":"\""} -{"Key":"a"} -{"Key":"y"} -{"Key":"y"} -{"Key":"j"} -{"Key":"\""} -{"Key":"1"} -{"Key":"y"} -{"Key":"y"} -{"Key":"k"} -{"Key":"\""} -{"Key":"1"} -{"Key":"p"} -{"Key":"."} -{"Key":"\""} -{"Key":"a"} -{"Key":"p"} -{"Key":"."} -{"Get":{"state":"one\ntwo\n9\none\nˇone\ntwo\nthree\n","mode":"Normal"}} diff --git a/crates/vim/test_data/test_increment_zero_leading_zeros.json b/crates/vim/test_data/test_increment_zero_leading_zeros.json deleted file mode 100644 index 5361fcbc7fb..00000000000 --- a/crates/vim/test_data/test_increment_zero_leading_zeros.json +++ /dev/null @@ -1,4 +0,0 @@ -{"Put":{"state":"001ˇ0\n"}} -{"Key":"10"} -{"Key":"ctrl-x"} -{"Get":{"state":"000ˇ9\n","mode":"Normal"}} diff --git a/crates/vim/test_data/test_marks.json b/crates/vim/test_data/test_marks.json deleted file mode 100644 index ff02c58728a..00000000000 --- a/crates/vim/test_data/test_marks.json +++ /dev/null @@ -1,15 +0,0 @@ -{"Put":{"state":"line one\nline ˇtwo\nline three"}} -{"Key":"m"} -{"Key":"a"} -{"Key":"l"} -{"Key":"'"} -{"Key":"a"} -{"Get":{"state":"line one\nˇline two\nline three","mode":"Normal"}} -{"Key":"`"} -{"Key":"a"} -{"Get":{"state":"line one\nline ˇtwo\nline three","mode":"Normal"}} -{"Key":"^"} -{"Key":"d"} -{"Key":"`"} -{"Key":"a"} -{"Get":{"state":"line one\nˇtwo\nline three","mode":"Normal"}} diff --git a/crates/vim/test_data/test_paragraph_object_with_landing_positions_not_at_beginning_of_line.json b/crates/vim/test_data/test_paragraph_object_with_landing_positions_not_at_beginning_of_line.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/vim/test_data/test_period_mark.json b/crates/vim/test_data/test_period_mark.json deleted file mode 100644 index 6d3acea83c9..00000000000 --- a/crates/vim/test_data/test_period_mark.json +++ /dev/null @@ -1,14 +0,0 @@ -{"Put":{"state":"Line one\nLine two\nLiˇne three\nLine four\nLine five\n"}} -{"Key":"c"} -{"Key":"e"} -{"Key":"k"} -{"Key":"e"} -{"Key":"escape"} -{"Key":"j"} -{"Key":"j"} -{"Key":"'"} -{"Key":"."} -{"Get":{"state":"Line one\nLine two\nˇLike three\nLine four\nLine five\n","mode":"Normal"}} -{"Key":"`"} -{"Key":"."} -{"Get":{"state":"Line one\nLine two\nLiˇke three\nLine four\nLine five\n","mode":"Normal"}} diff --git a/crates/vim/test_data/test_space_only_ascii_eol.json b/crates/vim/test_data/test_space_only_ascii_eol.json deleted file mode 100644 index 43a3af79453..00000000000 --- a/crates/vim/test_data/test_space_only_ascii_eol.json +++ /dev/null @@ -1,4 +0,0 @@ -{"Put":{"state":"aaaaˇaa\nanotherline"}} -{"Key":"4"} -{"Key":"space"} -{"Get":{"state":"aaaaaa\nanˇotherline","mode":"Normal"}} diff --git a/crates/vim/test_data/test_visual_sentence_object.json b/crates/vim/test_data/test_visual_sentence_object.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/crates/workspace/src/toast_layer.rs b/crates/workspace/src/toast_layer.rs index d89856239d6..bf5f8095da0 100644 --- a/crates/workspace/src/toast_layer.rs +++ b/crates/workspace/src/toast_layer.rs @@ -160,14 +160,6 @@ impl ToastLayer { cx.notify(); } - pub fn active_toast(&self) -> Option> - where - V: 'static, - { - let active_toast = self.active_toast.as_ref()?; - active_toast.toast.view().downcast::().ok() - } - fn pause_dismiss_timer(&mut self) { let Some(dismiss_timer) = self.dismiss_timer.take() else { return; diff --git a/docs/src/reference/all-settings.md b/docs/src/reference/all-settings.md index 818ddaee97d..96eca2429b0 100644 --- a/docs/src/reference/all-settings.md +++ b/docs/src/reference/all-settings.md @@ -6310,7 +6310,6 @@ Kernels you pick in the UI and matching Python environments take precedence over - `output_max_height_lines`: Maximum visible output lines before scrolling, or `0` for no height limit. -The default settings file also lists `output_max_width_columns`, but Zed ignores it. Image output width follows `max_columns`. ## Text Rendering Mode {#text-rendering-mode} diff --git a/script/check-todos b/script/check-todos index 4bdf3283297..d8cb4c5e182 100755 --- a/script/check-todos +++ b/script/check-todos @@ -5,7 +5,6 @@ set -euo pipefail # Brackets are used around characters so these don't show up in normal search. pattern='tod[o]!|FIXM[E]' result=$(git grep --no-color --ignore-case --line-number --extended-regexp -e $pattern -- \ - ':(exclude).github/workflows/ci.yml' \ ':(exclude)*criteria.md' \ ':(exclude)*prompt.md' || true) if [[ -n "${result}" ]]; then diff --git a/script/exit-ci-if-dev-drive-is-full.ps1 b/script/exit-ci-if-dev-drive-is-full.ps1 deleted file mode 100644 index 98684d58ee6..00000000000 --- a/script/exit-ci-if-dev-drive-is-full.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -param ( - [Parameter(Mandatory = $true)] - [int]$MAX_SIZE_IN_GB -) - -$ErrorActionPreference = "Stop" -$PSNativeCommandUseErrorActionPreference = $true -$ProgressPreference = "SilentlyContinue" - -if (-Not (Test-Path -Path "target")) { - Write-Host "target directory does not exist yet" - exit 0 -} - -$current_size_gb = (Get-ChildItem -Recurse -Force -File -Path "target" | Measure-Object -Property Length -Sum).Sum / 1GB - -Write-Host "target directory size: ${current_size_gb}GB. max size: ${MAX_SIZE_IN_GB}GB" - -if ($current_size_gb -gt $MAX_SIZE_IN_GB) { - Write-Host "Dev drive is almost full, increase the size first!" - exit 1 -} diff --git a/script/lib/blob-store.ps1 b/script/lib/blob-store.ps1 deleted file mode 100644 index 38bf1682d24..00000000000 --- a/script/lib/blob-store.ps1 +++ /dev/null @@ -1,68 +0,0 @@ -function UploadToBlobStoreWithACL { - param ( - [string]$BucketName, - [string]$FileToUpload, - [string]$BlobStoreKey, - [string]$ACL - ) - - # Format date to match AWS requirements - $Date = (Get-Date).ToUniversalTime().ToString("r") - # Note: Original script had a bug where it overrode the ACL parameter - # I'm keeping the same behavior for compatibility - $ACL = "public-read" - $ContentType = "application/octet-stream" - $StorageClass = "STANDARD" - - # Create string to sign (AWS S3 compatible format) - $StringToSign = "PUT`n`n${ContentType}`n${Date}`nx-amz-acl:${ACL}`nx-amz-storage-class:${StorageClass}`n/${BucketName}/${BlobStoreKey}" - - # Generate HMAC-SHA1 signature - $HMACSHA1 = New-Object System.Security.Cryptography.HMACSHA1 - $HMACSHA1.Key = [System.Text.Encoding]::UTF8.GetBytes($env:DIGITALOCEAN_SPACES_SECRET_KEY) - $Signature = [System.Convert]::ToBase64String($HMACSHA1.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($StringToSign))) - - # Upload file using Invoke-WebRequest (equivalent to curl) - $Headers = @{ - "Host" = "${BucketName}.nyc3.digitaloceanspaces.com" - "Date" = $Date - "Content-Type" = $ContentType - "x-amz-storage-class" = $StorageClass - "x-amz-acl" = $ACL - "Authorization" = "AWS ${env:DIGITALOCEAN_SPACES_ACCESS_KEY}:$Signature" - } - - $Uri = "https://${BucketName}.nyc3.digitaloceanspaces.com/${BlobStoreKey}" - - # Read file content - $FileContent = Get-Content $FileToUpload -Raw -AsByteStream - - try { - Invoke-WebRequest -Uri $Uri -Method PUT -Headers $Headers -Body $FileContent -ContentType $ContentType -Verbose - Write-Host "Successfully uploaded $FileToUpload to $Uri" -ForegroundColor Green - } - catch { - Write-Error "Failed to upload file: $_" - throw $_ - } -} - -function UploadToBlobStorePublic { - param ( - [string]$BucketName, - [string]$FileToUpload, - [string]$BlobStoreKey - ) - - UploadToBlobStoreWithACL -BucketName $BucketName -FileToUpload $FileToUpload -BlobStoreKey $BlobStoreKey -ACL "public-read" -} - -function UploadToBlobStore { - param ( - [string]$BucketName, - [string]$FileToUpload, - [string]$BlobStoreKey - ) - - UploadToBlobStoreWithACL -BucketName $BucketName -FileToUpload $FileToUpload -BlobStoreKey $BlobStoreKey -ACL "private" -} diff --git a/script/lib/squawk.toml b/script/lib/squawk.toml deleted file mode 100644 index 83a238c4ff7..00000000000 --- a/script/lib/squawk.toml +++ /dev/null @@ -1,11 +0,0 @@ -excluded_rules = [ - # We use `serial` already, no point changing now. - "prefer-identity", - - # We store timestamps in UTC, so we don't care about the timezone. - "prefer-timestamptz", - - "prefer-big-int", - "prefer-bigint-over-int", -] -pg_version = "15.0" diff --git a/script/licenses/zed-licenses.toml b/script/licenses/zed-licenses.toml index 7f9c865616b..226cf1fd8d9 100644 --- a/script/licenses/zed-licenses.toml +++ b/script/licenses/zed-licenses.toml @@ -23,18 +23,6 @@ accepted = [ "CDLA-Permissive-2.0", ] -[procinfo.clarify] -license = "MIT" -[[procinfo.clarify.files]] -path = 'LICENSE.md' -checksum = '37db33bbbd7348969eda397b89a16f252d56c1ca7481b6ccaf56ccdcbab5dcca' - -[webpki.clarify] -license = "ISC" # It actually says 'ISC-style' but I don't know the SPDX expression for that. -[[webpki.clarify.files]] -path = 'LICENSE' -checksum = '5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a' - [fuchsia-cprng.clarify] license = "BSD-3-Clause" [[fuchsia-cprng.clarify.files]] diff --git a/script/new-crate b/script/new-crate index 4f70a5fdc32..4a2bad1e963 100755 --- a/script/new-crate +++ b/script/new-crate @@ -65,7 +65,6 @@ ui.workspace = true util.workspace = true # Uncomment other workspace dependencies as needed -# assistant.workspace = true # client.workspace = true # project.workspace = true # settings.workspace = true diff --git a/script/seed-db b/script/seed-db deleted file mode 100755 index 4ae8977d149..00000000000 --- a/script/seed-db +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -e - -cargo run -p collab migrate diff --git a/script/setup-dev-driver.ps1 b/script/setup-dev-driver.ps1 deleted file mode 100644 index c5d39c59294..00000000000 --- a/script/setup-dev-driver.ps1 +++ /dev/null @@ -1,39 +0,0 @@ -# Configures a drive for testing in CI. - -# Currently, total CI requires almost 45GB of space, here we are creating a 100GB drive. -$Volume = New-VHD -Path C:/zed_dev_drive.vhdx -SizeBytes 100GB | - Mount-VHD -Passthru | - Initialize-Disk -Passthru | - New-Partition -AssignDriveLetter -UseMaximumSize | - Format-Volume -DevDrive -Confirm:$false -Force - -$Drive = "$($Volume.DriveLetter):" - -# Designate the Dev Drive as trusted -# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-designate-a-dev-drive-as-trusted -fsutil devdrv trust $Drive - -# There is no virus on the Dev Drive! -# Windows Defender is the wolf in antivirus wool, slowing your PC like a digital fool! -# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-configure-additional-filters-on-dev-drive -fsutil devdrv enable /disallowAv - -# Remount so the changes take effect -Dismount-VHD -Path C:/zed_dev_drive.vhdx -Mount-VHD -Path C:/zed_dev_drive.vhdx - -# Show some debug information -Write-Output $Volume -Write-Output "Using Dev Drive at $Drive" - -# Move Cargo to the dev drive -New-Item -Path "$($Drive)/.cargo/bin" -ItemType Directory -Force -Copy-Item -Path "C:/Users/runneradmin/.cargo/*" -Destination "$($Drive)/.cargo/" -Recurse -Force - -Write-Output ` - "DEV_DRIVE=$($Drive)" ` - "RUSTUP_HOME=$($Drive)/.rustup" ` - "CARGO_HOME=$($Drive)/.cargo" ` - "ZED_WORKSPACE=$($Drive)/zed" ` - "PATH=$($Drive)/.cargo/bin;$env:PATH" ` - >> $env:GITHUB_ENV diff --git a/script/squawk b/script/squawk deleted file mode 100755 index 497fcff0899..00000000000 --- a/script/squawk +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -# Squawk is a linter for database migrations. It helps identify dangerous patterns, and suggests alternatives. -# Squawk flagging an error does not mean that you need to take a different approach, but it does indicate you need to think about what you're doing. -# See also: https://squawkhq.com - -set -e - -if [ -z "$GITHUB_BASE_REF" ]; then - echo 'Not a pull request, skipping squawk modified migrations linting' - exit -fi - -SQUAWK_VERSION=0.26.0 -SQUAWK_BIN="./target/squawk-$SQUAWK_VERSION" -SQUAWK_ARGS="--assume-in-transaction --config script/lib/squawk.toml" - -pkgutil --pkg-info com.apple.pkg.RosettaUpdateAuto || /usr/sbin/softwareupdate --install-rosetta --agree-to-license -# When bootstrapping a brand new CI machine, the `target` directory may not exist yet. -mkdir -p "./target" -curl -L -o "$SQUAWK_BIN" "https://github.com/sbdchd/squawk/releases/download/v$SQUAWK_VERSION/squawk-darwin-x86_64" -chmod +x "$SQUAWK_BIN" - -if [ -n "$SQUAWK_GITHUB_TOKEN" ]; then - export SQUAWK_GITHUB_REPO_OWNER=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $1}') - export SQUAWK_GITHUB_REPO_NAME=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $2}') - export SQUAWK_GITHUB_PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }') - - $SQUAWK_BIN $SQUAWK_ARGS upload-to-github $(git diff --name-only origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF 'crates/collab/migrations/*.sql' 'crates/collab/migrations_llm/*.sql') -else - $SQUAWK_BIN $SQUAWK_ARGS $(git ls-files --others crates/collab/migrations/*.sql crates/collab/migrations_llm/*.sql) $(git diff --name-only main crates/collab/migrations/*.sql crates/collab/migrations_llm/*.sql) -fi diff --git a/script/upload-nightly.ps1 b/script/upload-nightly.ps1 deleted file mode 100644 index dbf86b2b822..00000000000 --- a/script/upload-nightly.ps1 +++ /dev/null @@ -1,33 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter()][string]$Architecture -) - -# Based on the template in: https://docs.digitalocean.com/reference/api/spaces-api/ -$ErrorActionPreference = "Stop" -. "$PSScriptRoot\lib\blob-store.ps1" -. "$PSScriptRoot\lib\workspace.ps1" - -ParseZedWorkspace -Write-Host "Uploading nightly for target: $target" - -$bucketName = "zed-nightly-host" -$releaseVersion = & "$PSScriptRoot\get-crate-version.ps1" zed -$version = "$releaseVersion+nightly.$env:GITHUB_RUN_NUMBER.$env:GITHUB_SHA" - -$remoteServerFiles = Get-ChildItem -Path "target" -Filter "zed-remote-server-windows-*.zip" -Recurse -File -ErrorAction SilentlyContinue - -foreach ($file in $remoteServerFiles) { - UploadToBlobStore -BucketName $bucketName -FileToUpload $file.FullName -BlobStoreKey "nightly/$($file.Name)" - UploadToBlobStore -BucketName $bucketName -FileToUpload $file.FullName -BlobStoreKey "$version/$($file.Name)" - Remove-Item -Path $file.FullName -ErrorAction SilentlyContinue -} - -UploadToBlobStore -BucketName $bucketName -FileToUpload "target/Zed-$Architecture.exe" -BlobStoreKey "nightly/Zed-$Architecture.exe" -UploadToBlobStore -BucketName $bucketName -FileToUpload "target/Zed-$Architecture.exe" -BlobStoreKey "$version/Zed-$Architecture.exe" - -Remove-Item -Path "target/Zed-$Architecture.exe" -ErrorAction SilentlyContinue - -$version | Out-File -FilePath "target/latest-sha" -NoNewline -UploadToBlobStore -BucketName $bucketName -FileToUpload "target/latest-sha" -BlobStoreKey "nightly/latest-sha-windows" -Remove-Item -Path "target/latest-sha" -ErrorAction SilentlyContinue