Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/watch/restart.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
const __dirname = path.dirname(__filename);

describe('restart', () => {
it('should restart when rstest config file changed', async () => {

Check failure on line 11 in e2e/watch/restart.test.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-14, 22)

watch/restart.test.ts > restart > should restart when rstest config file changed

test timed out in 15000ms (completed 1 expect assertion) --- CLI Log Start --- Rstest v0.7.2 ✓ index.test.ts (1) Test Files 1 passed Tests 1 passed Duration 85ms (build 41ms%2C tests 44ms) Waiting for file changes... info restarting Rstest as rstest-1.config.mjs changed --- CLI Log End ---

Check failure on line 11 in e2e/watch/restart.test.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-14, 24)

watch/restart.test.ts > restart > should restart when rstest config file changed

test timed out in 15000ms (completed 1 expect assertion) --- CLI Log Start --- Rstest v0.7.2 ✓ index.test.ts (1) Test Files 1 passed Tests 1 passed Duration 121ms (build 50ms%2C tests 71ms) Waiting for file changes... info restarting Rstest as rstest-1.config.mjs changed *** Terminating app due to uncaught exception 'NSInvalidArgumentException'%2C reason%3A '-[__NSMallocBlock__ addObject%3A]%3A unrecognized selector sent to instance 0x600001b5dda0' *** First throw call stack%3A ( 0 CoreFoundation 0x000000019d99b1cc __exceptionPreprocess + 176 1 libobjc.A.dylib 0x000000019d47e158 objc_exception_throw + 60 2 CoreFoundation 0x000000019da4d468 -[NSObject(NSObject) __retain_OA] + 0 3 CoreFoundation 0x000000019d904e1c ___forwarding___ + 1580 4 CoreFoundation 0x000000019d904730 _CF_forwarding_prep_0 + 96 5 rspack.darwin-arm64.node 0x000000012585ea54 napi_register_module_v1 + 4200272 6 rspack.darwin-arm64.node 0x00000001258644e4 napi_register_module_v1 + 4223456 7 rspack.darwin-arm64.node 0x0000000126ba1928 napi_register_module_v1 + 24397348 8 rspack.darwin-arm64.node 0x0000000126ba5bec napi_register_module_v1 + 24414440 9 rspack.darwin-arm64.node 0x0000000126b9efc0 napi_register_module_v1 + 24386748 10 rspack.darwin-arm64.node 0x0000000126b9ed74 napi_register_module_v1 + 24386160 11 rspack.darwin-arm64.node 0x00000001264ca890 napi_register_module_v1 + 17225100 12 libsystem_pthread.dylib 0x000000019d846f3c _pthread_start + 136 13 libsystem_pthread.dylib 0x000000019d841d24 thread_start + 8 ) libc++abi%3A terminating due to uncaught exception of type NSException --- CLI Log End ---

Check failure on line 11 in e2e/watch/restart.test.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-14, 20)

watch/restart.test.ts > restart > should restart when rstest config file changed

test timed out in 15000ms (completed 1 expect assertion) --- CLI Log Start --- Rstest v0.7.2 ✓ index.test.ts (1) Test Files 1 passed Tests 1 passed Duration 120ms (build 82ms%2C tests 38ms) Waiting for file changes... info restarting Rstest as rstest-1.config.mjs changed --- CLI Log End ---

Check failure on line 11 in e2e/watch/restart.test.ts

View workflow job for this annotation

GitHub Actions / e2e (macos-14, 18)

watch/restart.test.ts > restart > should restart when rstest config file changed

test timed out in 15000ms (completed 1 expect assertion) --- CLI Log Start --- Rstest v0.7.2 ✓ index.test.ts (1) Test Files 1 passed Tests 1 passed Duration 159ms (build 118ms%2C tests 41ms) Waiting for file changes... info restarting Rstest as rstest-1.config.mjs changed --- CLI Log End ---
const fixturesTargetPath = `${__dirname}/fixtures-test-1${process.env.RSTEST_OUTPUT_MODULE ? '-module' : ''}`;

const { fs } = await prepareFixtures({
Expand Down Expand Up @@ -49,5 +49,5 @@
expect(cli.stdout).toMatch('Tests 1 passed');

cli.exec.kill();
});
}, 15_000);
});
3 changes: 3 additions & 0 deletions packages/core/src/core/plugins/entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ export const pluginEntryWatch: (params: {
'**/*.snap',
);

config.experiments ??= {};
config.experiments.nativeWatcher = true;

const configFilePath = context.projects.find(
(project) => project.environmentName === environment.name,
)?.configFilePath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,7 @@ exports[`prepareRsbuild > should generate rspack config correctly in watch mode
"asyncWebAssembly": true,
"inlineConst": false,
"inlineEnum": false,
"nativeWatcher": true,
"rspackFuture": {
"bundlerInfo": {
"force": false,
Expand Down
Loading