File tree Expand file tree Collapse file tree 4 files changed +5
-6
lines changed
turbopack/crates/turbopack-cli Expand file tree Collapse file tree 4 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ fn list_apps() -> (PathBuf, Vec<PathBuf>) {
29
29
let path = entry. path ( ) ;
30
30
if path. is_dir ( ) {
31
31
// Exclude node_modules
32
- if path. file_name ( ) . unwrap ( ) . to_string_lossy ( ) == "node_modules" {
32
+ if path. file_name ( ) . unwrap_or_default ( ) == "node_modules" {
33
33
continue ;
34
34
}
35
35
@@ -68,7 +68,6 @@ fn bench_small_apps(c: &mut Criterion) {
68
68
let app_name = app. file_name ( ) . unwrap ( ) . to_string_lossy ( ) . to_string ( ) ;
69
69
70
70
rt. block_on ( async move {
71
- //
72
71
turbopack_cli:: build:: build ( & BuildArguments {
73
72
common : CommonArguments {
74
73
entries : Some ( vec ! [ format!( "{app_name}/index.tsx" ) ] ) ,
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ async fn build_internal(
199
199
target : Target ,
200
200
) -> Result < Vc < ( ) > > {
201
201
let output_fs = output_fs ( project_dir. clone ( ) ) ;
202
- let project_fs = project_fs ( root_dir. clone ( ) ) ;
202
+ let project_fs = project_fs ( root_dir. clone ( ) , /* watch= */ false ) ;
203
203
let project_relative = project_dir. strip_prefix ( & * root_dir) . unwrap ( ) ;
204
204
let project_relative: RcStr = project_relative
205
205
. strip_prefix ( MAIN_SEPARATOR )
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ async fn source(
264
264
. into ( ) ;
265
265
266
266
let output_fs = output_fs ( project_dir) ;
267
- let fs: Vc < Box < dyn FileSystem > > = project_fs ( root_dir) ;
267
+ let fs: Vc < Box < dyn FileSystem > > = project_fs ( root_dir, /* watch= */ true ) ;
268
268
let root_path = fs. root ( ) . to_resolved ( ) . await ?;
269
269
let project_path = root_path. join ( project_relative) . to_resolved ( ) . await ?;
270
270
Original file line number Diff line number Diff line change @@ -60,9 +60,9 @@ pub fn normalize_entries(entries: &Option<Vec<String>>) -> Vec<RcStr> {
60
60
}
61
61
62
62
#[ turbo_tasks:: function]
63
- pub async fn project_fs ( project_dir : RcStr ) -> Result < Vc < Box < dyn FileSystem > > > {
63
+ pub async fn project_fs ( project_dir : RcStr , watch : bool ) -> Result < Vc < Box < dyn FileSystem > > > {
64
64
let disk_fs = DiskFileSystem :: new ( "project" . into ( ) , project_dir, vec ! [ ] ) ;
65
- if cfg ! ( not ( codspeed ) ) {
65
+ if watch {
66
66
disk_fs. await ?. start_watching ( None ) . await ?;
67
67
}
68
68
Ok ( Vc :: upcast ( disk_fs) )
You can’t perform that action at this time.
0 commit comments