diff --git a/.github/workflows/run-lint-cpp.yml b/.github/workflows/run-lint-cpp.yml index 6e5501b43a..b1e78b3ec1 100644 --- a/.github/workflows/run-lint-cpp.yml +++ b/.github/workflows/run-lint-cpp.yml @@ -4,6 +4,8 @@ permissions: contents: read env: LLVM_VERSION: 16 + LC_CTYPE: "en_US.UTF-8" + LC_ALL: "en_US.UTF-8" on: workflow_call: diff --git a/package.json b/package.json index 61337410ef..31ba6d7d24 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "bump": "bun ./scripts/bump.ts", "build": "if [ ! -e build ]; then bun setup; fi && ninja -C build", "build:valgrind": "cmake . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-valgrind && ninja -Cbuild-valgrind", - "build:tidy": "cmake --log-level=WARNING . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DBUN_TIDY_ONLY=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-tidy && ninja -Cbuild-tidy", + "build:tidy": "BUN_SILENT=1 cmake --log-level=WARNING . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DBUN_TIDY_ONLY=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-tidy && BUN_SILENT=1 ninja -Cbuild-tidy", "build:tidy-extra": "cmake . -DZIG_OPTIMIZE=Debug -DUSE_DEBUG_JSC=ON -DBUN_TIDY_ONLY_EXTRA=ON -DCMAKE_BUILD_TYPE=Debug -GNinja -Bbuild-tidy && ninja -Cbuild-tidy", "build:release": "cmake . -DCMAKE_BUILD_TYPE=Release -GNinja -Bbuild-release && ninja -Cbuild-release", "build:debug-zig-release": "cmake . -DCMAKE_BUILD_TYPE=Release -DZIG_OPTIMIZE=Debug -GNinja -Bbuild-debug-zig-release && ninja -Cbuild-debug-zig-release", diff --git a/src/codegen/bundle-modules.ts b/src/codegen/bundle-modules.ts index 825203ebbd..0be71f3b92 100644 --- a/src/codegen/bundle-modules.ts +++ b/src/codegen/bundle-modules.ts @@ -41,12 +41,15 @@ const JS_DIR = path.join(CMAKE_BUILD_ROOT, "js"); const t = new Bun.Transpiler({ loader: "tsx" }); let start = performance.now(); -function mark(log: string) { +const silent = process.env.BUN_SILENT === "1"; +function markVerbose(log: string) { const now = performance.now(); console.log(`${log} (${(now - start).toFixed(0)}ms)`); start = now; } +const mark = silent ? (log: string) => {} : markVerbose; + const { moduleList, nativeModuleIds, nativeModuleEnumToId, nativeModuleEnums, requireTransformer } = createInternalModuleRegistry(BASE); globalThis.requireTransformer = requireTransformer; @@ -431,19 +434,21 @@ writeIfNotChanged(js2nativeZigPath, getJS2NativeZig(js2nativeZigPath)); mark("Generate Code"); -console.log(""); -console.timeEnd(timeString); -console.log( - ` %s kb`, - Math.floor( - (moduleList.reduce((a, b) => a + outputs.get(b.slice(0, -3).replaceAll("/", path.sep)).length, 0) + - globalThis.internalFunctionJSSize) / - 1000, - ), -); -console.log(` %s internal modules`, moduleList.length); -console.log( - ` %s internal functions across %s files`, - globalThis.internalFunctionCount, - globalThis.internalFunctionFileCount, -); +if (!silent) { + console.log(""); + console.timeEnd(timeString); + console.log( + ` %s kb`, + Math.floor( + (moduleList.reduce((a, b) => a + outputs.get(b.slice(0, -3).replaceAll("/", path.sep)).length, 0) + + globalThis.internalFunctionJSSize) / + 1000, + ), + ); + console.log(` %s internal modules`, moduleList.length); + console.log( + ` %s internal functions across %s files`, + globalThis.internalFunctionCount, + globalThis.internalFunctionFileCount, + ); +}