BrenekH / kotlin-for-frc

A VSCode Extension that adds Kotlin templates and support for the FIRST Robotics Competition.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code is littered with async/await statements to keep synchronous operation

BrenekH opened this issue · comments

Currently the code uses await to synchronously communicate with the vscode fs api. The problem is that functions using await must be async, which then must be called with an await of its own, cascading all the way to the activation of the extension.

A better way is to pass the code that must be run after the value is returned, but this would require major rewrites and redesigns to the sections of code that deal with the file system.

I didn't actually "fix" this in the rewrite, but I'm much more ok about its use.