aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model/src
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2021-05-24 12:52:57 +0100
committerKirill Bulatov <[email protected]>2021-05-24 12:52:57 +0100
commit5c0369b1d0c5351672f2a16e9a0d17beee84bcbe (patch)
treea4593bec458a2a4482ac8e63054e363554f79468 /crates/project_model/src
parentd8c36029cc3961ce742aa6e5d59926c5a7e7170a (diff)
Add a FIXME
Diffstat (limited to 'crates/project_model/src')
-rw-r--r--crates/project_model/src/workspace.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/project_model/src/workspace.rs b/crates/project_model/src/workspace.rs
index ede82d88b..84990075f 100644
--- a/crates/project_model/src/workspace.rs
+++ b/crates/project_model/src/workspace.rs
@@ -49,6 +49,15 @@ pub enum ProjectWorkspace {
49 }, 49 },
50 /// Project workspace was manually specified using a `rust-project.json` file. 50 /// Project workspace was manually specified using a `rust-project.json` file.
51 Json { project: ProjectJson, sysroot: Option<Sysroot>, rustc_cfg: Vec<CfgFlag> }, 51 Json { project: ProjectJson, sysroot: Option<Sysroot>, rustc_cfg: Vec<CfgFlag> },
52
53 // FIXME: The primary limitation of this approach is that the set of detached files needs to be fixed at the beginning.
54 // That's not the end user experience we should strive for.
55 // Ideally, you should be able to just open a random detached file in existing cargo projects, and get the basic features working.
56 // That needs some changes on the salsa-level though.
57 // In particular, we should split the unified CrateGraph (which currently has maximal durability) into proper crate graph, and a set of ad hoc roots (with minimal durability).
58 // Then, we need to hide the graph behind the queries such that most queries look only at the proper crate graph, and fall back to ad hoc roots only if there's no results.
59 // After this, we should be able to tweak the logic in reload.rs to add newly opened files, which don't belong to any existing crates, to the set of the detached files.
60 // //
52 /// Project with a set of disjoint files, not belonging to any particular workspace. 61 /// Project with a set of disjoint files, not belonging to any particular workspace.
53 /// Backed by basic sysroot crates for basic completion and highlighting. 62 /// Backed by basic sysroot crates for basic completion and highlighting.
54 DetachedFiles { files: Vec<AbsPathBuf>, sysroot: Sysroot, rustc_cfg: Vec<CfgFlag> }, 63 DetachedFiles { files: Vec<AbsPathBuf>, sysroot: Sysroot, rustc_cfg: Vec<CfgFlag> },