move git2 to workspace dependency globally
This commit is contained in:
parent
183758a7c5
commit
d85acceeec
8 changed files with 9 additions and 53 deletions
18
Cargo.lock
generated
18
Cargo.lock
generated
|
@ -3059,8 +3059,6 @@ dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"libgit2-sys",
|
"libgit2-sys",
|
||||||
"log",
|
"log",
|
||||||
"openssl-probe",
|
|
||||||
"openssl-sys",
|
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -4023,9 +4021,7 @@ checksum = "7f3d95f6b51075fe9810a7ae22c7095f12b98005ab364d8544797a825ce946a4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cc",
|
"cc",
|
||||||
"libc",
|
"libc",
|
||||||
"libssh2-sys",
|
|
||||||
"libz-sys",
|
"libz-sys",
|
||||||
"openssl-sys",
|
|
||||||
"pkg-config",
|
"pkg-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -4066,20 +4062,6 @@ dependencies = [
|
||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libssh2-sys"
|
|
||||||
version = "0.2.23"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca"
|
|
||||||
dependencies = [
|
|
||||||
"cc",
|
|
||||||
"libc",
|
|
||||||
"libz-sys",
|
|
||||||
"openssl-sys",
|
|
||||||
"pkg-config",
|
|
||||||
"vcpkg",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libz-sys"
|
name = "libz-sys"
|
||||||
version = "1.1.12"
|
version = "1.1.12"
|
||||||
|
|
|
@ -116,6 +116,7 @@ toml = { version = "0.5" }
|
||||||
tree-sitter = "0.20"
|
tree-sitter = "0.20"
|
||||||
unindent = { version = "0.1.7" }
|
unindent = { version = "0.1.7" }
|
||||||
pretty_assertions = "1.3.0"
|
pretty_assertions = "1.3.0"
|
||||||
|
git2 = { version = "0.15", default-features = false }
|
||||||
|
|
||||||
tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "1b0321ee85701d5036c334a6f04761cdc672e64c" }
|
tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "1b0321ee85701d5036c334a6f04761cdc672e64c" }
|
||||||
tree-sitter-c = "0.20.1"
|
tree-sitter-c = "0.20.1"
|
||||||
|
|
|
@ -26,7 +26,7 @@ lazy_static.workspace = true
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
smol.workspace = true
|
smol.workspace = true
|
||||||
regex.workspace = true
|
regex.workspace = true
|
||||||
git2 = { version = "0.15", default-features = false }
|
git2.workspace = true
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_derive.workspace = true
|
serde_derive.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
|
|
|
@ -20,7 +20,7 @@ smol.workspace = true
|
||||||
parking_lot.workspace = true
|
parking_lot.workspace = true
|
||||||
async-trait.workspace = true
|
async-trait.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
git2 = { version = "0.15", default-features = false }
|
git2.workspace = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
unindent.workspace = true
|
unindent.workspace = true
|
||||||
|
|
|
@ -75,6 +75,6 @@ lsp = { path = "../lsp", features = ["test-support"] }
|
||||||
settings = { path = "../settings", features = ["test-support"] }
|
settings = { path = "../settings", features = ["test-support"] }
|
||||||
util = { path = "../util", features = ["test-support"] }
|
util = { path = "../util", features = ["test-support"] }
|
||||||
rpc = { path = "../rpc", features = ["test-support"] }
|
rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
git2 = { version = "0.15", default-features = false }
|
git2.workspace = true
|
||||||
tempdir.workspace = true
|
tempdir.workspace = true
|
||||||
unindent.workspace = true
|
unindent.workspace = true
|
||||||
|
|
|
@ -51,11 +51,11 @@ project = { path = "../project", features = ["test-support"] }
|
||||||
rpc = { path = "../rpc", features = ["test-support"] }
|
rpc = { path = "../rpc", features = ["test-support"] }
|
||||||
workspace = { path = "../workspace", features = ["test-support"] }
|
workspace = { path = "../workspace", features = ["test-support"] }
|
||||||
settings = { path = "../settings", features = ["test-support"]}
|
settings = { path = "../settings", features = ["test-support"]}
|
||||||
git2 = { version = "0.15"}
|
|
||||||
rust-embed = { version = "8.0", features = ["include-exclude"] }
|
rust-embed = { version = "8.0", features = ["include-exclude"] }
|
||||||
client = { path = "../client" }
|
client = { path = "../client" }
|
||||||
zed = { path = "../zed"}
|
zed = { path = "../zed"}
|
||||||
node_runtime = { path = "../node_runtime"}
|
node_runtime = { path = "../node_runtime"}
|
||||||
|
git2.workspace = true
|
||||||
|
|
||||||
pretty_assertions.workspace = true
|
pretty_assertions.workspace = true
|
||||||
rand.workspace = true
|
rand.workspace = true
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use client::{self, UserStore};
|
use client::{self, UserStore};
|
||||||
use collections::HashMap;
|
|
||||||
use git2::{Object, Oid, Repository};
|
use git2::{Object, Oid, Repository};
|
||||||
use gpui::{AppContext, AssetSource, AsyncAppContext, ModelHandle, Task};
|
use gpui::{AsyncAppContext, ModelHandle, Task};
|
||||||
use language::LanguageRegistry;
|
use language::LanguageRegistry;
|
||||||
use node_runtime::RealNodeRuntime;
|
use node_runtime::RealNodeRuntime;
|
||||||
use project::{Project, RealFs};
|
use project::{Project, RealFs};
|
||||||
use rust_embed::RustEmbed;
|
|
||||||
use semantic_index::embedding::OpenAIEmbeddings;
|
use semantic_index::embedding::OpenAIEmbeddings;
|
||||||
use semantic_index::semantic_index_settings::SemanticIndexSettings;
|
use semantic_index::semantic_index_settings::SemanticIndexSettings;
|
||||||
use semantic_index::{SearchResult, SemanticIndex};
|
use semantic_index::{SearchResult, SemanticIndex};
|
||||||
|
@ -21,28 +19,6 @@ use util::http::{self};
|
||||||
use util::paths::{self, EMBEDDINGS_DIR};
|
use util::paths::{self, EMBEDDINGS_DIR};
|
||||||
use zed::languages;
|
use zed::languages;
|
||||||
|
|
||||||
#[derive(RustEmbed)]
|
|
||||||
#[folder = "../../assets"]
|
|
||||||
#[include = "fonts/**/*"]
|
|
||||||
#[include = "icons/**/*"]
|
|
||||||
#[include = "themes/**/*"]
|
|
||||||
#[include = "sounds/**/*"]
|
|
||||||
#[include = "*.md"]
|
|
||||||
#[exclude = "*.DS_Store"]
|
|
||||||
pub struct Assets;
|
|
||||||
|
|
||||||
impl AssetSource for Assets {
|
|
||||||
fn load(&self, path: &str) -> Result<std::borrow::Cow<[u8]>> {
|
|
||||||
Self::get(path)
|
|
||||||
.map(|f| f.data)
|
|
||||||
.ok_or_else(|| anyhow!("could not find asset at path \"{}\"", path))
|
|
||||||
}
|
|
||||||
|
|
||||||
fn list(&self, path: &str) -> Vec<std::borrow::Cow<'static, str>> {
|
|
||||||
Self::iter().filter(|p| p.starts_with(path)).collect()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Deserialize, Clone, Serialize)]
|
#[derive(Deserialize, Clone, Serialize)]
|
||||||
struct EvaluationQuery {
|
struct EvaluationQuery {
|
||||||
query: String,
|
query: String,
|
||||||
|
@ -455,11 +431,9 @@ async fn evaluate_repo(
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Launch new repo as a new Zed workspace/project
|
// Launch new repo as a new Zed workspace/project
|
||||||
let app = gpui::App::new(Assets).unwrap();
|
let app = gpui::App::new(()).unwrap();
|
||||||
let fs = Arc::new(RealFs);
|
let fs = Arc::new(RealFs);
|
||||||
let http = http::client();
|
let http = http::client();
|
||||||
let user_settings_file_rx =
|
|
||||||
watch_config_file(app.background(), fs.clone(), paths::SETTINGS.clone());
|
|
||||||
let http_client = http::client();
|
let http_client = http::client();
|
||||||
init_logger();
|
init_logger();
|
||||||
|
|
||||||
|
@ -475,7 +449,6 @@ fn main() {
|
||||||
.set_default_settings(default_settings().as_ref(), cx)
|
.set_default_settings(default_settings().as_ref(), cx)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
cx.set_global(store);
|
cx.set_global(store);
|
||||||
handle_settings_file_changes(user_settings_file_rx, cx);
|
|
||||||
|
|
||||||
// Initialize Languages
|
// Initialize Languages
|
||||||
let login_shell_env_loaded = Task::ready(());
|
let login_shell_env_loaded = Task::ready(());
|
||||||
|
|
|
@ -25,10 +25,10 @@ rust-embed.workspace = true
|
||||||
tempdir = { workspace = true, optional = true }
|
tempdir = { workspace = true, optional = true }
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
serde_json.workspace = true
|
serde_json.workspace = true
|
||||||
git2 = { version = "0.15", default-features = false, optional = true }
|
git2 = { workspace = true, optional = true }
|
||||||
dirs = "3.0"
|
dirs = "3.0"
|
||||||
take-until = "0.2.0"
|
take-until = "0.2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
tempdir.workspace = true
|
tempdir.workspace = true
|
||||||
git2 = { version = "0.15", default-features = false }
|
git2.workspace = true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue