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

[Feature]: support speed-measure-webpack-plugin #6665

Open
renzp94 opened this issue May 30, 2024 · 9 comments
Open

[Feature]: support speed-measure-webpack-plugin #6665

renzp94 opened this issue May 30, 2024 · 9 comments
Labels
feat New feature or request stale

Comments

@renzp94
Copy link
Contributor

renzp94 commented May 30, 2024

System Info

System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M1 Pro
Memory: 100.42 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
pnpm: 9.0.6 - ~/.nvm/versions/node/v20.12.2/bin/pnpm
bun: 1.1.8 - ~/.bun/bin/bun
Watchman: 2024.01.22.00 - /opt/homebrew/bin/watchman
Browsers:
Chrome: 125.0.6422.113
Safari: 17.2.1

Details

ERROR: Error: × TypeError: Cannot read properties of undefined (reading 'tap')
│ at module.exports.tap (/Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/[email protected]_webpack@5.91.0_@swc[email protected][email protected]_/node_modules/
│ speed-measure-webpack-plugin/utils.js:157:45)
│ at Object.fn (/Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/[email protected]_webpack@5.91.0_@swc[email protected][email protected]_/node_modules/speed-
│ measure-webpack-plugin/index.js:256:7)
│ at SyncHook.callAsyncStageRange (/Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/@rspack[email protected]/node_modules/@rspack/core/dist/lite-tapable/index.js:214:21)
│ at SyncHook.callStageRange (/Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/@rspack[email protected]/node_modules/@rspack/core/dist/lite-tapable/index.js:232:14)
│ at QueriedHook.call (/Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/@rspack[email protected]/node_modules/@rspack/core/dist/lite-tapable/index.js:193:26)
│ at /Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/@rspack[email protected]/node_modules/@rspack/core/dist/Compiler.js:575:244
│ at last.function (/Users/mr.r/Documents/xgamer/github/renzp94/rzpack/node_modules/.pnpm/@rspack[email protected]/node_modules/@rspack/core/dist/Compiler.js:746:28)

Reproduce link

https://github.com/renzp94/rzpack

Reproduce Steps

For example:

  • pnpm install
  • pnpm run playground:build:time
@renzp94 renzp94 added bug Something isn't working pending triage The issue/PR is currently untouched. labels May 30, 2024
@LingyuCoder
Copy link
Collaborator

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.

So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

@LingyuCoder LingyuCoder removed the pending triage The issue/PR is currently untouched. label May 30, 2024
@renzp94
Copy link
Contributor Author

renzp94 commented May 30, 2024

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.

So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

I developed a packaging tool using webpack: rzpack. Now I want to support rspack packaging. As a new feature, rsdoctor is supported, but I want to keep it consistent with the usage of webpack. Do you have any plans to support it?

@LingyuCoder
Copy link
Collaborator

LingyuCoder commented May 30, 2024

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.
So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

I used webpack to package a packaging tool: rzpack. Now I want to support rspack and make it as compatible as possible with previous features. Is there a plan to support it?

Rsdoctor can be used on webpack too.

The compilation.normalModuleLoader hook will be deprecated in webpack. You can see it here.

In webpack5 it will be replaced with NormalModule.getCompilationHooks(compilation).loader and this has been implemented in rspack but can not modify the loader context yet. Modifing loader context affects a lot and it is a hard job. Perhaps we will support it after 1.0 released

@renzp94
Copy link
Contributor Author

renzp94 commented May 30, 2024

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.
So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

I used webpack to package a packaging tool: rzpack. Now I want to support rspack and make it as compatible as possible with previous features. Is there a plan to support it?

Rsdoctor can be used on webpack too.

The compilation.normalModuleLoader hook will be deprecated in webpack. You can see it here.

In webpack5 it will be replaced with NormalModule.getCompilationHooks(compilation).loader and this has been implemented in rspack but can not modify the loader context yet. Modifing loader context affects a lot and it is a hard job. Perhaps we will support it after 1.0 released

Thank you very much for the answer. I am looking forward to the release of 1.0.

@h-a-n-a h-a-n-a added feat New feature or request and removed bug Something isn't working labels Jun 18, 2024
@h-a-n-a h-a-n-a changed the title [Bug]: speed-measure-webpack-plugin not supported [Feature]: support speed-measure-webpack-plugin Jun 18, 2024
@easy1090
Copy link
Collaborator

easy1090 commented Jul 17, 2024

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.
So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

I developed a packaging tool using webpack: rzpack. Now I want to support rspack packaging. As a new feature, rsdoctor is supported, but I want to keep it consistent with the usage of webpack. Do you have any plans to support it?

rsdoctor also supports webpack analysis. @renzp94

@renzp94
Copy link
Contributor Author

renzp94 commented Jul 17, 2024

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.
So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

I developed a packaging tool using webpack: rzpack. Now I want to support rspack packaging. As a new feature, rsdoctor is supported, but I want to keep it consistent with the usage of webpack. Do you have any plans to support it?

rsdoctor also supports webpack analysis. @renzp94

I know, but I want to be compatible with speed-measure-webpack-plugin.@easy1090

Rspack does not support compilation.normalModuleLoader hook yet, which is used by speed-measure-webpack-plugin. Loader resolving is on the Rust side and it will affect performance significantly if port to JavaScript side. Some loaders are implemented by Rust so that they can not be measured by this plugin.
So you can try to follow rspack profiling guide to trace events of rspack. And also you can try to use rsdoctor for more detailed performance data analysis.

I developed a packaging tool using webpack: rzpack. Now I want to support rspack packaging. As a new feature, rsdoctor is supported, but I want to keep it consistent with the usage of webpack. Do you have any plans to support it?

Copy link

stale bot commented Sep 15, 2024

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Sep 15, 2024
@LingyuCoder
Copy link
Collaborator

bump

@stale stale bot removed the stale label Sep 16, 2024
Copy link

stale bot commented Nov 15, 2024

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@stale stale bot added the stale label Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request stale
Projects
None yet
Development

No branches or pull requests

4 participants