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

Fix Json.stringify parameters for use with newer versions of wing compiler #21

Merged
merged 2 commits into from
Aug 29, 2023

Conversation

whummer
Copy link
Contributor

@whummer whummer commented Aug 29, 2023

Fix Json.stringify(..) parameters in sample, for use with newer versions of wing compiler:

$ wing compile --target tf-aws voting-app/main.w

error: Expected type to be "JsonStringifyOptions?", but got "num" instead
    --> voting-app/main.w:232:28
    |
232 |   log(Json.stringify(body, 2));
    |                            ^ Expected type to be "JsonStringifyOptions?", but got "num" instead

wing version:

$ wing --version
0.26.7

Another alternative would be to remove the parameter altogether, to make the sample code backward-compatible with older wing versions. Not sure what would be preferable from your perspective?


/cc @Chriscbr @skorfmann

main.w Outdated Show resolved Hide resolved
Copy link
Contributor

@Chriscbr Chriscbr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @whummer!

@Chriscbr Chriscbr merged commit 4f09b14 into winglang:main Aug 29, 2023
1 check failed
@whummer whummer deleted the json-stringify branch August 29, 2023 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants