File tree 1 file changed +4
-2
lines changed
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) => {
135
135
}
136
136
let root = projectsFiles . get ( projectRootPath ) ! ;
137
137
root . openFiles . add ( filePath ) ;
138
+ let firstOpenFileOfProject = root . openFiles . size === 1 ;
138
139
// check if .bsb.lock is still there. If not, start a bsb -w ourselves
139
140
// because otherwise the diagnostics info we'll display might be stale
140
141
let bsbLockPath = path . join ( projectRootPath , c . bsbLock ) ;
141
- if ( ! fs . existsSync ( bsbLockPath ) ) {
142
+ if ( firstOpenFileOfProject && ! fs . existsSync ( bsbLockPath ) ) {
142
143
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
144
146
// TODO: close watcher when lang-server shuts down
145
147
if ( fs . existsSync ( bsbPath ) ) {
146
148
let payload : clientSentBuildAction = {
You can’t perform that action at this time.
0 commit comments