mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-03 05:51:27 +01:00
55fd8046c7
## Summary Removes code, files and config entries that nothing in the repository uses. Follow-up to #67664. No behavior changes. - `agent`: deletes four prompt templates that no `Template` renders but that were still embedded and registered with Handlebars at startup. #55612 removed the users of `create_file_prompt.hbs`, `edit_file_prompt_diff_fenced.hbs` and `edit_file_prompt_xml.hbs`. #56543 merged `experimental_system_prompt.hbs` into `system_prompt.hbs` and deleted it, and #56427 re-added it the same day. - Removes two actions that nothing handles, dispatches or binds: `agent::OpenOnboardingModal`, whose handler #49484 removed, and `editor::OpenProposedChangesEditor`, whose handler #40188 removed. Running or binding either did nothing. - `git_ui`: removes `branch_picker::{checkout_branch, switch, open}`. Since #46621, `git_picker` handles the `Branch`, `Switch` and `CheckoutBranch` actions, and nothing registers these. - `search`: removes `DivRegistrar`, unused since #52757 removed text threads. - `editor`: removes the `DebugStackFrameLine` marker type and highlight key, unused since #50144, and the `SearchWithinRange` marker type, which #46356 replaced with `HighlightKey::SearchWithinRange`. Also removes `Editor::text_option`, `wait_for_diff_to_load` and `remove_folds_with_type`. - Removes event variants that nothing emits: `client::user::Event::PlanUpdated`, `workspace::Event::ContactRequestedJoin`, and three `DapStoreEvent` variants. Also removes the unit struct `project::AgentLocationChanged`, which nothing used. `project::Event::AgentLocationChanged` stays. - `settings`: removes the `SettingsKey` trait, which has had no implementations since #38451. - `collab`: removes the `FlagId`, `HostedProjectId` and `SignupId` ID types, whose models #38360, #19754 and #44438 removed, and `Database::mark_notification_as_read`, unused since #37789 removed chat. - Removes unused methods and constants in `agent_skills`, `agent_ui`, `call`, `client`, `language`, `language_models`, `multi_buffer`, `paths` and `text`. `language::proto::deserialize_selection` lost its only caller when #67151 removed `deserialize_selections`. `paths` drops its `const_format` dependency. - Config and scripts: - `clippy.toml` and `crates/git/clippy.toml` exempted `agent_ui::context::AgentContextKey` from `mutable_key_type`. #43364 removed the type. - `.config/typos.toml` ignored "Big Sur", which #65994 removed from the docs. - `script/bootstrap`, `script/bootstrap.ps1` and `script/reset_db` still created or dropped the LLM database. #48836 removed `LLM_DATABASE_URL` from `crates/collab/.env.toml`, so `bootstrap` passed `sqlx` an empty URL. ## Testing - No references to the removed items, files or settings remain in the tree, including in other platforms' cfg-gated code, keymaps, docs and scripts. No open PR, and no upstream branch with commits since August, adds a use of them. - `./script/clippy` - `cargo check --workspace --all-targets` with `-D warnings`, with default features and with `--all-features` - `cargo fmt --all -- --check` - `cargo test -p git_ui -p search -p settings -p text -p paths -p agent_skills -p call -p client` - `cargo test -p agent --lib templates` ## 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
53 lines
1.7 KiB
Bash
Executable File
53 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
# if root or if sudo/unavailable, define an empty variable
|
|
if [ "$(id -u)" -eq 0 ]
|
|
then maysudo=''
|
|
else maysudo="$(command -v sudo || command -v doas || true)"
|
|
fi
|
|
|
|
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
echo "Linux dependencies..."
|
|
script/linux
|
|
else
|
|
echo "installing foreman..."
|
|
which foreman > /dev/null || brew install foreman
|
|
fi
|
|
|
|
# Install minio if needed
|
|
if ! which minio > /dev/null; then
|
|
if command -v brew > /dev/null; then
|
|
echo "minio not found. Installing via brew"
|
|
brew install minio/stable/minio
|
|
elif command -v apt > /dev/null; then
|
|
echo "minio not found. Installing via apt from https://dl.min.io/server/minio/release/linux-amd64/minio.deb"
|
|
wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.deb -O /tmp/minio.deb
|
|
$maysudo apt install /tmp/minio.deb
|
|
rm -f /tmp/minio.deb
|
|
elif command -v dnf > /dev/null; then
|
|
echo "minio not found. Installing via dnf from https://dl.min.io/server/minio/release/linux-amd64/minio.rpm"
|
|
wget -q https://dl.min.io/server/minio/release/linux-amd64/minio.rpm -O /tmp/minio.rpm
|
|
$maysudo dnf install /tmp/minio.rpm
|
|
rm -f /tmp/minio.rpm
|
|
else
|
|
echo "No supported package manager found (brew, apt, or dnf)"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Install sqlx-cli if needed
|
|
if ! [[ "$(command -v sqlx)" && "$(sqlx --version)" == "sqlx-cli 0.7.2" ]]; then
|
|
echo "sqlx-cli not found or not the required version, installing version 0.7.2..."
|
|
cargo install sqlx-cli --version 0.7.2
|
|
fi
|
|
|
|
cd crates/collab
|
|
|
|
# Export contents of .env.toml
|
|
eval "$(cargo run --bin dotenv)"
|
|
|
|
echo "creating databases..."
|
|
sqlx database create --database-url "$DATABASE_URL"
|