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

feat!: use native resolver in loader #4945

Merged
merged 13 commits into from
Jul 9, 2024
Merged

Conversation

bvanjoi
Copy link
Collaborator

@bvanjoi bvanjoi commented Dec 7, 2023

Fixes #4672

This pull request exports the ResolverFactory from the Rust implementation to the JavaScript side.

There are some differences between the Rust native ResolverFactory/Resolver and their counterparts in webpack:

  1. The Rust native ResolverFactory does not support any hooks.
  2. The Rust native Resolver only supports the following functions:
    1. resolveSync
    2. resolve
    3. withOptions

@bvanjoi bvanjoi requested review from a team December 7, 2023 13:35
@bvanjoi bvanjoi marked this pull request as draft December 7, 2023 13:35
@github-actions github-actions bot added the release: feature release: feature related release(mr only) label Dec 7, 2023
@bvanjoi bvanjoi force-pushed the fix-4672 branch 2 times, most recently from 1c97e84 to 213dd0f Compare December 18, 2023 04:15
@bvanjoi bvanjoi marked this pull request as ready for review December 18, 2023 04:16
crates/rspack_binding_values/src/compilation.rs Outdated Show resolved Hide resolved
packages/rspack/src/NativeResolverFactory.ts Outdated Show resolved Hide resolved
packages/rspack/src/Compilation.ts Outdated Show resolved Hide resolved
@hardfist
Copy link
Contributor

hardfist commented Jan 7, 2024

@bvanjoi I don't remember why we don't hold on this?

Copy link

stale bot commented Mar 24, 2024

This pull request has been automatically marked as stale because it has not had recent activity. If this pull request is still relevant, please leave any comment (for example, "bump").

@stale stale bot added the stale label Mar 24, 2024
@hardfist
Copy link
Contributor

close for outdated

@hardfist hardfist closed this May 19, 2024
@SyMind SyMind reopened this Jul 8, 2024
@stale stale bot removed the stale label Jul 8, 2024
Copy link

netlify bot commented Jul 8, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 38dee5b
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/668cf9164128990009241b89

@SyMind
Copy link
Member

SyMind commented Jul 9, 2024

!bench

@rspack-bot
Copy link

rspack-bot commented Jul 9, 2024

📝 Benchmark detail: Open

Name Base (2024-07-09 f2bc023) Current Change
10000_development-mode + exec 2.18 s ± 17 ms 2.19 s ± 19 ms +0.62 %
10000_development-mode_hmr + exec 688 ms ± 7.5 ms 694 ms ± 3.3 ms +0.82 %
10000_production-mode + exec 2.81 s ± 26 ms 2.86 s ± 52 ms +1.90 %
arco-pro_development-mode + exec 1.91 s ± 55 ms 1.93 s ± 79 ms +0.93 %
arco-pro_development-mode_hmr + exec 433 ms ± 1.8 ms 434 ms ± 2.7 ms +0.15 %
arco-pro_production-mode + exec 3.46 s ± 90 ms 3.47 s ± 76 ms +0.18 %
threejs_development-mode_10x + exec 1.57 s ± 16 ms 1.6 s ± 12 ms +1.69 %
threejs_development-mode_10x_hmr + exec 795 ms ± 8.4 ms 798 ms ± 14 ms +0.48 %
threejs_production-mode_10x + exec 5.58 s ± 22 ms 5.62 s ± 29 ms +0.75 %

@hardfist
Copy link
Contributor

hardfist commented Jul 9, 2024

this is also breaking change, please note add breaking change notice

@SyMind SyMind changed the title feat: use native resolver in loader feat!: use native resolver in loader Jul 9, 2024
@SyMind SyMind merged commit 914f31a into web-infra-dev:main Jul 9, 2024
31 checks passed
@chenjiahan
Copy link
Member

Hi, I wonder in which case this will break the user's config or plugin, can we add more explanations

@chenjiahan chenjiahan added the release: breaking change release: breaking change related release(mr only) label Jul 10, 2024
@chenjiahan
Copy link
Member

Added "release: breaking change" label for changelog generating

@ahabhgk
Copy link
Collaborator

ahabhgk commented Jul 10, 2024

!eco-ci

@rspack-bot
Copy link

rspack-bot commented Jul 10, 2024

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
nx ❌ failure
rspress ✅ success
rsbuild ❌ failure
examples ✅ success

@chenjiahan
Copy link
Member

It looks like an Rsbuild e2e case is failed:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: breaking change release: breaking change related release(mr only) release: feature release: feature related release(mr only)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

js loader should use rust side resolver other than enhanced-resolve
7 participants