wing icon indicating copy to clipboard operation
wing copied to clipboard

fix(compiler): lifting globals from inflight classes defined in preflight fails

Open yoav-steinberg opened this issue 1 year ago • 3 comments

See #2730

  • [x] 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.

yoav-steinberg avatar Jan 28 '24 09:01 yoav-steinberg

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 assistence, 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 @eladb
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 @skorfmann
Wing Playground @eladcon

monadabot avatar Jan 28 '24 09:01 monadabot

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

Last Updated (UTC) 2024-06-27 11:59

monadabot avatar Jan 28 '24 09:01 monadabot

Benchmarks

Comparison to Baseline ⬜🟥⬜⬜⬜🟥⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 57ms±0.74 56ms±0.56 0ms (-0.88%)⬜
jsii_small.test.w -t sim 373ms±5.68 393ms±17.51 +20ms (+5.27%)🟥
jsii_small.test.w -t tf-aws 609ms±5.87 612ms±5.05 +4ms (+0.58%)⬜
jsii_big.test.w -t sim 2972ms±19.2 2960ms±18.56 -12ms (-0.41%)⬜
jsii_big.test.w -t tf-aws 3171ms±18.96 3189ms±15.84 +18ms (+0.58%)⬜
functions_10.test.w -t sim 487ms±13.16 511ms±12.09 +24ms (+4.98%)🟥
functions_10.test.w -t tf-aws 2080ms±16.26 2136ms±33.78 +56ms (+2.71%)⬜
hello_world.test.w -t sim 404ms±3.92 404ms±4.5 0ms (-0.12%)⬜
hello_world.test.w -t tf-aws 1459ms±7.78 1463ms±9.24 +4ms (+0.28%)⬜
empty.test.w -t sim 360ms±5.39 368ms±6.14 +8ms (+2.34%)⬜
empty.test.w -t tf-aws 590ms±6.48 593ms±4.38 +3ms (+0.5%)⬜
functions_1.test.w -t sim 402ms±3.41 398ms±5.55 -3ms (-0.75%)⬜
functions_1.test.w -t tf-aws 829ms±3.96 837ms±7.98 +7ms (+0.9%)⬜

⬜ 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 55ms 57ms 1ms 1ms
jsii_small.test.w -t sim 393ms 375ms 442ms 18ms 24ms
jsii_small.test.w -t tf-aws 612ms 597ms 622ms 5ms 7ms
jsii_big.test.w -t sim 2960ms 2926ms 3002ms 19ms 26ms
jsii_big.test.w -t tf-aws 3189ms 3161ms 3239ms 16ms 22ms
functions_10.test.w -t sim 511ms 474ms 529ms 12ms 17ms
functions_10.test.w -t tf-aws 2136ms 2060ms 2196ms 34ms 47ms
hello_world.test.w -t sim 404ms 393ms 411ms 5ms 6ms
hello_world.test.w -t tf-aws 1463ms 1447ms 1489ms 9ms 13ms
empty.test.w -t sim 368ms 355ms 385ms 6ms 9ms
empty.test.w -t tf-aws 593ms 586ms 602ms 4ms 6ms
functions_1.test.w -t sim 398ms 387ms 410ms 6ms 8ms
functions_1.test.w -t tf-aws 837ms 818ms 858ms 8ms 11ms
Last Updated (UTC) 2024-06-27 12:05

monadabot avatar Jan 28 '24 09:01 monadabot

:x: Unstable Self-Mutation :x:

Self-mutation has run twice in a row. There may be a something non-deterministic in the build or test process. Check the last mutation commit (e7ff30f2ac49687ab740ba4a06a91fba999c2bfd) for suspicious changes. This is typically caused by:

  • Absolute paths
  • Timestamps
  • Random values
  • Flakey tests (relying on one of the above)

monadabot avatar Jun 13 '24 13:06 monadabot

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

mergify[bot] avatar Jun 27 '24 12:06 mergify[bot]

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

monadabot avatar Jun 27 '24 13:06 monadabot