You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rstest has been using the JS file watcher in watch mode because the rspack native (Rust) watcher had a macOS flake — stale FSEvents replayed an empty rerun (expected '' to match 'other.test.ts'), failing ~7.5% on macos-14 runners.
That root cause is now fixed upstream in rspack 2.1.0-beta.0:
With the fix shipped, rstest can switch to the native watcher.
Validation: native watcher on rsbuild 2.1.0-beta.0 was stress-tested on macos-14 (node 22/24, path-reuse condition) — 80/80 green, zero watcher flake.
What
Upgrade @rsbuild/core / @rspack/core to 2.1.0-beta.0 across the workspace.
Enable experiments.nativeWatcher in watch mode.
Raise the default watch aggregateTimeout5 → 100ms — on macOS the native watcher needs the FSEvent → vnode cache invalidation window to elapse before rspack stats the changed file, otherwise the rebuild reads stale content. Drop the now-redundant per-fixture aggregateTimeout: 10 overrides in the watch e2e configs so this default applies.
Make config-file watching reliable on macOS: poll the small config-file set (chokidar v5 dropped fsevents and fs.watch silently drops single-file change events on macOS) and await the initial scan so the first change is never missed.
adapter-rspack: drop the top-level snapshot mapping — snapshot was removed from RspackOptions in rspack 2.1 (it now lives under persistent cache).
Held as draft — blocked on an upstream rspack 2.1 source-map regression.
CI fails on 3 non-watcher e2e tests (list/index, list/json, test-api/timeout) that assert includeTaskLocation source columns. rspack 2.1.0-beta.0 changed the source-map mapping for ESM interop member-call expressions:
(0, _core.describe)('test a', ...) // bundled
The call-site column now resolves to the source ( instead of the describe/it identifier:
location
rspack 2.0.x
rspack 2.1.0-beta.0
describe('test a' (L3)
3:1
3:9
it('test a-1' (L4)
4:3
4:5
it('test a-2' (L9)
9:1
9:3
Root cause confirmed via minimal repro + source-map decode. Not configurable (tested experiments.sourceImport, optimization.concatenateModules, devtool, output.column), not yet fixed on rspack main, and rspack 2.1 is required for the native-watcher fix (so downgrading is not an option).
Holding this PR until the upstream regression is fixed; the task locations will then snap back without any test changes here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Rstest has been using the JS file watcher in watch mode because the rspack native (Rust) watcher had a macOS flake — stale FSEvents replayed an empty rerun (
expected '' to match 'other.test.ts'), failing ~7.5% on macos-14 runners.That root cause is now fixed upstream in rspack 2.1.0-beta.0:
safeTime/FS_ACCURACYgranularity-safe scan (feat(watcher): granularity-safe native watcher scan (watchpack FS_ACCURACY) rspack#14306)With the fix shipped, rstest can switch to the native watcher.
Validation: native watcher on rsbuild 2.1.0-beta.0 was stress-tested on macos-14 (node 22/24, path-reuse condition) — 80/80 green, zero watcher flake.
What
@rsbuild/core/@rspack/coreto2.1.0-beta.0across the workspace.experiments.nativeWatcherin watch mode.aggregateTimeout5 → 100ms— on macOS the native watcher needs the FSEvent → vnode cache invalidation window to elapse before rspack stats the changed file, otherwise the rebuild reads stale content. Drop the now-redundant per-fixtureaggregateTimeout: 10overrides in the watch e2e configs so this default applies.fs.watchsilently drops single-file change events on macOS) and await the initial scan so the first change is never missed.adapter-rspack: drop the top-levelsnapshotmapping —snapshotwas removed fromRspackOptionsin rspack 2.1 (it now lives under persistentcache).