Closed eladcon closed 3 months ago
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
I modernized the code and no errors are now thrown, but the log message is still not printed, so I'll keep the issue. main.w:
bring cloud;
class Foo {
new(){}
extern "./comp_ext.js" static inflight wingCompile(code: str): str;
pub inflight compile(code: str): str {
return Foo.wingCompile(code);
}
}
let f = new Foo();
new cloud.Function(inflight () => {
log(f.compile("log(\"this will be logged as well\");"));
}) as "test:call";
comp_ext.js:
const { compile, Target } = require("winglang/dist/commands/compile");
const { writeFile, readFile } = require("fs/promises");
const { join } = require("path");
exports.wingCompile = async function (code) {
const wingFile = "/tmp/test.w";
await writeFile(wingFile, code, "utf-8");
const outDir = await compile(wingFile, { target: Target.TF_AWS });
const tfJson = await readFile(join(outDir, "main.tf.json"), "utf-8");
return tfJson;
};
Hi,
This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
I tried this
Tried running a wing app that compiles wing code
wing test -t sim test.w
test.w:
external_js:
I expected this:
the test to run and to see the output
this will be logged as well
Instead, this happened
got en error:
Is there a workaround?
No response
Component
SDK
Wing Version
No response
Wing Console Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
the error seems to point that
process.stderr
is missing from the global object. But even when fixing that there are also some mismatches between types inside the vm and outside of it.Community Notes