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): confusing error when trying to use private constructor #6242

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

Chriscbr
Copy link
Contributor

Fixes #3331

Besides updating this error message, I also updated other error messages to standardize around the name "constructor". This is the name used most in the language reference, and it's probably the most familiar to users coming from TypeScript, so sticking to one terminology in our errors should help make the language feel more cohesive.

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 April 15, 2024 20:13
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 assistence, don't hesitate to ping the relevant owner over Slack.

Topic Owner
Wing SDK and utility APIs @chriscbr
Wing Console @ainvoner, @skyrpex, @polamoros
JSON, structs, primitives and collections @hasanaburayyan
Platforms and plugins @hasanaburayyan
Frontend resources (website, react, etc) @tsuf239
Language design @chriscbr
VSCode extension and language server @markmcculloh
Compiler architecture, inflights, lifting @yoav-steinberg
Wing Testing Framework @tsuf239
Wing CLI @markmcculloh
Build system, dev environment, releases @markmcculloh
Library Ecosystem @chriscbr
Documentation @hasanaburayyan
SDK test suite @tsuf239
Examples @hasanaburayyan
Wing Playground @eladcon

@monadabot
Copy link
Contributor

monadabot commented Apr 15, 2024

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

Last Updated (UTC) 2024-04-15 20:29

@monadabot
Copy link
Contributor

monadabot commented Apr 15, 2024

Benchmarks

Comparison to Baseline 🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 59ms±0.53 60ms±0.59 +1ms (+2.17%)🟥
functions_1.test.w -t sim 398ms±4.58 402ms±3.36 +4ms (+0.91%)⬜
functions_1.test.w -t tf-aws 813ms±7.21 819ms±5.02 +6ms (+0.74%)⬜
hello_world.test.w -t sim 397ms±5.37 396ms±4.31 0ms (-0.12%)⬜
hello_world.test.w -t tf-aws 1510ms±13.69 1512ms±21.24 +2ms (+0.11%)⬜
jsii_big.test.w -t sim 2779ms±15.49 2768ms±9.05 -11ms (-0.4%)⬜
jsii_big.test.w -t tf-aws 2983ms±16.89 2999ms±13.8 +16ms (+0.55%)⬜
functions_10.test.w -t sim 484ms±9.66 488ms±3.74 +4ms (+0.85%)⬜
functions_10.test.w -t tf-aws 1998ms±10.27 2016ms±15.8 +17ms (+0.87%)⬜
jsii_small.test.w -t sim 370ms±2.16 369ms±4.51 -1ms (-0.31%)⬜
jsii_small.test.w -t tf-aws 601ms±3.32 598ms±4.41 -3ms (-0.51%)⬜
empty.test.w -t sim 357ms±2.38 362ms±4.55 +5ms (+1.43%)⬜
empty.test.w -t tf-aws 591ms±3.04 599ms±6.01 +7ms (+1.24%)⬜

⬜ 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 60ms 59ms 62ms 1ms 1ms
functions_1.test.w -t sim 402ms 394ms 408ms 3ms 5ms
functions_1.test.w -t tf-aws 819ms 810ms 830ms 5ms 7ms
hello_world.test.w -t sim 396ms 388ms 405ms 4ms 6ms
hello_world.test.w -t tf-aws 1512ms 1490ms 1591ms 21ms 30ms
jsii_big.test.w -t sim 2768ms 2751ms 2791ms 9ms 13ms
jsii_big.test.w -t tf-aws 2999ms 2976ms 3028ms 14ms 19ms
functions_10.test.w -t sim 488ms 476ms 494ms 4ms 5ms
functions_10.test.w -t tf-aws 2016ms 1970ms 2045ms 16ms 22ms
jsii_small.test.w -t sim 369ms 359ms 378ms 5ms 6ms
jsii_small.test.w -t tf-aws 598ms 588ms 607ms 4ms 6ms
empty.test.w -t sim 362ms 351ms 371ms 5ms 6ms
empty.test.w -t tf-aws 599ms 587ms 615ms 6ms 8ms
Last Updated (UTC) 2024-04-15 20:34

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

mergify bot commented Apr 15, 2024

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

@mergify mergify bot merged commit 97a205a into main Apr 15, 2024
15 checks passed
@mergify mergify bot deleted the rybickic/private-constructor branch April 15, 2024 20:35
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.70.15.

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.

Sweet

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.

Unknown symbol init when trying to use class with private constructor
4 participants