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: cannot use datetime or regex as a type annotation #7001

Merged
merged 4 commits into from
Aug 6, 2024

Conversation

tsuf239
Copy link
Contributor

@tsuf239 tsuf239 commented Aug 6, 2024

Checklist

fixes #6376

Please pay attention that std.Regex and std.Datetime cannot be used by types now (similarly how std.Json can't be used as a type, if it's a bug let me know and I'll open an issue @Chriscbr )

  • 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 14:31
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

@monadabot
Copy link
Contributor

monadabot commented Aug 6, 2024

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

Last Updated (UTC) 2024-08-06 14:48

monadabot and others added 3 commits August 6, 2024 16:44
Signed-off-by: monada-bot[bot] <monabot@monada.co>
Signed-off-by: monada-bot[bot] <monabot@monada.co>
@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
@monadabot
Copy link
Contributor

Benchmarks

Comparison to Baseline ⬜⬜⬜⬜⬜⬜⬜⬜⬜🟥🟥⬜⬜
Benchmark Before After Change
version 62ms±1.13 61ms±0.81 -1ms (-2.08%)⬜
empty.test.w -t sim 396ms±6.52 395ms±8.65 -1ms (-0.28%)⬜
empty.test.w -t tf-aws 654ms±5.98 661ms±8.69 +7ms (+1.05%)⬜
hello_world.test.w -t sim 443ms±6.57 428ms±8.8 -15ms (-3.4%)⬜
hello_world.test.w -t tf-aws 1585ms±19.12 1587ms±24.12 +2ms (+0.11%)⬜
jsii_small.test.w -t sim 410ms±5.58 412ms±9.25 +2ms (+0.55%)⬜
jsii_small.test.w -t tf-aws 660ms±8.26 669ms±7.3 +9ms (+1.37%)⬜
jsii_big.test.w -t sim 3126ms±22.84 3144ms±28.97 +18ms (+0.58%)⬜
jsii_big.test.w -t tf-aws 3309ms±23.01 3320ms±18.8 +11ms (+0.34%)⬜
functions_1.test.w -t sim 411ms±7.46 434ms±6.65 +23ms (+5.53%)🟥
functions_1.test.w -t tf-aws 882ms±10.58 911ms±8.75 +29ms (+3.27%)🟥
functions_10.test.w -t sim 517ms±8.24 515ms±25.73 -2ms (-0.34%)⬜
functions_10.test.w -t tf-aws 2246ms±11.72 2308ms±23.85 +62ms (+2.78%)⬜

⬜ 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 61ms 59ms 63ms 1ms 1ms
empty.test.w -t sim 395ms 383ms 425ms 9ms 12ms
empty.test.w -t tf-aws 661ms 642ms 683ms 9ms 12ms
hello_world.test.w -t sim 428ms 412ms 455ms 9ms 12ms
hello_world.test.w -t tf-aws 1587ms 1540ms 1663ms 24ms 34ms
jsii_small.test.w -t sim 412ms 391ms 431ms 9ms 13ms
jsii_small.test.w -t tf-aws 669ms 661ms 688ms 7ms 10ms
jsii_big.test.w -t sim 3144ms 3093ms 3196ms 29ms 41ms
jsii_big.test.w -t tf-aws 3320ms 3281ms 3375ms 19ms 26ms
functions_1.test.w -t sim 434ms 421ms 448ms 7ms 9ms
functions_1.test.w -t tf-aws 911ms 895ms 936ms 9ms 12ms
functions_10.test.w -t sim 515ms 446ms 557ms 26ms 36ms
functions_10.test.w -t tf-aws 2308ms 2251ms 2345ms 24ms 33ms
Last Updated (UTC) 2024-08-06 14:54

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.

🚀 🚀 Thank you @tsuf239! This is awesome!

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

mergify bot commented Aug 6, 2024

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

@mergify mergify bot merged commit 36e6b27 into main Aug 6, 2024
15 checks passed
@mergify mergify bot deleted the tsuf/std-classes-type-annotation branch August 6, 2024 14:57
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.82.1.

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.

Cannot use datetime or regex as a type annotation
3 participants