Skip to content

Commit

Permalink
build: avoid common node_modules/ bazel slowness pitfall (angular#4…
Browse files Browse the repository at this point in the history
…8329)

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 angular#48329
  • Loading branch information
devversion authored and AndrewKushnir committed Dec 2, 2022
1 parent 21952bb commit 72f01b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions aio/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# Node
/node_modules
/tools/examples/shared/node_modules
npm-debug.log
yarn-error.log

Expand Down

0 comments on commit 72f01b7

Please sign in to comment.