Skip to content

fix: missing context depenendency#10221

Merged
LingyuCoder merged 2 commits intomainfrom
fix/context-missing-dependency
Apr 28, 2025
Merged

fix: missing context depenendency#10221
LingyuCoder merged 2 commits intomainfrom
fix/context-missing-dependency

Conversation

@LingyuCoder
Copy link
Contributor

Summary

fix #5536

Removed context directory should be add to missing dependencies of watcher.

Checklist

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

@LingyuCoder LingyuCoder requested review from Copilot and h-a-n-a April 28, 2025 05:41
@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Apr 28, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request fixes the issue related to missing context dependencies by updating both test cases and core logic. The changes include:

  • Adding a plugin in the test configuration to assert missing dependencies.
  • Updating the test cases to require language-specific modules.
  • Modifying the core context module factory logic to include missing dependencies.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/rspack-test-tools/tests/configCases/context/missing-dependency/rspack.config.js Added a custom plugin to assert that the missing dependency is correctly tracked
packages/rspack-test-tools/tests/configCases/context/missing-dependency/index.js Updated to require language-specific files
packages/rspack-test-tools/tests/configCases/context/missing-dependency/errors.js Added an error expectation for missing dependencies
crates/rspack_core/src/context_module_factory.rs Included missing dependencies in both success and error branches
Comments suppressed due to low confidence (1)

packages/rspack-test-tools/tests/configCases/context/missing-dependency/rspack.config.js:8

  • [nitpick] The plugin name "DonePlugin" is generic; consider renaming it to something more descriptive that reflects its function in handling missing context dependencies.
compiler.hooks.done.tap("DonePlugin", stats => {

@netlify
Copy link

netlify bot commented Apr 28, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 2376ead
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/680f15247a8e3800098539da

@LingyuCoder LingyuCoder enabled auto-merge (squash) April 28, 2025 05:47
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 28, 2025

CodSpeed Performance Report

Merging #10221 will not alter performance

Comparing fix/context-missing-dependency (2376ead) with main (c361db6)

🎉 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

@LingyuCoder LingyuCoder merged commit 59558eb into main Apr 28, 2025
56 of 58 checks passed
@LingyuCoder LingyuCoder deleted the fix/context-missing-dependency branch April 28, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug 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.

Not being able to recover from error if context that is missing is being added back

3 participants