@@ -1812,7 +1812,9 @@ fn project_raw_current(root: &Path) -> Result<DeclarationProjection> {
18121812 let mut files = BTreeMap :: new ( ) ;
18131813 add_optional_regular ( root, & root. join ( crate :: catalog:: CONFIG_FILE ) , & mut files) ?;
18141814 let spec_paths = collect_canonical_specs ( root, ProjectionSource :: Current , & mut files) ?;
1815- let workspace_dirs = raw_workspace_dirs ( root, & spec_paths) ?;
1815+ // Invalid declarations cannot establish typed workspace facts; canonical runtime directories
1816+ // are excluded structurally by the shared bundle collector instead.
1817+ let workspace_dirs = BTreeSet :: new ( ) ;
18161818 for spec in & spec_paths {
18171819 let bundle = spec. parent ( ) . context ( "canonical spec has no bundle" ) ?;
18181820 collect_bundle_files (
@@ -1834,30 +1836,6 @@ fn project_raw_current(root: &Path) -> Result<DeclarationProjection> {
18341836 } )
18351837}
18361838
1837- fn raw_workspace_dirs ( root : & Path , spec_paths : & [ PathBuf ] ) -> Result < BTreeSet < String > > {
1838- let mut workspace_dirs = BTreeSet :: new ( ) ;
1839- for spec in spec_paths {
1840- let bundle = spec. parent ( ) . context ( "canonical spec has no bundle" ) ?;
1841- let workspace = bundle. join ( ".workspace" ) ;
1842- match fs:: symlink_metadata ( & workspace) {
1843- Ok ( metadata) => {
1844- anyhow:: ensure!(
1845- metadata. is_dir( ) && !metadata. file_type( ) . is_symlink( ) ,
1846- "canonical workspace fact is not a real directory: {}" ,
1847- workspace. display( )
1848- ) ;
1849- workspace_dirs. insert ( normalized_relative ( root, & workspace) ?) ;
1850- }
1851- Err ( error) if error. kind ( ) == std:: io:: ErrorKind :: NotFound => { }
1852- Err ( error) => {
1853- return Err ( error)
1854- . with_context ( || format ! ( "inspect workspace fact {}" , workspace. display( ) ) ) ;
1855- }
1856- }
1857- }
1858- Ok ( workspace_dirs)
1859- }
1860-
18611839fn project (
18621840 root : & Path ,
18631841 source : ProjectionSource ,
0 commit comments