winglang / winglang/wing

Compiler panic when creating infrastructure during inflight

Open
#7,136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

🐛 bug 🛠️ compiler
Dominant language
TypeScript
Stars
5.4k
Forks
215
Avg merge
2h 9m
Merged PRs (30d)
27

Description

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
  • 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

First reproduce the panic with wing compile main.w using the issue's sample, then inspect packages/@winglang/wingc/src/lifting.rs around line 347. Done means the same infrastructure creation during inflight reports an error that it is unsupported instead of panicking.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.