mirror of
				https://github.com/rust-lang/rust-analyzer.git
				synced 2025-10-31 03:54:42 +00:00 
			
		
		
		
	Partially back out "fix: Fix sourceroot construction for virtual manifests"
This commit is contained in:
		
							parent
							
								
									c65690627f
								
							
						
					
					
						commit
						52a6f430ef
					
				
					 2 changed files with 5 additions and 13 deletions
				
			
		|  | @ -242,9 +242,6 @@ impl ProjectFolders { | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 if dirs.include.is_empty() { |  | ||||||
|                     continue; |  | ||||||
|                 } |  | ||||||
|                 vfs::loader::Entry::Directories(dirs) |                 vfs::loader::Entry::Directories(dirs) | ||||||
|             }; |             }; | ||||||
| 
 | 
 | ||||||
|  | @ -267,7 +264,7 @@ impl ProjectFolders { | ||||||
|             }; |             }; | ||||||
| 
 | 
 | ||||||
|             let file_set_roots = vec![VfsPath::from(ratoml_path.to_owned())]; |             let file_set_roots = vec![VfsPath::from(ratoml_path.to_owned())]; | ||||||
|             let entry = vfs::loader::Entry::Files(vec![ratoml_path]); |             let entry = vfs::loader::Entry::Files(vec![ratoml_path.to_owned()]); | ||||||
| 
 | 
 | ||||||
|             res.watch.push(res.load.len()); |             res.watch.push(res.load.len()); | ||||||
|             res.load.push(entry); |             res.load.push(entry); | ||||||
|  |  | ||||||
|  | @ -11,9 +11,8 @@ use base_db::{ | ||||||
| }; | }; | ||||||
| use cfg::{CfgAtom, CfgDiff, CfgOptions}; | use cfg::{CfgAtom, CfgDiff, CfgOptions}; | ||||||
| use intern::{sym, Symbol}; | use intern::{sym, Symbol}; | ||||||
| use itertools::Itertools; |  | ||||||
| use paths::{AbsPath, AbsPathBuf}; | use paths::{AbsPath, AbsPathBuf}; | ||||||
| use rustc_hash::FxHashMap; | use rustc_hash::{FxHashMap, FxHashSet}; | ||||||
| use semver::Version; | use semver::Version; | ||||||
| use span::{Edition, FileId}; | use span::{Edition, FileId}; | ||||||
| use tracing::instrument; | use tracing::instrument; | ||||||
|  | @ -591,9 +590,10 @@ impl ProjectWorkspace { | ||||||
|                         exclude: krate.exclude.clone(), |                         exclude: krate.exclude.clone(), | ||||||
|                     } |                     } | ||||||
|                 }) |                 }) | ||||||
|  |                 .collect::<FxHashSet<_>>() | ||||||
|  |                 .into_iter() | ||||||
|                 .chain(mk_sysroot()) |                 .chain(mk_sysroot()) | ||||||
|                 .unique() |                 .collect::<Vec<_>>(), | ||||||
|                 .collect(), |  | ||||||
|             ProjectWorkspaceKind::Cargo { cargo, rustc, build_scripts, error: _, set_test: _ } => { |             ProjectWorkspaceKind::Cargo { cargo, rustc, build_scripts, error: _, set_test: _ } => { | ||||||
|                 cargo |                 cargo | ||||||
|                     .packages() |                     .packages() | ||||||
|  | @ -643,11 +643,6 @@ impl ProjectWorkspace { | ||||||
|                             exclude: Vec::new(), |                             exclude: Vec::new(), | ||||||
|                         }) |                         }) | ||||||
|                     })) |                     })) | ||||||
|                     .chain(cargo.is_virtual_workspace().then(|| PackageRoot { |  | ||||||
|                         is_local: true, |  | ||||||
|                         include: vec![cargo.workspace_root().to_path_buf()], |  | ||||||
|                         exclude: Vec::new(), |  | ||||||
|                     })) |  | ||||||
|                     .collect() |                     .collect() | ||||||
|             } |             } | ||||||
|             ProjectWorkspaceKind::DetachedFile { file, cargo: cargo_script, .. } => { |             ProjectWorkspaceKind::DetachedFile { file, cargo: cargo_script, .. } => { | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lukas Wirth
						Lukas Wirth