winglang/wing
GitHub ã§èŠãMany functions of `util` should not be listed in preflight
Open
#6,077 opened on 2024幎3æ27æ¥
good first issueðš sdkð bug
Repository metrics
- Stars
- Â (5,385 stars)
- PR merge metrics
-  (30d ã« merged PR ã¯ãããŸãã)
説æ
I tried this:
bring util;
class Foo {
new() {
util.shell("sleep 1 && echo Hello > ../file.txt");
let output = util.shell("cat ../file.txt", throw: true);
log("{output}");
}
}
new Foo();
This happened:
An error has occurred:
Failed to compile.
Error: Error executing command "cat ../file.txt". Exited with error: cat: ../file.txt: No such file or directory
I expected this:
No response
Is there a workaround?
No response
Anything else?
Because async functions are called normally (without await) they continue to run in the background and the following lines of code are called.
I think in this case it is better to hide async functions from a preflight block.
Wing Version
0.62.3
Node.js Version
v20.11.0
Platform(s)
MacOS
Community Notes
- Please vote by adding a ð reaction to the issue to help us prioritize.
- If you are interested to work on this issue, please leave a comment.