File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -135,12 +135,14 @@ let openedFile = (fileUri: string, fileContent: string) => {
135135 }
136136 let root = projectsFiles . get ( projectRootPath ) ! ;
137137 root . openFiles . add ( filePath ) ;
138+ let firstOpenFileOfProject = root . openFiles . size === 1 ;
138139 // check if .bsb.lock is still there. If not, start a bsb -w ourselves
139140 // because otherwise the diagnostics info we'll display might be stale
140141 let bsbLockPath = path . join ( projectRootPath , c . bsbLock ) ;
141- if ( ! fs . existsSync ( bsbLockPath ) ) {
142+ if ( firstOpenFileOfProject && ! fs . existsSync ( bsbLockPath ) ) {
142143 let bsbPath = path . join ( projectRootPath , c . bsbPartialPath ) ;
143- // TODO: sometime stale .bsb.lock dangling
144+ // TODO: sometime stale .bsb.lock dangling. bsb -w knows .bsb.lock is
145+ // stale. Use that logic
144146 // TODO: close watcher when lang-server shuts down
145147 if ( fs . existsSync ( bsbPath ) ) {
146148 let payload : clientSentBuildAction = {
You can’t perform that action at this time.
0 commit comments