Fix a bug where a GPUI macro still used `ModelContext` Rename `AsyncAppContext` -> `AsyncApp` Rename update_model, read_model, insert_model, and reserve_model to update_entity, read_entity, insert_entity, and reserve_entity Release Notes: - N/A
This commit is contained in:
parent
83141d07e9
commit
a6b1514246
118 changed files with 708 additions and 757 deletions
|
@ -18,9 +18,7 @@ use extension::ExtensionHostProxy;
|
|||
use fs::{Fs, RealFs};
|
||||
use futures::{future, StreamExt};
|
||||
use git::GitHostingProviderRegistry;
|
||||
use gpui::{
|
||||
Action, App, AppContext as _, Application, AsyncAppContext, DismissEvent, UpdateGlobal as _,
|
||||
};
|
||||
use gpui::{Action, App, AppContext as _, Application, AsyncApp, DismissEvent, UpdateGlobal as _};
|
||||
|
||||
use http_client::{read_proxy_from_env, Uri};
|
||||
use language::LanguageRegistry;
|
||||
|
@ -129,7 +127,7 @@ fn files_not_created_on_launch(errors: HashMap<io::ErrorKind, Vec<&Path>>) {
|
|||
})
|
||||
}
|
||||
|
||||
fn fail_to_open_window_async(e: anyhow::Error, cx: &mut AsyncAppContext) {
|
||||
fn fail_to_open_window_async(e: anyhow::Error, cx: &mut AsyncApp) {
|
||||
cx.update(|cx| fail_to_open_window(e, cx)).log_err();
|
||||
}
|
||||
|
||||
|
@ -760,7 +758,7 @@ fn handle_open_request(request: OpenRequest, app_state: Arc<AppState>, cx: &mut
|
|||
}
|
||||
}
|
||||
|
||||
async fn authenticate(client: Arc<Client>, cx: &AsyncAppContext) -> Result<()> {
|
||||
async fn authenticate(client: Arc<Client>, cx: &AsyncApp) -> Result<()> {
|
||||
if stdout_is_a_pty() {
|
||||
if *client::ZED_DEVELOPMENT_AUTH {
|
||||
client.authenticate_and_connect(true, cx).await?;
|
||||
|
@ -815,10 +813,7 @@ async fn installation_id() -> Result<IdType> {
|
|||
Ok(IdType::New(installation_id))
|
||||
}
|
||||
|
||||
async fn restore_or_create_workspace(
|
||||
app_state: Arc<AppState>,
|
||||
cx: &mut AsyncAppContext,
|
||||
) -> Result<()> {
|
||||
async fn restore_or_create_workspace(app_state: Arc<AppState>, cx: &mut AsyncApp) -> Result<()> {
|
||||
if let Some(locations) = restorable_workspace_locations(cx, &app_state).await {
|
||||
for location in locations {
|
||||
match location {
|
||||
|
@ -874,7 +869,7 @@ async fn restore_or_create_workspace(
|
|||
}
|
||||
|
||||
pub(crate) async fn restorable_workspace_locations(
|
||||
cx: &mut AsyncAppContext,
|
||||
cx: &mut AsyncApp,
|
||||
app_state: &Arc<AppState>,
|
||||
) -> Option<Vec<SerializedWorkspaceLocation>> {
|
||||
let mut restore_behavior = cx
|
||||
|
|
|
@ -23,10 +23,9 @@ use feature_flags::FeatureFlagAppExt;
|
|||
use futures::FutureExt;
|
||||
use futures::{channel::mpsc, select_biased, StreamExt};
|
||||
use gpui::{
|
||||
actions, point, px, Action, App, AppContext as _, AsyncAppContext, Context, DismissEvent,
|
||||
Element, Entity, Focusable, KeyBinding, MenuItem, ParentElement, PathPromptOptions,
|
||||
PromptLevel, ReadGlobal, SharedString, Styled, Task, TitlebarOptions, Window, WindowKind,
|
||||
WindowOptions,
|
||||
actions, point, px, Action, App, AppContext as _, AsyncApp, Context, DismissEvent, Element,
|
||||
Entity, Focusable, KeyBinding, MenuItem, ParentElement, PathPromptOptions, PromptLevel,
|
||||
ReadGlobal, SharedString, Styled, Task, TitlebarOptions, Window, WindowKind, WindowOptions,
|
||||
};
|
||||
pub use open_listener::*;
|
||||
use outline_panel::OutlinePanel;
|
||||
|
@ -1534,7 +1533,7 @@ fn open_settings_file(
|
|||
.detach_and_log_err(cx);
|
||||
}
|
||||
|
||||
async fn register_zed_scheme(cx: &AsyncAppContext) -> anyhow::Result<()> {
|
||||
async fn register_zed_scheme(cx: &AsyncApp) -> anyhow::Result<()> {
|
||||
cx.update(|cx| cx.register_url_scheme(ZED_URL_SCHEME))?
|
||||
.await
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ use futures::channel::mpsc::{UnboundedReceiver, UnboundedSender};
|
|||
use futures::channel::{mpsc, oneshot};
|
||||
use futures::future::join_all;
|
||||
use futures::{FutureExt, SinkExt, StreamExt};
|
||||
use gpui::{App, AsyncAppContext, Global, WindowHandle};
|
||||
use gpui::{App, AsyncApp, Global, WindowHandle};
|
||||
use language::Point;
|
||||
use recent_projects::{open_ssh_project, SshSettings};
|
||||
use remote::SshConnectionOptions;
|
||||
|
@ -198,7 +198,7 @@ pub async fn open_paths_with_positions(
|
|||
path_positions: &[PathWithPosition],
|
||||
app_state: Arc<AppState>,
|
||||
open_options: workspace::OpenOptions,
|
||||
cx: &mut AsyncAppContext,
|
||||
cx: &mut AsyncApp,
|
||||
) -> Result<(
|
||||
WindowHandle<Workspace>,
|
||||
Vec<Option<Result<Box<dyn ItemHandle>>>>,
|
||||
|
@ -248,7 +248,7 @@ pub async fn open_paths_with_positions(
|
|||
pub async fn handle_cli_connection(
|
||||
(mut requests, responses): (mpsc::Receiver<CliRequest>, IpcSender<CliResponse>),
|
||||
app_state: Arc<AppState>,
|
||||
mut cx: AsyncAppContext,
|
||||
mut cx: AsyncApp,
|
||||
) {
|
||||
if let Some(request) = requests.next().await {
|
||||
match request {
|
||||
|
@ -305,7 +305,7 @@ async fn open_workspaces(
|
|||
wait: bool,
|
||||
app_state: Arc<AppState>,
|
||||
env: Option<collections::HashMap<String, String>>,
|
||||
cx: &mut AsyncAppContext,
|
||||
cx: &mut AsyncApp,
|
||||
) -> Result<()> {
|
||||
let grouped_locations = if paths.is_empty() {
|
||||
// If no paths are provided, restore from previous workspaces unless a new workspace is requested with -n
|
||||
|
@ -412,7 +412,7 @@ async fn open_local_workspace(
|
|||
responses: &IpcSender<CliResponse>,
|
||||
env: Option<&HashMap<String, String>>,
|
||||
app_state: &Arc<AppState>,
|
||||
cx: &mut AsyncAppContext,
|
||||
cx: &mut AsyncApp,
|
||||
) -> bool {
|
||||
let mut errored = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue