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: improved sourcemaps with relative paths and better relative handling for extern #5550

Merged
merged 22 commits into from
Jan 26, 2024

Conversation

MarkMcCulloh
Copy link
Contributor

@MarkMcCulloh MarkMcCulloh commented Jan 26, 2024

Changes

  • fixes can't use winglibs from subdirectory #5457
    • Partially fixed, at least
    • The error was added as a dumb limitation of the relative path calculation, which is now fixed
    • However, this error was also used to prevent the creation of wing libraries that reference extern paths outside the library itself. This limitation is unnecessary for entrypoint files, so those cases now work
  • Sourcemap source paths are now relative
    • They were previously emitted as absolute for reasons I don't remember, but it seems I got it working this time
    • This should also fix sourcemaps for typescript
  • when bundling, avoid encoding the bundle output and just write the raw bytes to disk
  • Omit wingsdk and node internals from pretty stack traces
  • Removed parens from stack trace, not convinced it is useful
  • Properly handle sourcemaps for inflight clients in the sim. Previously these were useless as the context was lost between the client/server

Before

image

After

image

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

@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

@monadabot
Copy link
Contributor

monadabot commented Jan 26, 2024

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

Last Updated (UTC) 2024-01-26 21:39

@monadabot
Copy link
Contributor

monadabot commented Jan 26, 2024

Benchmarks

Comparison to Baseline 🟥⬜⬜🟥⬜⬜⬜🟥⬜⬜⬜🟥⬜
Benchmark Before After Change
version 72ms±0.27 74ms±0.69 +2ms (+3.01%)🟥
functions_1.test.w -t sim 580ms±7.24 588ms±6.83 +8ms (+1.42%)⬜
functions_1.test.w -t tf-aws 923ms±3.38 937ms±11.97 +14ms (+1.51%)⬜
jsii_big.test.w -t sim 3316ms±10.1 3359ms±13.87 +43ms (+1.31%)🟥
jsii_big.test.w -t tf-aws 3409ms±16.65 3439ms±9.08 +30ms (+0.88%)⬜
empty.test.w -t sim 547ms±3.33 549ms±4.06 +2ms (+0.35%)⬜
empty.test.w -t tf-aws 658ms±5.5 665ms±6.64 +7ms (+1.09%)⬜
jsii_small.test.w -t sim 548ms±4.59 559ms±3.87 +11ms (+1.97%)🟥
jsii_small.test.w -t tf-aws 661ms±6.45 672ms±4.3 +12ms (+1.74%)⬜
functions_10.test.w -t sim 650ms±6.27 656ms±9.79 +6ms (+0.92%)⬜
functions_10.test.w -t tf-aws 2292ms±9.85 2316ms±12.12 +23ms (+1.02%)⬜
hello_world.test.w -t sim 584ms±4.78 594ms±4.27 +10ms (+1.76%)🟥
hello_world.test.w -t tf-aws 1546ms±6.57 1569ms±11.02 +23ms (+1.48%)⬜

⬜ 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 74ms 73ms 76ms 1ms 1ms
functions_1.test.w -t sim 588ms 572ms 601ms 7ms 10ms
functions_1.test.w -t tf-aws 937ms 919ms 977ms 12ms 17ms
jsii_big.test.w -t sim 3359ms 3321ms 3382ms 14ms 19ms
jsii_big.test.w -t tf-aws 3439ms 3422ms 3454ms 9ms 13ms
empty.test.w -t sim 549ms 541ms 558ms 4ms 6ms
empty.test.w -t tf-aws 665ms 652ms 682ms 7ms 9ms
jsii_small.test.w -t sim 559ms 551ms 569ms 4ms 5ms
jsii_small.test.w -t tf-aws 672ms 661ms 681ms 4ms 6ms
functions_10.test.w -t sim 656ms 641ms 687ms 10ms 14ms
functions_10.test.w -t tf-aws 2316ms 2287ms 2335ms 12ms 17ms
hello_world.test.w -t sim 594ms 587ms 604ms 4ms 6ms
hello_world.test.w -t tf-aws 1569ms 1549ms 1604ms 11ms 15ms
Last Updated (UTC) 2024-01-26 21:46

@MarkMcCulloh MarkMcCulloh changed the title feat: relative paths in sourcemaps and better relative handling for extern, improved sourcemaps feat: improved sourcemaps with relative paths and better relative handling for extern Jan 26, 2024
libs/wingsdk/src/util/enhanced-error.ts Outdated Show resolved Hide resolved
@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 26, 2024
@MarkMcCulloh MarkMcCulloh removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Jan 26, 2024
@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 26, 2024
@MarkMcCulloh MarkMcCulloh added the 🚧 pr/do-not-merge PRs with this label will not be automatically merged by mergify. label Jan 26, 2024
@MarkMcCulloh MarkMcCulloh removed ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! 🚧 pr/do-not-merge PRs with this label will not be automatically merged by mergify. labels Jan 26, 2024
monadabot and others added 2 commits January 26, 2024 22:48
@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 26, 2024
@MarkMcCulloh MarkMcCulloh removed the ⚠️ pr/review-mutation PR has been mutated and will not auto-merge. Clear this label if the changes look good! label Jan 26, 2024
Copy link
Contributor

mergify bot commented Jan 26, 2024

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

@mergify mergify bot merged commit d4e1731 into main Jan 26, 2024
23 checks passed
@mergify mergify bot deleted the mark/better-relative branch January 26, 2024 21:57
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.56.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

can't use winglibs from subdirectory
3 participants