winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.97k stars 196 forks source link

fix(compiler): structs with same name in different files overwrite their generated schema object #6617

Closed yoav-steinberg closed 3 months ago

yoav-steinberg commented 3 months ago

fixes #5779

We now only output the relevant structs schemas for each file instead of all structs. This way we make sure structs with the same name in different files don't overwrite each other's schema.

Checklist

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

github-actions[bot] commented 3 months ago

Thanks for opening this pull request! :tada: 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 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 commented 3 months ago

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

Last Updated (UTC) 2024-06-02 09:03
monadabot commented 3 months ago

Benchmarks

Comparison to Baseline ⬜⬜⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜ | Benchmark | Before | After | Change | | :-- | --: | --: | --: | | version | 56ms±0.33 | 56ms±0.63 | +0ms (+0.82%)⬜ | | functions_10.test.w -t sim | 508ms±25.58 | 491ms±9.44 | -17ms (-3.38%)⬜ | | functions_10.test.w -t tf-aws | 2005ms±8.18 | 2032ms±19.8 | +27ms (+1.34%)⬜ | | hello_world.test.w -t sim | 392ms±4.39 | 405ms±6.56 | +13ms (+3.25%)🟥 | | hello_world.test.w -t tf-aws | 1437ms±7.52 | 1442ms±4.5 | +5ms (+0.32%)⬜ | | functions_1.test.w -t sim | 395ms±2.71 | 395ms±3.86 | 0ms (-0.13%)⬜ | | functions_1.test.w -t tf-aws | 814ms±5.64 | 811ms±4.23 | -2ms (-0.3%)⬜ | | jsii_big.test.w -t sim | 2771ms±11.04 | 2780ms±7.81 | +9ms (+0.34%)⬜ | | jsii_big.test.w -t tf-aws | 2990ms±12.89 | 2977ms±9.85 | -13ms (-0.43%)⬜ | | empty.test.w -t sim | 361ms±3.45 | 363ms±3.63 | +2ms (+0.47%)⬜ | | empty.test.w -t tf-aws | 586ms±4.9 | 591ms±4.29 | +4ms (+0.73%)⬜ | | jsii_small.test.w -t sim | 368ms±4.62 | 372ms±3.58 | +4ms (+0.96%)⬜ | | jsii_small.test.w -t tf-aws | 608ms±5.07 | 608ms±5.28 | 0ms (-0.07%)⬜ | ⬜ 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|56ms|56ms|58ms|1ms|1ms| |functions_10.test.w -t sim|491ms|460ms|504ms|9ms|13ms| |functions_10.test.w -t tf-aws|2032ms|1984ms|2076ms|20ms|28ms| |hello_world.test.w -t sim|405ms|394ms|424ms|7ms|9ms| |hello_world.test.w -t tf-aws|1442ms|1432ms|1455ms|5ms|6ms| |functions_1.test.w -t sim|395ms|388ms|402ms|4ms|5ms| |functions_1.test.w -t tf-aws|811ms|804ms|821ms|4ms|6ms| |jsii_big.test.w -t sim|2780ms|2760ms|2800ms|8ms|11ms| |jsii_big.test.w -t tf-aws|2977ms|2959ms|3004ms|10ms|14ms| |empty.test.w -t sim|363ms|354ms|370ms|4ms|5ms| |empty.test.w -t tf-aws|591ms|580ms|600ms|4ms|6ms| |jsii_small.test.w -t sim|372ms|360ms|378ms|4ms|5ms| |jsii_small.test.w -t tf-aws|608ms|600ms|624ms|5ms|7ms|
Last Updated (UTC) 2024-06-02 08:59
mergify[bot] commented 3 months ago

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

monadabot commented 3 months ago

Congrats! :rocket: This was released in Wing 0.74.33.