bazelbuild / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
231 stars 76 forks source link

refactor: Promisify `execFile` #384

Closed vogelsgesang closed 2 months ago

vogelsgesang commented 2 months ago

await is more readable than the explicit use of promises. Also, this works towards flipping strictNullChecks to true, because TypeScript complains a bit less about the promisified execFile than about explicit uses of callbacks and promises.

While at it, this commit also moves the getBazelInfo function from debugger/client.ts over to the BazelInfo class, where it can be more easily reused. This has the nice side-effect, that also this info call will now respect any startupOptions potentially configured by the user.