Skip to content

Commit e2ee88b

Browse files
committed
More docs
1 parent ae693fa commit e2ee88b

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

CONTRIBUTING.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Artifacts cleaning through `bsb -clean` removes `.compiler.log` and turns into s
2424
### Streaming Update of Diagnostics
2525

2626
After saving a file and running the build, the results stream into the log file. Unfortunately, UX-wise, in the editor, this might look like the diagnostics are suddenly gone then coming back in file by file. This looks bad. To remediate:
27+
2728
- If the log file is in state 2 (see state numbers above), don't wipe the existing diagnostics yet.
2829
- If it's in state 3, update those particular files' diagnostics.
2930
- If in state 4, finish by clean up the rest of the old diagnostics. This means there's a bit of bookeeping needed here. Make sure you get it right. It's possible for a build to be interrupted (and therefore state 4 never reached) and restarted.
@@ -62,10 +63,4 @@ The formatted result should be taken as-is, without any extra string trimming an
6263

6364
The errors returned from `bsc.exe -format` should be discarded; in theory, they should have been duplicates of the errors from `.compiler.log`.
6465

65-
- should the format still show errors when the build isn't running?
66-
- should it show during various states of `.compiler.log`?
67-
68-
69-
<!-- - when to check for .bsb.lock
70-
- when to check for lib/bs -->
71-
66+
In the future, we should consier showing the format errors when `.compiler.log` isn't found.

server/src/server.ts

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ let sendUpdatedDiagnostics = () => {
2626
let diagnosedFiles: { [key: string]: t.Diagnostic[] } = {}
2727
compilerLogPaths.forEach(compilerLogPath => {
2828
let content = fs.readFileSync(compilerLogPath, { encoding: 'utf-8' });
29+
console.log("new log content: ", content)
2930
let filesAndErrors = utils.parseCompilerLogOutput(content, ":")
3031
Object.keys(filesAndErrors).forEach(file => {
3132
// assumption: there's no existing files[file] entry

server/src/utils.ts

-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,5 @@ export let parseCompilerLogOutput = (content: string, separator: string) => {
219219
})
220220
})
221221

222-
console.log(ret, '=========')
223222
return ret
224223
}

0 commit comments

Comments
 (0)