diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 109d0b7c32bce..602dfed77893c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -188,3 +188,19 @@ jobs: - name: Self build run: npx hereby build-src --built + + pkg-size-report: + name: Package Size Report + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + + - name: Package size report + uses: pkg-size/action@7cbd5229062f24aec6543e0b8fd5eb09233bf355 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + build-command: npx hereby lkg + hide-files: 'lib*.d.ts' diff --git a/Herebyfile.mjs b/Herebyfile.mjs index f3a53ee44c86e..aa7208291846f 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -16,7 +16,7 @@ import { localizationDirectories } from "./scripts/build/localization.mjs"; import cmdLineOptions from "./scripts/build/options.mjs"; import { buildProject, cleanProject, watchProject } from "./scripts/build/projects.mjs"; import { localBaseline, localRwcBaseline, refBaseline, refRwcBaseline, runConsoleTests } from "./scripts/build/tests.mjs"; -import { Debouncer, Deferred, exec, getDiffTool, getDirSize, memoize, needsUpdate, readJson } from "./scripts/build/utils.mjs"; +import { Debouncer, Deferred, exec, getDiffTool, memoize, needsUpdate, readJson } from "./scripts/build/utils.mjs"; const glob = util.promisify(_glob); @@ -833,12 +833,7 @@ export const produceLKG = task({ if (missingFiles.length > 0) { throw new Error("Cannot replace the LKG unless all built targets are present in directory 'built/local/'. The following files are missing:\n" + missingFiles.join("\n")); } - const sizeBefore = getDirSize("lib"); await exec(process.execPath, ["scripts/produceLKG.mjs"]); - const sizeAfter = getDirSize("lib"); - if (sizeAfter > (sizeBefore * 1.10)) { - throw new Error("The lib folder increased by 10% or more. This likely indicates a bug."); - } } }); diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 94838e3f8634a..5dafd0409d1a1 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -587,6 +587,8 @@ export namespace Debug { export function enableDebugInfo() { if (isDebugInfoEnabled) return; + console.log(ts); + // avoid recomputing const weakTypeTextMap = new WeakMap(); const weakNodeTextMap = new WeakMap();