winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
5.06k stars 198 forks source link

Compiler panic when creating infrastructure during inflight #7136

Open skyrpex opened 2 months ago

skyrpex commented 2 months ago

I tried this:

bring cloud;

test "presigned url" {
  let bucket = new cloud.Bucket() as "Bucket";
  let obj = new cloud.Object() as "Object";
}

Run wing compile main.w.

This happened:

Panic message:
panicked at packages/@winglang/wingc/src/lifting.rs:347:48:
a phase
Unexpected end of JSON input

I expected this:

The compiler should show an error mentioning that creating infrastructure during inflight isn't supported.

Is there a workaround?

No response

Anything else?

No response

Wing Version

0.85.7

Node.js Version

No response

Platform(s)

No response

Community Notes