Conversation
| return dot; | ||
| } catch (err) { | ||
| throw new Error(`Reading output of interpretation failed: ${err.stderr || err}`); | ||
| throw new Error(`Reading output of interpretation failed: ${getErrorMessage(err)}`); |
There was a problem hiding this comment.
Do we want to give priority to err.stderr here as well?
There was a problem hiding this comment.
I think that was an error. There is no stderr property on the Error class.
There was a problem hiding this comment.
There were other places in this file where err.stderr || err is translated to
(err as any).stderr || getErrorMessage(err). Is the difference due to the catch blocks catching different objects? If so, it might be useful to document how we can tell which expression to use where, for the next person who needs to modify this file.
There was a problem hiding this comment.
That's interesting. I am really struggling to find out why err.stderr is being used, or if that property even exists.
I suspect that it is coming from here:
vscode-codeql/extensions/ql-vscode/src/cli.ts
Line 1048 in cf99c5e
await promisify(child_process.execFile)(...);
returns an object with { stderr, stdout }. It may be that when catching the error from a child process, the stderr property is being read (even though that's a mistake and it doesn't exist). The other locations in the code could just be copies of the first.
There was a problem hiding this comment.
I think you have a better handle on what is happening here than I do, so I will let you do what you think is best.
50d6d0f to
a55a7e7
Compare
The default version of tsc in vscode is now 4.5.4. This version has changed the type of the variable in the catch block. Previously, it was `any`. Now it is `unknown`. This change updates vscode so that it can build with 4.5.4. Previously, this had been a bit of a pain since sometimes running a compile task in vscode will use the global default version of tsc.
a55a7e7 to
23e29a1
Compare
The default version of tsc in vscode is now 4.5.4. This version
has changed the type of the variable in the catch block.
Previously, it was
any. Now it isunknown.This change updates vscode so that it can build with 4.5.4.
Previously, this had been a bit of a pain since sometimes running
a compile task in vscode will use the global default version of
tsc.
This is also a chance to try out the new dependency review workflow.
Checklist
ready-for-doc-reviewlabel there.