Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interactive learning tutorial doesn't work due to possible change in inflight #7008

Open
ablosser-wvuf opened this issue Aug 8, 2024 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@ablosser-wvuf
Copy link

I tried this:

Going through the tutorial on /learn and getting to step 5

This happened:

errors in the inflight call due to it expecting a json input and the example providing a string input
`error: Expected type to be "inflight (event: Json?): Json?", but got "inflight (s: str?): unknown" instead
--> wing/main.w:5:20
|
5 | new cloud.Function(inflight (s: str?) => {
| /--------------------^
6 | | log("Function was called with '{s!}'");
7 | | // (type 'q.' to see the available methods)
8 | | });
| -^

`

I expected this:

I expected the example code to work as is

Is there a workaround?

if I change inflight to expect json instead I can move forward but that has a chain effect with all the future examples as 1 they still provide str instead of json and 2 things like queue push are expecting str instead of json. I can continue working around it by converting things to and from json and string but it's not very friendly for someone new trying to learn.

Anything else?

No response

Wing Version

No response

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.
@ablosser-wvuf ablosser-wvuf added the 🐛 bug Something isn't working label Aug 8, 2024
@eladb
Copy link
Contributor

eladb commented Aug 8, 2024

Hey @ablosser-wvuf, thanks for reporting. We will look into this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
Status: 🆕 New - not properly defined
Development

No branches or pull requests

2 participants