@@ -95,6 +95,7 @@ use crate::{
9595 tsconfig:: { ProjectReference , TsConfig } ,
9696} ;
9797use futures:: future:: { try_join_all, BoxFuture } ;
98+ use pnp:: { Error , Manifest } ;
9899
99100type ResolveResult = Result < Option < CachedPath > , ResolveError > ;
100101
@@ -825,15 +826,21 @@ impl<Fs: FileSystem + Send + Sync> ResolverGeneric<Fs> {
825826 println ! ( "find_pnp_manifest: failed" ) ;
826827 }
827828
828-
829829 let cache_key = cached_manifest_path. as_ref ( ) . unwrap_or ( cached_path) ;
830830
831831 println ! ( "the cache key is {:?}" , cache_key. path( ) ) ;
832832
833- let entry = self
834- . pnp_manifest_content_cache
835- . entry ( cache_key. clone ( ) )
836- . or_insert_with ( || pnp:: load_pnp_manifest ( cache_key. path ( ) ) . ok ( ) ) ;
833+ let entry = self . pnp_manifest_content_cache . entry ( cache_key. clone ( ) ) . or_insert_with ( || {
834+ let x = pnp:: load_pnp_manifest ( cache_key. path ( ) ) ;
835+
836+ match x {
837+ Ok ( m) => Some ( m) ,
838+ Err ( e) => {
839+ println ! ( "load manfiest with error {:?}" , e) ;
840+ None
841+ }
842+ }
843+ } ) ;
837844 if entry. is_none ( ) {
838845 println ! ( "load pnpm manifest: failed" ) ;
839846 }
@@ -856,7 +863,7 @@ impl<Fs: FileSystem + Send + Sync> ResolverGeneric<Fs> {
856863 // `resolve_to_unqualified` requires a trailing slash
857864 let mut path = cached_path. to_path_buf ( ) ;
858865
859- dbg ! ( & path) ;
866+ dbg ! ( & path) ;
860867
861868 path. push ( "" ) ;
862869
@@ -896,7 +903,7 @@ impl<Fs: FileSystem + Send + Sync> ResolverGeneric<Fs> {
896903 Err ( _) => Err ( ResolveError :: NotFound ( specifier. to_string ( ) ) ) ,
897904 }
898905 } else {
899- println ! ( "try load pnp_manifest:failed" ) ;
906+ println ! ( "try load pnp_manifest:failed" ) ;
900907
901908 Ok ( None )
902909 }
0 commit comments