Skip to content

test: add test case for circular dependency with externals #19623

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

Conversation

3ru
Copy link
Contributor

@3ru 3ru commented Jun 24, 2025

What kind of change does this PR introduce?

Tests verify that webpack correctly handles:

  • Circular dependencies between ESM external modules (external-a.mjsexternal-b.mjs)
  • Live bindings preservation in circular scenarios
  • Re-exports within circular dependencies
  • Multiple imports of the same circular external module

Rel: #17121

Did you add tests for your changes?

yes

Does this PR introduce a breaking change?

no

What needs to be documented once your changes are merged?

no need

@3ru 3ru force-pushed the fix/esm-circular-externals-from-main branch from 9b46307 to 2267f64 Compare June 24, 2025 07:18
Copy link

codspeed-hq bot commented Jun 24, 2025

CodSpeed Performance Report

Merging #19623 will degrade performances by 93.75%

Comparing 3ru:fix/esm-circular-externals-from-main (9a501cb) with main (21b28a8)

Summary

⚡ 2 improvements
❌ 5 regressions
✅ 126 untouched benchmarks

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

Benchmarks breakdown

Benchmark BASE HEAD Change
benchmark "cache-filesystem", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 14.1 ms 225.8 ms -93.75%
benchmark "context-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 50 ms 60.4 ms -17.22%
benchmark "devtool-source-map", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 43 ms 10.4 ms ×4.1
benchmark "future-defaults", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.3 ms 49.4 ms -77.06%
benchmark "lodash", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.4 ms 34.8 ms -67.37%
benchmark "many-modules-esm", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 11.2 ms 50.1 ms -77.69%
benchmark "three-long", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' 223.6 ms 13.3 ms ×17

@alexander-akait
Copy link
Member

@3ru Let's fix tests, thank you

@3ru 3ru marked this pull request as draft June 24, 2025 15:30
@alexander-akait
Copy link
Member

Ignore 500 from yarn, soon we will migrate from yarn

@3ru 3ru marked this pull request as ready for review June 24, 2025 15:58
@xiaoxiaojx
Copy link
Member

I retried the test and it passed.

@alexander-akait alexander-akait merged commit 10fb556 into webpack:main Jun 25, 2025
80 of 82 checks passed
@3ru 3ru deleted the fix/esm-circular-externals-from-main branch June 25, 2025 16:06
3ru added a commit to 3ru/webpack that referenced this pull request Jul 1, 2025
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.

3 participants