From 1b2d6ea11b9c8f0d29346de6cecd0edcf9884cc5 Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Tue, 5 May 2020 15:28:58 +0300 Subject: [PATCH] ci(docs-infra): remove redundant standalone ngcc run (#36145) Previously, in the `test_aio` CI job, we ran ngcc before building the app with `yarn build`. This was supposed to have the benefit of taking advantage of the parallel capabilities of standalone ngcc (vs implicitly running it via `ng build`). It turns out that the work done by the standalone ngcc was thrown away before the `ng build`, resulting in `ng build` having to run ngcc all over again. This happened because the `yarn build` script (run after the standalone ngcc step) also runs `yarn install`, which essentially cleans up `node_modules/`, thus discarding all the work already done by ngcc. Here is an [example CI job][1], where this can be seen in action: One can see the "Compiling : es2015 as esm2015" logs in the `yarn --cwd aio ngcc --properties es2015` step (as the standalone ngcc processes the various entry-points) and then see the same logs in the `yarn --cwd aio build --progress=false` step (as ngcc has to process the entry-points all over again). This commit removes the redundant standalone ngcc run and lets the CLI handle ngcc via `ng build`. It is possible to instrument the build process in a way that we can run the standalone ngcc after `yarn install` and thus take advantage of the performance gains in parallel mode, but the latest version of the CLI can already run ngcc in parallel mode as a pre-build step, so this is unnecessary. [1]: https://circleci.com/gh/angular/angular/658691 PR Close #36145 --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6933d1d122..4647feeb61 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -384,10 +384,6 @@ jobs: - custom_attach_workspace - init_environment - install_chrome_libs - # Compile dependencies to ivy - # Running `ngcc` here (instead of implicitly via `ng build`) allows us to take advantage of - # the parallel, async mode speed-up (~20-25s on CI). - - run: yarn --cwd aio ngcc --properties es2015 # Build aio - run: yarn --cwd aio build --progress=false # Lint the code