Skip to content

Commit

Permalink
fix: fix nightly release compare-before-emit-disable test failed (#8739)
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykingxyz authored Dec 17, 2024
1 parent da44eab commit a08f7b6
Showing 1 changed file with 33 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,37 @@ let first_asset_mtime;

/** @type {import('../../dist').TCompilerCaseConfig} */
module.exports = {
description: "should write same content to same file",
options(context) {
return {
output: {
path: context.getDist(),
filename: "main.js",
compareBeforeEmit: false
},
context: context.getSource(),
entry: "./d",
};
},
async build(context, compiler) {
rimrafSync(context.getDist());
await new Promise(resolve => {
compiler.run(() => {
first_asset_mtime = fs.statSync(path.join(context.getDist("main.js")))?.mtime;
compiler.run(() => {
resolve();
});
});
});
},
async check(context) {
let second_asset_mtime = fs.statSync(path.join(context.getDist("main.js")))?.mtime;
expect(first_asset_mtime).not.toEqual(second_asset_mtime);
}
description: "should write same content to same file",
options(context) {
return {
output: {
path: context.getDist(),
filename: "main.js",
compareBeforeEmit: false
},
context: context.getSource(),
entry: "./d"
};
},
async build(context, compiler) {
rimrafSync(context.getDist());
await new Promise(resolve => {
compiler.run(() => {
first_asset_mtime = fs.statSync(
path.join(context.getDist("main.js"))
)?.mtime;
setTimeout(() => {
compiler.run(() => {
resolve();
});
}, 100);
});
});
},
async check(context) {
let second_asset_mtime = fs.statSync(
path.join(context.getDist("main.js"))
)?.mtime;
expect(first_asset_mtime).not.toEqual(second_asset_mtime);
}
};

2 comments on commit a08f7b6

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ran ecosystem CI: Open

suite result
modernjs ❌ failure
_selftest ✅ success
rsdoctor ❌ failure
rspress ✅ success
rslib ✅ success
rsbuild ❌ failure
examples ❌ failure
devserver ✅ success
nuxt ✅ success

@rspack-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Benchmark detail: Open

Name Base (2024-12-17 fb2869d) Current Change
10000_big_production-mode_disable-minimize + exec 37.9 s ± 622 ms 38.2 s ± 510 ms +0.73 %
10000_development-mode + exec 1.87 s ± 24 ms 1.81 s ± 30 ms -3.08 %
10000_development-mode_hmr + exec 687 ms ± 28 ms 693 ms ± 32 ms +0.76 %
10000_production-mode + exec 2.47 s ± 48 ms 2.38 s ± 58 ms -3.54 %
arco-pro_development-mode + exec 1.77 s ± 90 ms 1.74 s ± 58 ms -1.54 %
arco-pro_development-mode_hmr + exec 379 ms ± 1.6 ms 378 ms ± 1.2 ms -0.38 %
arco-pro_production-mode + exec 3.31 s ± 75 ms 3.3 s ± 95 ms -0.51 %
arco-pro_production-mode_generate-package-json-webpack-plugin + exec 3.37 s ± 152 ms 3.37 s ± 89 ms -0.18 %
arco-pro_production-mode_traverse-chunk-modules + exec 3.34 s ± 124 ms 3.3 s ± 82 ms -1.22 %
threejs_development-mode_10x + exec 1.61 s ± 20 ms 1.61 s ± 55 ms +0.31 %
threejs_development-mode_10x_hmr + exec 794 ms ± 28 ms 782 ms ± 11 ms -1.51 %
threejs_production-mode_10x + exec 5.42 s ± 141 ms 5.41 s ± 127 ms -0.11 %
10000_big_production-mode_disable-minimize + rss memory 9482 MiB ± 276 MiB 9522 MiB ± 271 MiB +0.42 %
10000_development-mode + rss memory 633 MiB ± 14.8 MiB 697 MiB ± 44.2 MiB +10.02 %
10000_development-mode_hmr + rss memory 1396 MiB ± 296 MiB 1623 MiB ± 142 MiB +16.27 %
10000_production-mode + rss memory 601 MiB ± 31.9 MiB 693 MiB ± 25.1 MiB +15.33 %
arco-pro_development-mode + rss memory 587 MiB ± 40.3 MiB 603 MiB ± 28.3 MiB +2.67 %
arco-pro_development-mode_hmr + rss memory 639 MiB ± 102 MiB 604 MiB ± 37.7 MiB -5.47 %
arco-pro_production-mode + rss memory 742 MiB ± 50.5 MiB 767 MiB ± 55.9 MiB +3.34 %
arco-pro_production-mode_generate-package-json-webpack-plugin + rss memory 737 MiB ± 45.5 MiB 793 MiB ± 70.4 MiB +7.66 %
arco-pro_production-mode_traverse-chunk-modules + rss memory 720 MiB ± 58.3 MiB 761 MiB ± 55.5 MiB +5.63 %
threejs_development-mode_10x + rss memory 638 MiB ± 22.2 MiB 681 MiB ± 34.5 MiB +6.80 %
threejs_development-mode_10x_hmr + rss memory 1194 MiB ± 248 MiB 1256 MiB ± 278 MiB +5.17 %
threejs_production-mode_10x + rss memory 948 MiB ± 55 MiB 977 MiB ± 77.4 MiB +3.02 %

Please sign in to comment.