@@ -5,15 +5,12 @@ import * as t from "vscode-languageserver-types";
55import * as j from "vscode-jsonrpc" ;
66import * as m from "vscode-jsonrpc/lib/messages" ;
77import * as v from "vscode-languageserver" ;
8- import { attachPartialResult } from 'vscode-languageserver/lib/progress' ;
98import * as path from 'path' ;
10- import fs , { open } from 'fs' ;
9+ import fs from 'fs' ;
1110import * as childProcess from 'child_process' ;
1211import { DidOpenTextDocumentNotification , DidChangeTextDocumentNotification , DidCloseTextDocumentNotification } from 'vscode-languageserver-protocol' ;
1312import * as tmp from 'tmp' ;
14- import { type } from 'os' ;
1513import { Range } from 'vscode-languageserver-textdocument' ;
16- import { strict } from 'assert' ;
1714
1815// See https://microsoft.github.io/language-server-protocol/specification Abstract Message
1916// version is fixed to 2.0
@@ -190,16 +187,10 @@ let startWatchingBsbOutputFile = (root: p.DocumentUri, process: NodeJS.Process)
190187 let content = fs . readFileSync ( bsbLogPath , { encoding : 'utf-8' } ) ;
191188 let filesAndErrors = parseBsbLogOutput ( content )
192189 Object . keys ( filesAndErrors ) . forEach ( file => {
190+ // assumption: there's no existing files[file] entry
191+ // this is true; see the lines above. A file can only belong to one bsb.log root
193192 files [ file ] = filesAndErrors [ file ]
194193 } )
195- // content.split('\n').forEach(line => {
196- // let [file, diagnosis] = line.split(': ');
197-
198- // if (files[file] == null) {
199- // files[file] = []
200- // }
201- // files[file].push(diagnosis)
202- // })
203194 } ) ;
204195
205196 Object . keys ( files ) . forEach ( file => {
0 commit comments