Skip to content

fix: circle deps when require RawModule and condition of isDeferred #19762

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

Merged
merged 1 commit into from
Aug 4, 2025

Conversation

hai-x
Copy link
Member

@hai-x hai-x commented Aug 3, 2025

What kind of change does this PR introduce?

Fix circle deps:

Dependency.js/ModuleDependency.js -> RawModule.js -> ModuleGraph.js -> CommonJsSelfReferenceDependency.js/HarmonyImportDependency.js -> Dependency.js/ModuleDependency.js

Fixes the condition of moduleGraph.isDeferred:

Should return true only when incoming modules include HarmonyImportDependency (not CommonJsSelfReferenceDependency) and its defer is set to true.

Did you add tests for your changes?

Existing

Does this PR introduce a breaking change?

No

What needs to be documented once your changes are merged?

No

Copy link

codspeed-hq bot commented Aug 3, 2025

CodSpeed Performance Report

Merging #19762 will degrade performances by 27.09%

Comparing circle-deps (4f0e117) with main (de79ee4)

Summary

⚡ 1 improvements
❌ 1 regressions
✅ 28 untouched benchmarks
⁉️ 12 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
⁉️ benchmark "cache-filesystem", scenario '{"name":"mode-development","mode":"development"}' 1.6 s N/A N/A
⁉️ benchmark "cache-filesystem", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 232.5 ms N/A N/A
⁉️ benchmark "cache-filesystem", scenario '{"name":"mode-production","mode":"production"}' 1.1 s N/A N/A
⁉️ benchmark "context-commonjs", scenario '{"name":"mode-development","mode":"development"}' 153.2 ms N/A N/A
⁉️ benchmark "context-commonjs", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 41.4 ms N/A N/A
⁉️ benchmark "context-commonjs", scenario '{"name":"mode-production","mode":"production"}' 747.1 ms N/A N/A
⁉️ benchmark "context-esm", scenario '{"name":"mode-development","mode":"development"}' 356.7 ms N/A N/A
⁉️ benchmark "context-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 56.9 ms N/A N/A
⁉️ benchmark "context-esm", scenario '{"name":"mode-production","mode":"production"}' 3.8 s N/A N/A
benchmark "devtool-eval", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 106.3 ms 80.3 ms +32.33%
benchmark "devtool-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 87.2 ms 119.6 ms -27.09%
⁉️ benchmark "three-long", scenario '{"name":"mode-development","mode":"development"}' 5.3 s N/A N/A
⁉️ benchmark "three-long", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 230.1 ms N/A N/A
⁉️ benchmark "three-long", scenario '{"name":"mode-production","mode":"production"}' 5.2 s N/A N/A

@alexander-akait alexander-akait merged commit 55b57e5 into main Aug 4, 2025
40 of 41 checks passed
@alexander-akait alexander-akait deleted the circle-deps branch August 4, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants