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: Add support for debug IDs #8943

Merged
merged 11 commits into from
Jan 20, 2025
Merged

Conversation

timfish
Copy link
Contributor

@timfish timfish commented Jan 6, 2025

This PR requires this to be merged and released first:

Debug IDs are detailed in the TC39 proposal.

Debug IDs are unique IDs generated from a deterministic hash of the source code which are then injected/included in both source and sourcemap. They can be used to easily identify the correct sourcemaps in production.

I've recently added support for injecting debug IDs to webpack, Rollup, Rolldown and Vite.

This PR adds debug ID to Rspack with the same API as webpack. This means you can enabled debug ID injection by adding -debugids to the end of any devTool string.

@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Jan 6, 2025
Copy link

netlify bot commented Jan 6, 2025

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit c78c6e4
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/678e3ef3cf96610008112051

@hardfist hardfist requested a review from ahabhgk January 16, 2025 05:49
@ahabhgk
Copy link
Contributor

ahabhgk commented Jan 16, 2025

web-infra-dev/rspack-sources#151 rspack_sources v0.4.2 is released

@timfish timfish marked this pull request as ready for review January 16, 2025 11:44
Copy link

codspeed-hq bot commented Jan 16, 2025

CodSpeed Performance Report

Merging #8943 will not alter performance

Comparing timfish:feat/debug-ids (c78c6e4) with main (4fdaf68)

Summary

✅ 3 untouched benchmarks

@timfish
Copy link
Contributor Author

timfish commented Jan 17, 2025

I have no idea why this test is failing in CI. When I run the unit test locally, different tests fail 🤷‍♂️

@ahabhgk
Copy link
Contributor

ahabhgk commented Jan 17, 2025

I will take a look in next week

@ahabhgk
Copy link
Contributor

ahabhgk commented Jan 20, 2025

@SyMind web-infra-dev/rspack-sources#150 this causes a panic in test case "minify-with-devtool-false"

Copy link
Contributor

github-actions bot commented Jan 20, 2025

📝 Benchmark detail: Open

Name Base (2025-01-20 1d58294) Current Change
10000_big_production-mode_disable-minimize + exec 37.8 s ± 901 ms 38 s ± 422 ms +0.65 %
10000_development-mode + exec 1.82 s ± 16 ms 1.85 s ± 90 ms +1.16 %
10000_development-mode_hmr + exec 680 ms ± 6.2 ms 687 ms ± 29 ms +1.02 %
10000_production-mode + exec 2.39 s ± 24 ms 2.38 s ± 71 ms -0.58 %
10000_production-mode_persistent-cold + exec 2.57 s ± 130 ms 2.55 s ± 141 ms -1.07 %
10000_production-mode_persistent-hot + exec 1.76 s ± 31 ms 1.73 s ± 30 ms -1.66 %
arco-pro_development-mode + exec 1.76 s ± 87 ms 1.74 s ± 60 ms -0.90 %
arco-pro_development-mode_hmr + exec 388 ms ± 3.7 ms 387 ms ± 3.5 ms -0.30 %
arco-pro_production-mode + exec 3.74 s ± 79 ms 3.54 s ± 241 ms -5.17 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.79 s ± 53 ms 3.64 s ± 126 ms -4.12 %
arco-pro_production-mode_persistent-cold + exec 3.89 s ± 129 ms 3.72 s ± 116 ms -4.48 %
arco-pro_production-mode_persistent-hot + exec 2.46 s ± 63 ms 2.49 s ± 177 ms +1.09 %
arco-pro_production-mode_traverse-chunk-modules + exec 3.78 s ± 165 ms 3.63 s ± 120 ms -3.91 %
large-dyn-imports_development-mode + exec 2.09 s ± 55 ms 2.08 s ± 15 ms -0.46 %
large-dyn-imports_production-mode + exec 2.15 s ± 48 ms 2.14 s ± 54 ms -0.23 %
threejs_development-mode_10x + exec 1.61 s ± 14 ms 1.51 s ± 14 ms -6.16 %
threejs_development-mode_10x_hmr + exec 770 ms ± 22 ms 768 ms ± 19 ms -0.28 %
threejs_production-mode_10x + exec 5.55 s ± 241 ms 5.17 s ± 76 ms -6.78 %
threejs_production-mode_10x_persistent-cold + exec 5.62 s ± 323 ms 5.34 s ± 332 ms -5.12 %
threejs_production-mode_10x_persistent-hot + exec 4.74 s ± 234 ms 4.48 s ± 76 ms -5.46 %
10000_big_production-mode_disable-minimize + rss memory 8691 MiB ± 16 MiB 8701 MiB ± 32.2 MiB +0.12 %
10000_development-mode + rss memory 647 MiB ± 15.8 MiB 673 MiB ± 11.8 MiB +4.04 %
10000_development-mode_hmr + rss memory 1240 MiB ± 178 MiB 1324 MiB ± 144 MiB +6.78 %
10000_production-mode + rss memory 628 MiB ± 22.8 MiB 654 MiB ± 16 MiB +4.12 %
10000_production-mode_persistent-cold + rss memory 746 MiB ± 13.1 MiB 760 MiB ± 24.7 MiB +1.88 %
10000_production-mode_persistent-hot + rss memory 730 MiB ± 23.5 MiB 755 MiB ± 19.6 MiB +3.52 %
arco-pro_development-mode + rss memory 567 MiB ± 20.5 MiB 586 MiB ± 26.2 MiB +3.33 %
arco-pro_development-mode_hmr + rss memory 638 MiB ± 59.9 MiB 687 MiB ± 57.9 MiB +7.79 %
arco-pro_production-mode + rss memory 728 MiB ± 42 MiB 722 MiB ± 32.2 MiB -0.82 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 730 MiB ± 14.1 MiB 737 MiB ± 52.2 MiB +0.92 %
arco-pro_production-mode_persistent-cold + rss memory 863 MiB ± 51.8 MiB 854 MiB ± 10.5 MiB -1.02 %
arco-pro_production-mode_persistent-hot + rss memory 711 MiB ± 24.1 MiB 718 MiB ± 19.2 MiB +0.93 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 727 MiB ± 14.4 MiB 735 MiB ± 33.3 MiB +1.10 %
large-dyn-imports_development-mode + rss memory 645 MiB ± 4.63 MiB 657 MiB ± 10.9 MiB +1.89 %
large-dyn-imports_production-mode + rss memory 528 MiB ± 6.7 MiB 545 MiB ± 6.48 MiB +3.35 %
threejs_development-mode_10x + rss memory 527 MiB ± 27.9 MiB 543 MiB ± 35.1 MiB +3.08 %
threejs_development-mode_10x_hmr + rss memory 1128 MiB ± 58.7 MiB 1163 MiB ± 120 MiB +3.02 %
threejs_production-mode_10x + rss memory 818 MiB ± 29.1 MiB 855 MiB ± 56.2 MiB +4.54 %
threejs_production-mode_10x_persistent-cold + rss memory 933 MiB ± 25.3 MiB 1002 MiB ± 93.9 MiB +7.33 %
threejs_production-mode_10x_persistent-hot + rss memory 863 MiB ± 57.2 MiB 883 MiB ± 20.4 MiB +2.29 %

Copy link
Contributor

github-actions bot commented Jan 20, 2025

📝 Benchmark detail: Open

Name Base (2025-01-20 1d58294) Current Change
10000_big_production-mode_disable-minimize + exec 37.8 s ± 901 ms 37.8 s ± 216 ms +0.03 %
10000_development-mode + exec 1.82 s ± 16 ms 1.83 s ± 24 ms +0.09 %
10000_development-mode_hmr + exec 680 ms ± 6.2 ms 679 ms ± 5.4 ms -0.12 %
10000_production-mode + exec 2.39 s ± 24 ms 2.39 s ± 96 ms +0.03 %
10000_production-mode_persistent-cold + exec 2.57 s ± 130 ms 2.5 s ± 49 ms -2.86 %
10000_production-mode_persistent-hot + exec 1.76 s ± 31 ms 1.76 s ± 177 ms -0.03 %
arco-pro_development-mode + exec 1.76 s ± 87 ms 1.8 s ± 111 ms +2.38 %
arco-pro_development-mode_hmr + exec 388 ms ± 3.7 ms 388 ms ± 3.2 ms -0.09 %
arco-pro_production-mode + exec 3.74 s ± 79 ms 3.63 s ± 226 ms -3.00 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.79 s ± 53 ms 3.6 s ± 115 ms -4.95 %
arco-pro_production-mode_persistent-cold + exec 3.89 s ± 129 ms 3.74 s ± 127 ms -3.91 %
arco-pro_production-mode_persistent-hot + exec 2.46 s ± 63 ms 2.48 s ± 139 ms +0.67 %
arco-pro_production-mode_traverse-chunk-modules + exec 3.78 s ± 165 ms 3.64 s ± 84 ms -3.59 %
large-dyn-imports_development-mode + exec 2.09 s ± 55 ms 2.14 s ± 271 ms +2.36 %
large-dyn-imports_production-mode + exec 2.15 s ± 48 ms 2.14 s ± 48 ms -0.36 %
threejs_development-mode_10x + exec 1.61 s ± 14 ms 1.51 s ± 30 ms -5.93 %
threejs_development-mode_10x_hmr + exec 770 ms ± 22 ms 772 ms ± 24 ms +0.25 %
threejs_production-mode_10x + exec 5.55 s ± 241 ms 5.29 s ± 340 ms -4.67 %
threejs_production-mode_10x_persistent-cold + exec 5.62 s ± 323 ms 5.45 s ± 335 ms -3.01 %
threejs_production-mode_10x_persistent-hot + exec 4.74 s ± 234 ms 4.57 s ± 154 ms -3.51 %
10000_big_production-mode_disable-minimize + rss memory 8691 MiB ± 16 MiB 8730 MiB ± 69.2 MiB +0.45 %
10000_development-mode + rss memory 647 MiB ± 15.8 MiB 661 MiB ± 46.6 MiB +2.18 %
10000_development-mode_hmr + rss memory 1240 MiB ± 178 MiB 1304 MiB ± 238 MiB +5.16 %
10000_production-mode + rss memory 628 MiB ± 22.8 MiB 648 MiB ± 9.28 MiB +3.17 %
10000_production-mode_persistent-cold + rss memory 746 MiB ± 13.1 MiB 761 MiB ± 32.2 MiB +2.06 %
10000_production-mode_persistent-hot + rss memory 730 MiB ± 23.5 MiB 751 MiB ± 23.2 MiB +2.98 %
arco-pro_development-mode + rss memory 567 MiB ± 20.5 MiB 579 MiB ± 11.5 MiB +2.12 %
arco-pro_development-mode_hmr + rss memory 638 MiB ± 59.9 MiB 659 MiB ± 72.5 MiB +3.26 %
arco-pro_production-mode + rss memory 728 MiB ± 42 MiB 709 MiB ± 27.5 MiB -2.59 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 730 MiB ± 14.1 MiB 724 MiB ± 38.2 MiB -0.89 %
arco-pro_production-mode_persistent-cold + rss memory 863 MiB ± 51.8 MiB 847 MiB ± 50.4 MiB -1.83 %
arco-pro_production-mode_persistent-hot + rss memory 711 MiB ± 24.1 MiB 694 MiB ± 16 MiB -2.48 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 727 MiB ± 14.4 MiB 724 MiB ± 12.5 MiB -0.35 %
large-dyn-imports_development-mode + rss memory 645 MiB ± 4.63 MiB 643 MiB ± 5.55 MiB -0.29 %
large-dyn-imports_production-mode + rss memory 528 MiB ± 6.7 MiB 523 MiB ± 2.8 MiB -0.78 %
threejs_development-mode_10x + rss memory 527 MiB ± 27.9 MiB 548 MiB ± 17.7 MiB +4.02 %
threejs_development-mode_10x_hmr + rss memory 1128 MiB ± 58.7 MiB 1081 MiB ± 172 MiB -4.23 %
threejs_production-mode_10x + rss memory 818 MiB ± 29.1 MiB 856 MiB ± 55.4 MiB +4.66 %
threejs_production-mode_10x_persistent-cold + rss memory 933 MiB ± 25.3 MiB 903 MiB ± 135 MiB -3.27 %
threejs_production-mode_10x_persistent-hot + rss memory 863 MiB ± 57.2 MiB 853 MiB ± 61.7 MiB -1.15 %

@SyMind SyMind merged commit c06787b into web-infra-dev:main Jan 20, 2025
30 checks passed
@timfish timfish deleted the feat/debug-ids branch January 20, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants