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: expected type to be Array<Json>, but got Array<Json> instead #6999

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

tsuf239
Copy link
Collaborator

@tsuf239 tsuf239 commented Aug 6, 2024

fixes #5421
in addition to the examples in the issue, I added one with MutMap (since it was also missing).
I noticed that Set and MutSet aren't legal Json values, is that right @Chriscbr? (or should I add them as well)

Checklist

  • Title matches Winglang's style guide
  • Description explains motivation and solution
  • Tests added (always)
  • Docs updated (only required for features)
  • Added pr/e2e-full label if this feature requires end-to-end testing

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

@tsuf239 tsuf239 requested a review from a team as a code owner August 6, 2024 11:49
Copy link

github-actions bot commented Aug 6, 2024

Thanks for opening this pull request! 🎉
Please consult the contributing guidelines for details on how to contribute to this project.
If you need any assistance, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and standard library @chriscbr
Wing Console @skyrpex
Wing compiler and language design @chriscbr
VSCode extension and language server @chriscbr
Wing CLI @chriscbr
Documentation @boyney123
Examples @boyney123
Wing Playground @skyrpex

@tsuf239 tsuf239 changed the title fix: Expected type to be "Array<Json>", but got "Array<Json>" instead fix: expected type to be Array<Json>, but got Array<Json> instead Aug 6, 2024
@monadabot
Copy link
Contributor

monadabot commented Aug 6, 2024

Console preview environment is available at https://wing-console-pr-6999.fly.dev 🚀

Last Updated (UTC) 2024-08-07 11:09

@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 6, 2024
@tsuf239 tsuf239 removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 6, 2024
@monadabot
Copy link
Contributor

Benchmarks

Comparison to Baseline ⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 58ms±0.72 58ms±2.61 +0ms (+0.16%)⬜
empty.test.w -t sim 370ms±3.36 383ms±18.28 +13ms (+3.46%)🟥
empty.test.w -t tf-aws 622ms±5.06 613ms±6.25 -9ms (-1.44%)⬜
hello_world.test.w -t sim 419ms±8.65 411ms±5.81 -7ms (-1.74%)⬜
hello_world.test.w -t tf-aws 1516ms±25.85 1495ms±9.55 -20ms (-1.34%)⬜
jsii_small.test.w -t sim 380ms±7.03 376ms±4.7 -4ms (-1.07%)⬜
jsii_small.test.w -t tf-aws 628ms±4.51 620ms±4.65 -8ms (-1.28%)⬜
jsii_big.test.w -t sim 2968ms±8.95 2967ms±20.02 -1ms (-0.03%)⬜
jsii_big.test.w -t tf-aws 3169ms±13.06 3187ms±16.04 +18ms (+0.57%)⬜
functions_1.test.w -t sim 406ms±3.71 404ms±5.87 -2ms (-0.57%)⬜
functions_1.test.w -t tf-aws 860ms±6.51 858ms±3.72 -2ms (-0.21%)⬜
functions_10.test.w -t sim 509ms±8.83 494ms±28.66 -16ms (-3.08%)⬜
functions_10.test.w -t tf-aws 2177ms±13.72 2178ms±21.54 +0ms (+0.01%)⬜

⬜ Within 1.5 standard deviations
🟩 Faster, Above 1.5 standard deviations
🟥 Slower, Above 1.5 standard deviations

Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI.

Results
name mean min max moe sd
version 58ms 55ms 68ms 3ms 4ms
empty.test.w -t sim 383ms 359ms 437ms 18ms 26ms
empty.test.w -t tf-aws 613ms 599ms 625ms 6ms 9ms
hello_world.test.w -t sim 411ms 401ms 423ms 6ms 8ms
hello_world.test.w -t tf-aws 1495ms 1486ms 1531ms 10ms 13ms
jsii_small.test.w -t sim 376ms 368ms 387ms 5ms 7ms
jsii_small.test.w -t tf-aws 620ms 612ms 632ms 5ms 7ms
jsii_big.test.w -t sim 2967ms 2932ms 3014ms 20ms 28ms
jsii_big.test.w -t tf-aws 3187ms 3160ms 3221ms 16ms 22ms
functions_1.test.w -t sim 404ms 391ms 421ms 6ms 8ms
functions_1.test.w -t tf-aws 858ms 850ms 867ms 4ms 5ms
functions_10.test.w -t sim 494ms 445ms 568ms 29ms 40ms
functions_10.test.w -t tf-aws 2178ms 2136ms 2236ms 22ms 30ms
Last Updated (UTC) 2024-08-06 12:12

@Chriscbr
Copy link
Contributor

Chriscbr commented Aug 6, 2024

I noticed that Set and MutSet aren't legal Json values, is that right @Chriscbr?

That's correct - Set and MutSet in Wing map to the JavaScript Set type, which can't be used as plain JSON.

examples/tests/valid/json-types.test.w Outdated Show resolved Hide resolved
@tsuf239 tsuf239 requested a review from Chriscbr August 7, 2024 10:54
@monadabot monadabot added the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 7, 2024
@tsuf239 tsuf239 removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Aug 8, 2024
Copy link
Contributor

mergify bot commented Aug 12, 2024

Thanks for contributing, @tsuf239! This PR will now be added to the merge queue, or immediately merged if tsuf/expected-array-but-got-array is up-to-date with main and the queue is empty.

mergify bot added a commit that referenced this pull request Aug 12, 2024
@mergify mergify bot merged commit b6f63b6 into main Aug 12, 2024
15 checks passed
@mergify mergify bot deleted the tsuf/expected-array-but-got-array branch August 12, 2024 16:09
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.82.3.

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.

Expected type to be "Array<Json>", but got "Array<Json>" instead
3 participants