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(compiler): unable to define json structs with enums #7011

Merged
merged 5 commits into from
Aug 12, 2024

Conversation

Chriscbr
Copy link
Contributor

@Chriscbr Chriscbr commented Aug 12, 2024

Fixes #7004

For now, we're just working with the assumption that Wing enums are just a simple list of constants (if that changes in the future, this code would have to change).

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.

@Chriscbr Chriscbr requested a review from a team as a code owner August 12, 2024 16:44
Copy link

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

@monadabot
Copy link
Contributor

monadabot commented Aug 12, 2024

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

Last Updated (UTC) 2024-08-12 17:01

@monadabot
Copy link
Contributor

Benchmarks

Comparison to Baseline ⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 57ms±0.83 57ms±0.54 -1ms (-0.96%)⬜
hello_world.test.w -t sim 410ms±5.33 426ms±22.24 +16ms (+3.87%)🟥
hello_world.test.w -t tf-aws 1511ms±10.93 1489ms±14.16 -22ms (-1.44%)⬜
jsii_big.test.w -t sim 2956ms±18.92 2946ms±17.86 -10ms (-0.35%)⬜
jsii_big.test.w -t tf-aws 3175ms±10.21 3176ms±24.03 +1ms (+0.03%)⬜
functions_1.test.w -t sim 409ms±5.43 408ms±6.05 -1ms (-0.16%)⬜
functions_1.test.w -t tf-aws 860ms±7.39 856ms±8.81 -3ms (-0.39%)⬜
empty.test.w -t sim 366ms±3.01 369ms±3.56 +3ms (+0.85%)⬜
empty.test.w -t tf-aws 621ms±6.17 622ms±6.06 +1ms (+0.19%)⬜
functions_10.test.w -t sim 507ms±7.97 497ms±15.59 -10ms (-1.99%)⬜
functions_10.test.w -t tf-aws 2209ms±14.33 2213ms±20.37 +4ms (+0.17%)⬜
jsii_small.test.w -t sim 381ms±4.44 389ms±6.4 +8ms (+2.09%)⬜
jsii_small.test.w -t tf-aws 626ms±4.44 631ms±6.55 +5ms (+0.85%)⬜

⬜ 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 57ms 56ms 58ms 1ms 1ms
hello_world.test.w -t sim 426ms 398ms 489ms 22ms 31ms
hello_world.test.w -t tf-aws 1489ms 1463ms 1531ms 14ms 20ms
jsii_big.test.w -t sim 2946ms 2911ms 2996ms 18ms 25ms
jsii_big.test.w -t tf-aws 3176ms 3138ms 3250ms 24ms 34ms
functions_1.test.w -t sim 408ms 396ms 426ms 6ms 8ms
functions_1.test.w -t tf-aws 856ms 836ms 875ms 9ms 12ms
empty.test.w -t sim 369ms 361ms 379ms 4ms 5ms
empty.test.w -t tf-aws 622ms 611ms 635ms 6ms 8ms
functions_10.test.w -t sim 497ms 461ms 519ms 16ms 22ms
functions_10.test.w -t tf-aws 2213ms 2157ms 2266ms 20ms 28ms
jsii_small.test.w -t sim 389ms 376ms 400ms 6ms 9ms
jsii_small.test.w -t tf-aws 631ms 611ms 646ms 7ms 9ms
Last Updated (UTC) 2024-08-12 16:57

@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 12, 2024
Copy link
Contributor

@eladb eladb left a comment

Choose a reason for hiding this comment

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

🙏🙏

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

mergify bot commented Aug 12, 2024

Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if rybickic/enum-schema is up-to-date with main and the queue is empty.

@mergify mergify bot merged commit f57a913 into main Aug 12, 2024
15 checks passed
@mergify mergify bot deleted the rybickic/enum-schema branch August 12, 2024 18:50
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.82.4.

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.

Unable to define "json structs" with enums
3 participants