Skip to content

perf: define Rspack version to reduce require calls#10121

Merged
chenjiahan merged 6 commits intomainfrom
require_calls_0422
Apr 23, 2025
Merged

perf: define Rspack version to reduce require calls#10121
chenjiahan merged 6 commits intomainfrom
require_calls_0422

Conversation

@chenjiahan
Copy link
Member

@chenjiahan chenjiahan commented Apr 22, 2025

Summary

The rspackVersion and webpackVersion are static values and can be defined as env vars in rslib.config.ts, this helps to reduce require() calls and make the startup faster.

The release-canary.yml has been updated to build JS packages after updating the package.json#verison. Tested in https://github.com/web-infra-dev/rspack/actions/runs/14592747054.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link

netlify bot commented Apr 22, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit f316926
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/68085c632f48f10008a9bc29
😎 Deploy Preview https://deploy-preview-10121--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: performance release: performance related release(mr only) labels Apr 22, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 22, 2025

CodSpeed Performance Report

Merging #10121 will not alter performance

Comparing require_calls_0422 (f316926) with main (6605e91)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 11 untouched benchmarks

@h-a-n-a
Copy link
Contributor

h-a-n-a commented Apr 22, 2025

This is weird. We're supposed to add prettier in lint-staged https://github.com/web-infra-dev/rspack/actions/runs/14590748863/job/40925296541?pr=10121

@chenjiahan
Copy link
Member Author

@h-a-n-a There are two CI issues:

  1. Lint CI is not triggered correctly when modifying *.cjs
  2. Lint CI will not prevent merge even if it fails (does not set as required)

@stormslowly is working on resolving them 😄

@h-a-n-a
Copy link
Contributor

h-a-n-a commented Apr 22, 2025

@h-a-n-a There are two CI issues:

  1. Lint CI is not triggered correctly when modifying *.cjs
  2. Lint CI will not prevent merge even if it fails (does not set as required)

@stormslowly is working on resolving them 😄

Thanks for the heads-up. IMO, part of the issue is located at lint-staged. Maybe we didn't trigger it locally.

@chenjiahan
Copy link
Member Author

Thanks for the heads-up. IMO, part of the issue is located at lint-staged. Maybe we didn't trigger it locally.

Agreed, we should check the lint-staged configuration too. @stormslowly cc~

@chenjiahan chenjiahan requested a review from SoonIter April 22, 2025 13:42
SoonIter
SoonIter previously approved these changes Apr 23, 2025
@chenjiahan chenjiahan merged commit 1fff015 into main Apr 23, 2025
30 checks passed
@chenjiahan chenjiahan deleted the require_calls_0422 branch April 23, 2025 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: performance release: performance related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants