From 72f01b7a42b71f93d482a056f8e9e520cba13f94 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 1 Dec 2022 21:31:21 +0000 Subject: [PATCH] build: avoid common `node_modules/` bazel slowness pitfall (#48329) It's very easy to have some random `node_modules/` folder floating around in the repository. Especially coming from the old AIO example boilerplate setup (which heavily relied on nested node modules). These `node_modules/` folders can contain millions of files and might be accidentally picked up by Bazel `glob`'s (if they are authored in way that selects all nested files). This could surface in `aio/tools/examples/shared` or individual content examples, causing the Bazel analysis phase or runfile forest creation to take forever given more than 1.5 files being dealt with. Note that we keep the `examples/shared` node modules folder gitignored as otherwise Renovate may have problems when updating the folder. PR Close #48329 --- .gitignore | 2 +- aio/.gitignore | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e6081cab0bc9a..a16d57f09069a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ /bazel-out /integration/bazel/bazel-* *.log -node_modules +/node_modules/ # CircleCI temporary file for cache key computation. # See `save_month_to_file` in `.circleci/config.yml`. diff --git a/aio/.gitignore b/aio/.gitignore index b5d376505f387..ce6a4188e3868 100644 --- a/aio/.gitignore +++ b/aio/.gitignore @@ -8,6 +8,7 @@ # Node /node_modules +/tools/examples/shared/node_modules npm-debug.log yarn-error.log