WIP: Merge branch 'main' into zed2-workspace
This commit is contained in:
commit
3e7df82977
76 changed files with 10546 additions and 5737 deletions
|
@ -64,20 +64,26 @@ fn main() {
|
|||
log::info!("========== starting zed ==========");
|
||||
let app = App::production(Arc::new(Assets));
|
||||
|
||||
let installation_id = app.executor().block(installation_id()).ok();
|
||||
let installation_id = app.background_executor().block(installation_id()).ok();
|
||||
let session_id = Uuid::new_v4().to_string();
|
||||
init_panic_hook(&app, installation_id.clone(), session_id.clone());
|
||||
|
||||
let fs = Arc::new(RealFs);
|
||||
let user_settings_file_rx =
|
||||
watch_config_file(&app.executor(), fs.clone(), paths::SETTINGS.clone());
|
||||
let _user_keymap_file_rx =
|
||||
watch_config_file(&app.executor(), fs.clone(), paths::KEYMAP.clone());
|
||||
let user_settings_file_rx = watch_config_file(
|
||||
&app.background_executor(),
|
||||
fs.clone(),
|
||||
paths::SETTINGS.clone(),
|
||||
);
|
||||
let _user_keymap_file_rx = watch_config_file(
|
||||
&app.background_executor(),
|
||||
fs.clone(),
|
||||
paths::KEYMAP.clone(),
|
||||
);
|
||||
|
||||
let login_shell_env_loaded = if stdout_is_a_pty() {
|
||||
Task::ready(())
|
||||
} else {
|
||||
app.executor().spawn(async {
|
||||
app.background_executor().spawn(async {
|
||||
load_login_shell_environment().await.log_err();
|
||||
})
|
||||
};
|
||||
|
@ -113,7 +119,7 @@ fn main() {
|
|||
let client = client2::Client::new(http.clone(), cx);
|
||||
let mut languages = LanguageRegistry::new(login_shell_env_loaded);
|
||||
let copilot_language_server_id = languages.next_language_server_id();
|
||||
languages.set_executor(cx.executor().clone());
|
||||
languages.set_executor(cx.background_executor().clone());
|
||||
languages.set_language_server_download_dir(paths::LANGUAGES_DIR.clone());
|
||||
let languages = Arc::new(languages);
|
||||
let node_runtime = RealNodeRuntime::new(http.clone());
|
||||
|
@ -519,7 +525,7 @@ fn init_panic_hook(app: &App, installation_id: Option<String>, session_id: Strin
|
|||
fn upload_previous_panics(http: Arc<dyn HttpClient>, cx: &mut AppContext) {
|
||||
let telemetry_settings = *client2::TelemetrySettings::get_global(cx);
|
||||
|
||||
cx.executor()
|
||||
cx.background_executor()
|
||||
.spawn(async move {
|
||||
let panic_report_url = format!("{}/api/panic", &*client2::ZED_SERVER_URL);
|
||||
let mut children = smol::fs::read_dir(&*paths::LOGS_DIR).await?;
|
||||
|
@ -649,7 +655,7 @@ fn load_embedded_fonts(cx: &AppContext) {
|
|||
let asset_source = cx.asset_source();
|
||||
let font_paths = asset_source.list("fonts").unwrap();
|
||||
let embedded_fonts = Mutex::new(Vec::new());
|
||||
let executor = cx.executor();
|
||||
let executor = cx.background_executor();
|
||||
|
||||
executor.block(executor.scoped(|scope| {
|
||||
for font_path in &font_paths {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue