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(compiler): warning if unsupported package manager is used #6961

Merged
merged 6 commits into from
Jul 30, 2024

Conversation

Chriscbr
Copy link
Contributor

@Chriscbr Chriscbr commented Jul 29, 2024

Adding a small warning to help users encountering issues using winglibs with other JavaScript package managers. (#6129). Screenshot of what the diagnostic looks like:

Screenshot 2024-07-29 at 7 34 50 PM

I ended up also removing some code for injecting panics into the compiler that has seldom been used in my experience (it introduced some snapshot regressions and removing the code seemed like the simpler fix).

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 skyrpex July 29, 2024 23:33
@Chriscbr Chriscbr requested a review from a team as a code owner July 29, 2024 23:33
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 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 Jul 29, 2024

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

Last Updated (UTC) 2024-07-30 19:30

@monadabot
Copy link
Contributor

Benchmarks

Comparison to Baseline ⬜🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜
Benchmark Before After Change
version 58ms±0.74 57ms±0.57 -2ms (-2.78%)⬜
empty.test.w -t sim 373ms±4.71 389ms±16.67 +16ms (+4.34%)🟥
empty.test.w -t tf-aws 618ms±4.26 615ms±4.56 -3ms (-0.46%)⬜
hello_world.test.w -t sim 419ms±7.4 409ms±6.47 -10ms (-2.43%)⬜
hello_world.test.w -t tf-aws 1514ms±13.99 1506ms±10.57 -8ms (-0.53%)⬜
jsii_big.test.w -t sim 2984ms±15.48 2973ms±13.18 -10ms (-0.34%)⬜
jsii_big.test.w -t tf-aws 3194ms±13.95 3184ms±14.95 -10ms (-0.3%)⬜
functions_1.test.w -t sim 414ms±6.17 407ms±4.93 -8ms (-1.84%)⬜
functions_1.test.w -t tf-aws 865ms±6.87 860ms±5.98 -5ms (-0.62%)⬜
functions_10.test.w -t sim 515ms±6.84 508ms±11.68 -8ms (-1.52%)⬜
functions_10.test.w -t tf-aws 2228ms±11.78 2206ms±7.5 -22ms (-0.99%)⬜
jsii_small.test.w -t sim 383ms±3.72 379ms±4.14 -4ms (-1.02%)⬜
jsii_small.test.w -t tf-aws 629ms±2.69 631ms±10.13 +2ms (+0.32%)⬜

⬜ 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 57ms 56ms 58ms 1ms 1ms
empty.test.w -t sim 389ms 363ms 433ms 17ms 23ms
empty.test.w -t tf-aws 615ms 605ms 624ms 5ms 6ms
hello_world.test.w -t sim 409ms 397ms 426ms 6ms 9ms
hello_world.test.w -t tf-aws 1506ms 1486ms 1533ms 11ms 15ms
jsii_big.test.w -t sim 2973ms 2938ms 3000ms 13ms 18ms
jsii_big.test.w -t tf-aws 3184ms 3160ms 3227ms 15ms 21ms
functions_1.test.w -t sim 407ms 397ms 418ms 5ms 7ms
functions_1.test.w -t tf-aws 860ms 844ms 871ms 6ms 8ms
functions_10.test.w -t sim 508ms 475ms 528ms 12ms 16ms
functions_10.test.w -t tf-aws 2206ms 2188ms 2216ms 8ms 10ms
jsii_small.test.w -t sim 379ms 368ms 387ms 4ms 6ms
jsii_small.test.w -t tf-aws 631ms 616ms 668ms 10ms 14ms
Last Updated (UTC) 2024-07-30 00:15

Copy link
Contributor

@MarkMcCulloh MarkMcCulloh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments but I understand we probably don't want to overcomplicate this so it LGTM as-is 👍

libs/wingc/src/lib.rs Outdated Show resolved Hide resolved
libs/wingc/src/lib.rs Show resolved Hide resolved
libs/wingc/src/lib.rs Show resolved Hide resolved
libs/wingc/src/parser.rs Show resolved Hide resolved
libs/wingc/src/lib.rs Show resolved Hide resolved
libs/tree-sitter-wing/grammar.js Show resolved Hide resolved
Copy link
Contributor

mergify bot commented Jul 30, 2024

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

mergify bot added a commit that referenced this pull request Jul 30, 2024
@mergify mergify bot merged commit b200bde into main Jul 30, 2024
15 checks passed
@mergify mergify bot deleted the rybickic/package-manager-warning branch July 30, 2024 19:54
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.79.20.

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.

4 participants