Done first draft of strongly typed migrations
This commit is contained in:
parent
4a00f0b062
commit
c84201fc9f
18 changed files with 396 additions and 448 deletions
|
@ -1925,7 +1925,7 @@ mod tests {
|
|||
|
||||
let project = Project::test(fs, None, cx).await;
|
||||
let (_, workspace) =
|
||||
cx.add_window(|cx| Workspace::new(project, |_, _| unimplemented!(), cx));
|
||||
cx.add_window(|cx| Workspace::new(None, project, |_, _| unimplemented!(), cx));
|
||||
let pane = workspace.read_with(cx, |workspace, _| workspace.active_pane().clone());
|
||||
|
||||
add_labled_item(&workspace, &pane, "A", cx);
|
||||
|
|
|
@ -15,7 +15,7 @@ use anyhow::{anyhow, Context, Result};
|
|||
use call::ActiveCall;
|
||||
use client::{proto, Client, PeerId, TypedEnvelope, UserStore};
|
||||
use collections::{hash_map, HashMap, HashSet};
|
||||
use db::{model::SerializedWorkspace, Db};
|
||||
use db::{kvp::KeyValue, model::SerializedWorkspace, Db};
|
||||
use dock::{DefaultItemFactory, Dock, ToggleDockButton};
|
||||
use drag_and_drop::DragAndDrop;
|
||||
use fs::{self, Fs};
|
||||
|
@ -1288,7 +1288,8 @@ impl Workspace {
|
|||
|
||||
// Use the resolved worktree roots to get the serialized_db from the database
|
||||
let serialized_workspace = cx.read(|cx| {
|
||||
cx.global::<Db>()
|
||||
cx.global::<Db<KeyValue>>()
|
||||
.open_as::<db::Workspace>()
|
||||
.workspace_for_roots(&Vec::from_iter(worktree_roots.into_iter())[..])
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue