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

feat: nodeof built-in function #5411

Merged
merged 12 commits into from
Jan 3, 2024
Merged

feat: nodeof built-in function #5411

merged 12 commits into from
Jan 3, 2024

Conversation

Chriscbr
Copy link
Contributor

@Chriscbr Chriscbr commented Jan 2, 2024

Closes #2027

This PR adds a nodeof() function, a handy built-in for reflecting on the application tree (aka construct tree) in preflight.

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 January 2, 2024 23:54
@Chriscbr Chriscbr changed the title feat: nodeof feat: nodeof built-in function Jan 2, 2024
@monadabot
Copy link
Contributor

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 @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

libs/wingc/src/parser.rs Outdated Show resolved Hide resolved
@monadabot
Copy link
Contributor

monadabot commented Jan 3, 2024

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

Last Updated (UTC) 2024-01-03 20:27

@monadabot
Copy link
Contributor

monadabot commented Jan 3, 2024

Benchmarks

Comparison to Baseline 🟥⬜⬜⬜🟥⬜⬜⬜🟥⬜⬜⬜⬜
Benchmark Before After Change
version 71ms±0.29 73ms±0.43 +2ms (+2.56%)🟥
jsii_big.test.w -t sim 3382ms±19.69 3393ms±17.04 +11ms (+0.33%)⬜
jsii_big.test.w -t tf-aws 3482ms±14.55 3482ms±11.62 0ms (-0.01%)⬜
functions_1.test.w -t sim 624ms±5.15 624ms±4.46 ...
functions_1.test.w -t tf-aws 1677ms±27.48 1839ms±68.26 +162ms (+9.68%)🟥
hello_world.test.w -t sim 623ms±4.57 627ms±5.51 +4ms (+0.69%)⬜
hello_world.test.w -t tf-aws 4806ms±38.86 4822ms±32.18 +15ms (+0.32%)⬜
functions_10.test.w -t sim 691ms±6.06 693ms±4.85 +2ms (+0.28%)⬜
functions_10.test.w -t tf-aws 3584ms±16.63 4148ms±12.79 +564ms (+15.74%)🟥
jsii_small.test.w -t sim 593ms±5.23 597ms±4.71 +4ms (+0.69%)⬜
jsii_small.test.w -t tf-aws 713ms±7.48 712ms±7.24 0ms (-0.05%)⬜
empty.test.w -t sim 594ms±3.04 596ms±6.1 +3ms (+0.45%)⬜
empty.test.w -t tf-aws 703ms±4.94 707ms±4.12 +3ms (+0.47%)⬜

⬜ 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 73ms 72ms 74ms 0ms 1ms
jsii_big.test.w -t sim 3393ms 3364ms 3428ms 17ms 24ms
jsii_big.test.w -t tf-aws 3482ms 3457ms 3507ms 12ms 16ms
functions_1.test.w -t sim 624ms 615ms 636ms 4ms 6ms
functions_1.test.w -t tf-aws 1839ms 1709ms 1996ms 68ms 95ms
hello_world.test.w -t sim 627ms 616ms 643ms 6ms 8ms
hello_world.test.w -t tf-aws 4822ms 4743ms 4876ms 32ms 45ms
functions_10.test.w -t sim 693ms 686ms 703ms 5ms 7ms
functions_10.test.w -t tf-aws 4148ms 4117ms 4172ms 13ms 18ms
jsii_small.test.w -t sim 597ms 589ms 608ms 5ms 7ms
jsii_small.test.w -t tf-aws 712ms 695ms 726ms 7ms 10ms
empty.test.w -t sim 596ms 582ms 610ms 6ms 9ms
empty.test.w -t tf-aws 707ms 699ms 717ms 4ms 6ms
Last Updated (UTC) 2024-01-03 20:35

@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 Jan 3, 2024
libs/wingc/src/nodeof_transform.rs Outdated Show resolved Hide resolved
libs/wingc/src/ast.rs Show resolved Hide resolved
libs/wingc/src/lib.rs Outdated Show resolved Hide resolved
libs/wingsdk/src/helpers.ts Show resolved Hide resolved
@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 Jan 3, 2024
Copy link
Contributor

mergify bot commented Jan 3, 2024

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

@mergify mergify bot merged commit c52cca6 into main Jan 3, 2024
15 checks passed
@mergify mergify bot deleted the rybickic/nodeof branch January 3, 2024 20:36
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.54.29.

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.

API for reflecting on the construct tree (nodeof)
5 participants