File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -390,9 +390,24 @@ function triggerIncrementalCompilationOfFile(
390
390
if ( debug ( ) ) console . log ( "Did not find open project for " + filePath ) ;
391
391
return ;
392
392
}
393
- const workspaceRootPath = projectRootPath
394
- ? utils . findProjectRootOfFile ( projectRootPath , true )
395
- : null ;
393
+
394
+ const projectRewatchLockfile = path . resolve (
395
+ projectRootPath ,
396
+ c . rewatchLockPartialPath
397
+ ) ;
398
+
399
+ let foundRewatchLockfileInProjectRoot = false ;
400
+ try {
401
+ fs . statSync ( projectRewatchLockfile ) ;
402
+ foundRewatchLockfileInProjectRoot = true ;
403
+ } catch { }
404
+
405
+ // if we find a rewatch.lock in the project root, it's a compilation of a local package
406
+ // in the workspace.
407
+ const workspaceRootPath =
408
+ projectRootPath && ! foundRewatchLockfileInProjectRoot
409
+ ? utils . findProjectRootOfFile ( projectRootPath , true )
410
+ : null ;
396
411
397
412
const bscBinaryLocation = project . bscBinaryLocation ;
398
413
if ( bscBinaryLocation == null ) {
You can’t perform that action at this time.
0 commit comments